Hi! can you please clarify How is the new SDK work...
# ask-for-help
a
Hi! can you please clarify How is the new SDK works the framework API? what about integration with FastAPI to control exceptions?
j
We are still evaluating if we would like to continue support framework API. You can continue to use the pre 1.2 ways of using framework, or with the new SDK, one can simply save the model https://docs.bentoml.com/en/latest/guides/model-store.html for FastAPI integration, documentation will be updated soon. for now, you can do like this
Copy code
@bentoml.service
class BentoService:
  ...

app = FastAPI()

BentoService.mount_asgi_app(app)
a
Meaning, frameworks does not work with the new SDK? At the moment it's frameworks api using 1.x or 1.2? I don't see a way to use new model api with runners? Regarding FastAPI, I only needed it to have more control on expections ( return proper error in case of gpu oom instead of bentoml internal server error). Do I still need to do it using fastapi? Thank you