Garden-AI / garden

https://garden-ai.readthedocs.io
MIT License
21 stars 4 forks source link

Update SDK to incorporate Modal Functions #534

Closed WillEngler closed 1 month ago

WillEngler commented 2 months ago

Gardens will soon contain Modal Functions in addition to Entrypoints. The SDK will need to be able to parse these new entities and allow them to be called as functions.

Actually invoking the Modal Functions will depend on a POST /modal-function-invocations backend endpoint. So it might make sense for this PR to just add the Pydantic schema and the function invocation can be a no-op.

Assumptions:

1. 2.

Acceptance Criteria

~Given I am logged in with the SDK, when I fetch a garden that has Modal Functions, then the garden SDK object will have all the modal functions available and callable.~ (now #537)

Given a ModalFunctionMetadata with the real name of a modal app / function + a ModalFunction object with that metadata, the ModalFunction object is callable and hits the backend POST /modal-function-invocations route.