diff --git a/api/data_types/index.html b/api/data_types/index.html index 578a0e549..850b140db 100644 --- a/api/data_types/index.html +++ b/api/data_types/index.html @@ -1275,21 +1275,20 @@
- Bases: BaseModel
+ Bases: BaseModel
Represents the output of a completion request to a model.
-
- Bases: BaseModel
+ Bases: BaseModel
instance-attribute
class-attribute
+ instance-attribute
¶
- Bases: BaseModel
+ Bases: BaseModel
Response object for a synchronous prompt completion.
-
- Bases: BaseModel
+ Bases: BaseModel
Response object for a stream prompt completion task.
-instance-attribute
class-attribute
+ instance-attribute
¶
- Bases: BaseModel
+ Bases: BaseModel
Request object for creating a FineTune.
-instance-attribute
class-attribute
+ instance-attribute
¶model: str = Field(Ellipsis, description='Identifier of base model to train from.')
+
@@ -1696,16 +1694,19 @@
- training_file
+ training_file
- instance-attribute
class-attribute
+ instance-attribute
¶
-training_file: str = Field(Ellipsis, description="Path to file of training dataset. Dataset must be a csv with columns 'prompt' and 'response'.")
+training_file: str = Field(
+ ...,
+ description="Path to file of training dataset. Dataset must be a csv with columns 'prompt' and 'response'.",
+)
@@ -1720,16 +1721,19 @@
- validation_file
+ validation_file
- instance-attribute
class-attribute
+ instance-attribute
¶
-validation_file: Optional[str] = Field(default=None, description='Path to file of validation dataset. Has the same format as training_file. If not provided, we will generate a split from the training dataset.')
+validation_file: Optional[str] = Field(
+ default=None,
+ description="Path to file of validation dataset. Has the same format as training_file. If not provided, we will generate a split from the training dataset.",
+)
@@ -1744,16 +1748,19 @@
- hyperparameters
+ hyperparameters
- instance-attribute
class-attribute
+ instance-attribute
¶
-hyperparameters: Optional[Dict[str, Any]] = Field(default=None, description='Hyperparameters to pass in to training job.')
+hyperparameters: Optional[Dict[str, Any]] = Field(
+ default=None,
+ description="Hyperparameters to pass in to training job.",
+)
@@ -1768,16 +1775,19 @@
- suffix
+ suffix
- instance-attribute
class-attribute
+ instance-attribute
¶
-suffix: Optional[str] = Field(default=None, description='Optional user-provided identifier suffix for the fine-tuned model.')
+suffix: Optional[str] = Field(
+ default=None,
+ description="Optional user-provided identifier suffix for the fine-tuned model.",
+)
@@ -1802,21 +1812,20 @@
- CreateFineTuneResponse
+ CreateFineTuneResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for creating a FineTune.
-
@@ -1832,16 +1841,18 @@
- fine_tune_id
+ fine_tune_id
- instance-attribute
class-attribute
+ instance-attribute
¶
-fine_tune_id: str = Field(Ellipsis, description='ID of the created fine-tuning job.')
+
@@ -1866,21 +1877,20 @@
- GetFineTuneResponse
+ GetFineTuneResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for retrieving a FineTune.
-
@@ -1896,16 +1906,18 @@
- fine_tune_id
+ fine_tune_id
- instance-attribute
class-attribute
+ instance-attribute
¶
-fine_tune_id: str = Field(Ellipsis, description='ID of the requested job.')
+
@@ -1920,16 +1932,18 @@
- status
+ status
- instance-attribute
class-attribute
+ instance-attribute
¶
-status: BatchJobStatus = Field(Ellipsis, description='Status of the requested job.')
+
@@ -1954,21 +1968,20 @@
- ListFineTunesResponse
+ ListFineTunesResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for listing FineTunes.
-
@@ -1984,16 +1997,19 @@
- jobs
+ jobs
- instance-attribute
class-attribute
+ instance-attribute
¶
-jobs: List[GetFineTuneResponse] = Field(Ellipsis, description='List of fine-tuning jobs and their statuses.')
+jobs: List[GetFineTuneResponse] = Field(
+ ...,
+ description="List of fine-tuning jobs and their statuses.",
+)
@@ -2018,21 +2034,20 @@
- CancelFineTuneResponse
+ CancelFineTuneResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for cancelling a FineTune.
-
@@ -2048,16 +2063,18 @@
- success
+ success
- instance-attribute
class-attribute
+ instance-attribute
¶
-success: bool = Field(Ellipsis, description='Whether cancellation was successful.')
+
@@ -2082,21 +2099,20 @@
- GetLLMEndpointResponse
+ GetLLMEndpointResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for retrieving a Model.
-
@@ -2112,16 +2128,18 @@
- name
+ name
- instance-attribute
class-attribute
+ instance-attribute
¶
-name: str = Field(description='The name of the model. Use this for making inference requests to the model.')
+name: str = Field(
+ description="The name of the model. Use this for making inference requests to the model."
+)
@@ -2136,16 +2154,18 @@
- source
+ source
- instance-attribute
class-attribute
+ instance-attribute
¶
-source: LLMSource = Field(description='The source of the model, e.g. Hugging Face.')
+
@@ -2160,16 +2180,18 @@
- inference_framework
+ inference_framework
- instance-attribute
class-attribute
+ instance-attribute
¶
-inference_framework: LLMInferenceFramework = Field(description='The inference framework used by the model.')
+inference_framework: LLMInferenceFramework = Field(
+ description="The inference framework used by the model."
+)
@@ -2184,16 +2206,19 @@
- id
+ id
- instance-attribute
class-attribute
+ instance-attribute
¶
-id: Optional[str] = Field(default=None, description='(For self-hosted users) The autogenerated ID of the model.')
+id: Optional[str] = Field(
+ default=None,
+ description="(For self-hosted users) The autogenerated ID of the model.",
+)
@@ -2208,16 +2233,19 @@
- model_name
+ model_name
- instance-attribute
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`.')
+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`.",
+)
@@ -2232,16 +2260,19 @@
- inference_framework_tag
+ inference_framework_tag
- instance-attribute
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.')
+inference_framework_tag: Optional[str] = Field(
+ default=None,
+ description="(For self-hosted users) The Docker image tag used to run the model.",
+)
@@ -2256,16 +2287,19 @@
- num_shards
+ num_shards
- instance-attribute
class-attribute
+ instance-attribute
¶
-num_shards: Optional[int] = Field(default=None, description='(For self-hosted users) The number of shards.')
+num_shards: Optional[int] = Field(
+ default=None,
+ description="(For self-hosted users) The number of shards.",
+)
@@ -2280,16 +2314,19 @@
- quantize
+ quantize
- instance-attribute
class-attribute
+ instance-attribute
¶
-quantize: Optional[Quantization] = Field(default=None, description='(For self-hosted users) The quantization method.')
+quantize: Optional[Quantization] = Field(
+ default=None,
+ description="(For self-hosted users) The quantization method.",
+)
@@ -2304,16 +2341,19 @@
- spec
+ spec
- instance-attribute
class-attribute
+ instance-attribute
¶
-spec: Optional[GetModelEndpointResponse] = Field(default=None, description='(For self-hosted users) Model endpoint details.')
+spec: Optional[GetModelEndpointResponse] = Field(
+ default=None,
+ description="(For self-hosted users) Model endpoint details.",
+)
@@ -2338,21 +2378,20 @@
- ListLLMEndpointsResponse
+ ListLLMEndpointsResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for listing Models.
-
@@ -2368,16 +2407,18 @@
- model_endpoints
+ model_endpoints
- instance-attribute
class-attribute
+ instance-attribute
¶
-model_endpoints: List[GetLLMEndpointResponse] = Field(Ellipsis, description='The list of models.')
+
@@ -2402,21 +2443,20 @@
- DeleteLLMEndpointResponse
+ DeleteLLMEndpointResponse
¶
-
- Bases: BaseModel
+
+ Bases: BaseModel
Response object for deleting a Model.
-
@@ -2432,16 +2472,18 @@
- deleted
+ deleted
- instance-attribute
class-attribute
+ instance-attribute
¶
-deleted: bool = Field(Ellipsis, description='Whether deletion was successful.')
+
diff --git a/api/error_handling/index.html b/api/error_handling/index.html
index dcce53c52..e9e745289 100644
--- a/api/error_handling/index.html
+++ b/api/error_handling/index.html
@@ -619,7 +619,7 @@ Error handling
- BadRequestError
+ BadRequestError
¶
@@ -627,15 +627,14 @@
-
- Bases: Exception
+
+ Bases: Exception
Corresponds to HTTP 400. Indicates that the request had inputs that were invalid. The user should not
attempt to retry the request without changing the inputs.
-
@@ -661,7 +660,7 @@
- UnauthorizedError
+ UnauthorizedError
¶
@@ -669,14 +668,13 @@
-
- Bases: Exception
+
+ Bases: Exception
Corresponds to HTTP 401. This means that no valid API key was provided.
-
@@ -702,7 +700,7 @@
- NotFoundError
+ NotFoundError
¶
@@ -710,8 +708,8 @@
-
- Bases: Exception
+
+ Bases: Exception
Corresponds to HTTP 404. This means that the resource (e.g. a Model, FineTune, etc.) could not be found.
@@ -720,7 +718,6 @@
the user does not have access to.
-
@@ -746,7 +743,7 @@
- RateLimitExceededError
+ RateLimitExceededError
¶
@@ -754,14 +751,13 @@
-
- Bases: Exception
+
+ Bases: Exception
Corresponds to HTTP 429. Too many requests hit the API too quickly. We recommend an exponential backoff for retries.
-
@@ -787,7 +783,7 @@
- ServerError
+ ServerError
¶
@@ -795,14 +791,13 @@
-
- Bases: Exception
+
+ Bases: Exception
Corresponds to HTTP 5xx errors on the server.
-
diff --git a/api/python_client/index.html b/api/python_client/index.html
index d291398d2..0efcb2293 100644
--- a/api/python_client/index.html
+++ b/api/python_client/index.html
@@ -747,15 +747,15 @@ 🐍 Python Client API Reference
- Completion
+ Completion
¶
-
- Bases: APIEngine
+
+ Bases: APIEngine
Completion API. This API is used to generate text completions.
@@ -767,7 +767,6 @@
For each of these modes, you can also choose whether to stream token responses or not.
-
@@ -780,12 +779,13 @@
+
- create
+ create
@@ -793,7 +793,17 @@
¶
-create(model: str, prompt: str, max_new_tokens: int = 20, temperature: float = 0.2, timeout: int = 10, stream: bool = False) -> Union[CompletionSyncResponse, Iterator[CompletionStreamResponse]]
+create(
+ model: str,
+ prompt: str,
+ max_new_tokens: int = 20,
+ temperature: float = 0.2,
+ timeout: int = 10,
+ stream: bool = False,
+) -> Union[
+ CompletionSyncResponse,
+ Iterator[CompletionStreamResponse],
+]
@@ -808,6 +818,8 @@
CompletionStreamV1Response
with request_id
and outputs
fields.
+
+
Parameters:
@@ -911,6 +923,8 @@
+
+
Returns: