Classes
SyncClient
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | str | None | None | - |
default_timeout | float | 120.0 | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
key | str | None | None | - |
default_timeout | float | 120.0 | - |
Methods
Methods
cancel
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
NoneTypeget_handle
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
SyncRequestHandlerealtime
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
max_buffering | int | None | None | - |
token_expiration | int | 120 | - |
Iterator[RealtimeConnection]result
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
dict[str, Any]run
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
timeout | float | None | None | - |
hint | str | None | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]status
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
with_logs | bool | False | - |
Statusstream
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '/stream' | - |
timeout | float | None | None | - |
Iterator[dict[str, Any]]submit
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
webhook_url | str | None | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
SyncRequestHandlesubscribe
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
with_logs | bool | False | - |
on_enqueue | Optional[Callable[str, NoneType]] | None | - |
on_queue_update | Optional[Callable[Status, NoneType]] | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]upload
| Parameter | Type | Default | Description |
|---|---|---|---|
data | str | bytes | - | - |
content_type | str | - | - |
file_name | str | None | None | - |
strupload_file
| Parameter | Type | Default | Description |
|---|---|---|---|
path | PathLike | - | - |
strupload_image
| Parameter | Type | Default | Description |
|---|---|---|---|
image | Image.Image | - | - |
format | str | 'jpeg' | - |
ws_connect
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
path | str | '' | - |
max_buffering | int | None | None | - |
token_expiration | int | 120 | - |
AsyncClient
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | str | None | None | - |
default_timeout | float | 120.0 | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
key | str | None | None | - |
default_timeout | float | 120.0 | - |
Methods
Methods
cancel
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
NoneTypeget_handle
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
AsyncRequestHandlerealtime
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
max_buffering | int | None | None | - |
token_expiration | int | 120 | - |
AsyncIterator[AsyncRealtimeConnection]result
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
dict[str, Any]run
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
timeout | float | None | None | - |
hint | str | None | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]status
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
with_logs | bool | False | - |
Statusstream
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '/stream' | - |
timeout | float | None | None | - |
AsyncIterator[dict[str, Any]]submit
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
webhook_url | str | None | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
AsyncRequestHandlesubscribe
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
with_logs | bool | False | - |
on_enqueue | Optional[Callable[str, NoneType]] | None | - |
on_queue_update | Optional[Callable[Status, NoneType]] | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]upload
| Parameter | Type | Default | Description |
|---|---|---|---|
data | str | bytes | - | - |
content_type | str | - | - |
file_name | str | None | None | - |
strupload_file
| Parameter | Type | Default | Description |
|---|---|---|---|
path | PathLike | - | - |
strupload_image
| Parameter | Type | Default | Description |
|---|---|---|---|
image | Image.Image | - | - |
format | str | 'jpeg' | - |
ws_connect
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
path | str | '' | - |
max_buffering | int | None | None | - |
token_expiration | int | 120 | - |
RealtimeConnection
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
_ws | 'Connection' | - | - |
Methods
Methods
AsyncRealtimeConnection
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
_ws | 'WebSocketClientProtocol' | - | - |
Methods
Methods
Status
Queued
Inherits from: Status
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
position | int | - | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
position | int | - | - |
InProgress
with_logs parameter set to True, the logs field will be a list of
log objects.
Inherits from: Status
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
logs | list[dict[str, Any]] | None | - | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
logs | list[dict[str, Any]] | None | - | - |
Completed
with_logs parameter set to True. Metrics
might contain the inference time, and other internal metadata (number of tokens
processed, etc.).
Inherits from: Status
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
logs | list[dict[str, Any]] | None | - | - |
metrics | dict[str, Any] | - | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
logs | list[dict[str, Any]] | None | - | - |
metrics | dict[str, Any] | - | - |
SyncRequestHandle
Inherits from: _BaseRequestHandle
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
request_id | str | - | - |
response_url | str | - | - |
status_url | str | - | - |
cancel_url | str | - | - |
client | Client | - | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
client | httpx.Client | - | - |
Methods
Methods
cancel
NoneTypefrom_request_id
| Parameter | Type | Default | Description |
|---|---|---|---|
client | Client | - | - |
application | str | - | - |
request_id | str | - | - |
SyncRequestHandleget
dict[str, Any]iter_events
with_logs is True, logs will be included in the response.| Parameter | Type | Default | Description |
|---|---|---|---|
with_logs | bool | False | - |
interval | float | 0.1 | - |
Iterator[Status]status
with_logs is True, logs will be included
for InProgress and Completed statuses.| Parameter | Type | Default | Description |
|---|---|---|---|
with_logs | bool | False | - |
StatusAsyncRequestHandle
Inherits from: _BaseRequestHandle
Constructor Parameters
Constructor Parameters
| Name | Type | Default | Description |
|---|---|---|---|
request_id | str | - | - |
response_url | str | - | - |
status_url | str | - | - |
cancel_url | str | - | - |
client | AsyncClient | - | - |
Class Variables
Class Variables
| Name | Type | Default | Description |
|---|---|---|---|
client | httpx.AsyncClient | - | - |
Methods
Methods
cancel
NoneTypefrom_request_id
| Parameter | Type | Default | Description |
|---|---|---|---|
client | AsyncClient | - | - |
application | str | - | - |
request_id | str | - | - |
AsyncRequestHandleget
dict[str, Any]iter_events
with_logs is True, logs will be included in the response.| Parameter | Type | Default | Description |
|---|---|---|---|
with_logs | bool | False | - |
interval | float | 0.1 | - |
AsyncIterator[Status]status
with_logs is True, logs will be included
for InProgress and Completed statuses.| Parameter | Type | Default | Description |
|---|---|---|---|
with_logs | bool | False | - |
StatusFunctions
run
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
timeout | float | None | None | - |
hint | str | None | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]
subscribe_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
with_logs | bool | False | - |
on_enqueue | Optional[Callable[str, NoneType]] | None | - |
on_queue_update | Optional[Callable[Status, NoneType]] | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]
subscribe
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
with_logs | bool | False | - |
on_enqueue | Optional[Callable[str, NoneType]] | None | - |
on_queue_update | Optional[Callable[Status, NoneType]] | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]
submit
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
webhook_url | str | None | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
SyncRequestHandle
stream
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '/stream' | - |
timeout | float | None | None | - |
Iterator[dict[str, Any]]
run_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
timeout | float | None | None | - |
hint | str | None | None | - |
headers | dict[str, str] | \{\} | - |
dict[str, Any]
submit_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '' | - |
hint | str | None | None | - |
webhook_url | str | None | None | - |
priority | Optional[Literal[normal, low]] | None | - |
headers | dict[str, str] | \{\} | - |
AsyncRequestHandle
stream_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
arguments | dict[str, Any] | - | - |
path | str | '/stream' | - |
timeout | float | None | None | - |
AsyncIterator[dict[str, Any]]
realtime
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
max_buffering | int | None | None | - |
token_expiration | int | 120 | - |
Iterator[RealtimeConnection]
realtime_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
max_buffering | int | None | None | - |
token_expiration | int | 120 | - |
AsyncIterator[AsyncRealtimeConnection]
cancel
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
NoneType
cancel_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
NoneType
status
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
with_logs | bool | False | - |
Status
status_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
with_logs | bool | False | - |
Status
result
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
dict[str, Any]
result_async
| Parameter | Type | Default | Description |
|---|---|---|---|
application | str | - | - |
request_id | str | - | - |
dict[str, Any]
encode
| Parameter | Type | Default | Description |
|---|---|---|---|
data | str | bytes | - | - |
content_type | str | - | - |
str
encode_file
| Parameter | Type | Default | Description |
|---|---|---|---|
path | PathLike | - | - |
str
encode_image
| Parameter | Type | Default | Description |
|---|---|---|---|
image | Image.Image | - | - |
format | str | 'jpeg' | - |