🐍 Python Client Data Type Reference¶
CompletionOutput ¶
Bases: BaseModel
Represents the output of a completion request to a model.
CompletionStreamOutput ¶
CompletionSyncResponse
module-attribute
¶
CompletionStreamResponse
module-attribute
¶
CreateFineTuneResponse ¶
Bases: BaseModel
Response object for creating a FineTune.
id
class-attribute
instance-attribute
¶
The ID of the FineTune.
GetFineTuneResponse ¶
Bases: BaseModel
Response object for retrieving a FineTune.
id
class-attribute
instance-attribute
¶
The ID of the FineTune.
fine_tuned_model
class-attribute
instance-attribute
¶
fine_tuned_model: Optional[str] = Field(
default=None,
description="Name of the resulting fine-tuned model. This can be plugged into the Completion API once the fine-tune is complete",
)
The name of the resulting fine-tuned model. This can be plugged into the Completion API once the fine-tune is complete.
ListFineTunesResponse ¶
Bases: BaseModel
Response object for listing FineTunes.
jobs
class-attribute
instance-attribute
¶
jobs: List[GetFineTuneResponse] = Field(
...,
description="List of fine-tuning jobs and their statuses.",
)
A list of FineTunes, represented as GetFineTuneResponse
s.
CancelFineTuneResponse ¶
Bases: BaseModel
Response object for cancelling a FineTune.
success
class-attribute
instance-attribute
¶
Whether the cancellation succeeded.
GetLLMEndpointResponse ¶
Bases: BaseModel
Response object for retrieving a Model.
name
class-attribute
instance-attribute
¶
name: str = Field(
description="The name of the model. Use this for making inference requests to the model."
)
The name of the model. Use this for making inference requests to the model.
source
class-attribute
instance-attribute
¶
The source of the model, e.g. Hugging Face.
inference_framework
class-attribute
instance-attribute
¶
inference_framework: LLMInferenceFramework = Field(
description="The inference framework used by the model."
)
(For self-hosted users) The inference framework used by the model.
id
class-attribute
instance-attribute
¶
id: Optional[str] = Field(
default=None,
description="(For self-hosted users) The autogenerated ID of the model.",
)
(For self-hosted users) The autogenerated ID of the model.
model_name
class-attribute
instance-attribute
¶
model_name: Optional[str] = Field(
default=None,
description="(For self-hosted users) For fine-tuned models, the base model. For base models, this will be the same as `name`.",
)
(For self-hosted users) For fine-tuned models, the base model. For base models, this will be the same as name
.
status
class-attribute
instance-attribute
¶
The status of the model (can be one of "READY", "UPDATE_PENDING", "UPDATE_IN_PROGRESS", "UPDATE_FAILED", "DELETE_IN_PROGRESS").
inference_framework_tag
class-attribute
instance-attribute
¶
inference_framework_tag: Optional[str] = Field(
default=None,
description="(For self-hosted users) The Docker image tag used to run the model.",
)
(For self-hosted users) The Docker image tag used to run the model.
num_shards
class-attribute
instance-attribute
¶
num_shards: Optional[int] = Field(
default=None,
description="(For self-hosted users) The number of shards.",
)
(For self-hosted users) The number of shards.
quantize
class-attribute
instance-attribute
¶
quantize: Optional[Quantization] = Field(
default=None,
description="(For self-hosted users) The quantization method.",
)
(For self-hosted users) The quantization method.
spec
class-attribute
instance-attribute
¶
spec: Optional[GetModelEndpointResponse] = Field(
default=None,
description="(For self-hosted users) Model endpoint details.",
)
(For self-hosted users) Model endpoint details.
ListLLMEndpointsResponse ¶
Bases: BaseModel
Response object for listing Models.
model_endpoints
class-attribute
instance-attribute
¶
A list of Models, represented as GetLLMEndpointResponse
s.
DeleteLLMEndpointResponse ¶
Bases: BaseModel
Response object for deleting a Model.
deleted
class-attribute
instance-attribute
¶
Whether the deletion succeeded.
ModelDownloadRequest ¶
Bases: BaseModel
Request object for downloading a model.
ModelDownloadResponse ¶
Bases: BaseModel
Response object for downloading a model.
urls
class-attribute
instance-attribute
¶
urls: Dict[str, str] = Field(
...,
description="Dictionary of (file_name, url) pairs to download the model from.",
)
UploadFileResponse ¶
Bases: BaseModel
Response object for uploading a file.
id
class-attribute
instance-attribute
¶
ID of the uploaded file.
GetFileResponse ¶
GetFileContentResponse ¶
Bases: BaseModel
Response object for retrieving a file's content.
ListFilesResponse ¶
Bases: BaseModel
Response object for listing files.
files
class-attribute
instance-attribute
¶
List of file IDs, names, and sizes.
DeleteFileResponse ¶
Bases: BaseModel
Response object for deleting a file.
deleted
class-attribute
instance-attribute
¶
Whether deletion was successful.