requests (synchronous) and aiohttp (asynchronous).
HTTPClient
predict / embed only need the serialized body.
Root URL of the model server, e.g.
"http://localhost:8080".Mapping of endpoint type to path, e.g.
{"prediction": "/api/predict/m-optimus", "embedding": "/api/embed/m-optimus"}. At least one key must be present.HTTP request timeout in seconds.
close
predict
str
required
Serialized JSON request payload.
str
Response body as a JSON string.
embed
str
required
Serialized JSON request payload.
str
Response body as a JSON string.
metadata
str
Response body as a JSON string.
predict_async
str
required
Serialized JSON request payload.
Any
An
ClientSession for connection pooling.str
Response body as a JSON string.
embed_async
str
required
Serialized JSON request payload.
Any
An
ClientSession for connection pooling.str
Response body as a JSON string.

