pixano_inference.pydantic.base
Pydantic base models for request and response.
APIRequest
Bases: BaseRequest
, ABC
API request model.
Attributes:
Name | Type | Description |
---|---|---|
api_key |
str
|
API key. |
secret_key |
str
|
Secret key. |
BaseRequest
Base request model.
Attributes:
Name | Type | Description |
---|---|---|
model |
str
|
Name of the model. |
to_base_model(base_model)
Convert request to input type.
Source code in pixano_inference/pydantic/base.py
BaseResponse
Base response model.
Attributes:
Name | Type | Description |
---|---|---|
task_id |
ID of the celery task. |
|
status |
str
|
Status of the celery task. |
timestamp |
datetime
|
Timestamp of the response. |
processing_time |
float
|
Processing time of the response. |
metadata |
dict[str, Any]
|
Metadata of the response. |
data |
Any
|
Data of the response. |