context to be initialized
(for authentication).
The following Chainlet wraps a deployed model with a Stub:
my_chainlet.py
- Input as JSON dict (like above) or pydantic model.
- Automatic parsing of the response into a pydantic model using the
output_modelargument. predict_async(recommended) orpredict_sync.- Streaming responses using
predict_async_streamwhich returns an async bytes iterator. - Customized with
RPCOptions.