first commit

This commit is contained in:
Sheldon Vaughn
2025-08-22 10:31:13 -05:00
commit ab530a160e
284 changed files with 18581 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# AnnotationDetail
Annotation information
## Supported Types
### `models.FileAnnotationDetail`
```python
value: models.FileAnnotationDetail = /* values here */
```
### `models.URLCitationAnnotationDetail`
```python
value: models.URLCitationAnnotationDetail = /* values here */
```
+16
View File
@@ -0,0 +1,16 @@
# ChatCompletion
Chat completion response
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Unique completion identifier |
| `choices` | List[[models.ChatCompletionChoice](../models/chatcompletionchoice.md)] | :heavy_check_mark: | List of completion choices |
| `created` | *float* | :heavy_check_mark: | Unix timestamp of creation |
| `model` | *str* | :heavy_check_mark: | Model used for completion |
| `object` | [models.ChatCompletionObject](../models/chatcompletionobject.md) | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | System fingerprint |
| `usage` | [Optional[models.CompletionUsage]](../models/completionusage.md) | :heavy_minus_sign: | Token usage statistics |
@@ -0,0 +1,14 @@
# ChatCompletionAssistantMessageParam
Assistant message with tool calls and audio support
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `role` | [models.ChatCompletionAssistantMessageParamRole](../models/chatcompletionassistantmessageparamrole.md) | :heavy_check_mark: | N/A |
| `content` | [OptionalNullable[models.ChatCompletionAssistantMessageParamContent]](../models/chatcompletionassistantmessageparamcontent.md) | :heavy_minus_sign: | Assistant message content |
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the assistant |
| `tool_calls` | List[[models.ChatCompletionMessageToolCall](../models/chatcompletionmessagetoolcall.md)] | :heavy_minus_sign: | Tool calls made by the assistant |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | Refusal message if content was refused |
@@ -0,0 +1,25 @@
# ChatCompletionAssistantMessageParamContent
Assistant message content
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[models.ChatCompletionContentPart]`
```python
value: List[models.ChatCompletionContentPart] = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,8 @@
# ChatCompletionAssistantMessageParamRole
## Values
| Name | Value |
| ----------- | ----------- |
| `ASSISTANT` | assistant |
+13
View File
@@ -0,0 +1,13 @@
# ChatCompletionChoice
Chat completion choice
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `finish_reason` | [Nullable[models.ChatCompletionChoiceFinishReason]](../models/chatcompletionchoicefinishreason.md) | :heavy_check_mark: | Reason the completion finished |
| `index` | *float* | :heavy_check_mark: | Choice index |
| `message` | [models.ChatCompletionMessage](../models/chatcompletionmessage.md) | :heavy_check_mark: | Assistant message in completion response |
| `logprobs` | [OptionalNullable[models.ChatCompletionTokenLogprobs]](../models/chatcompletiontokenlogprobs.md) | :heavy_minus_sign: | Log probabilities for the completion |
@@ -0,0 +1,14 @@
# ChatCompletionChoiceFinishReason
Reason the completion finished
## Values
| Name | Value |
| ---------------- | ---------------- |
| `TOOL_CALLS` | tool_calls |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
| `ERROR` | error |
+16
View File
@@ -0,0 +1,16 @@
# ChatCompletionChunk
Streaming chat completion chunk
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | N/A |
| `choices` | List[[models.ChatCompletionChunkChoice](../models/chatcompletionchunkchoice.md)] | :heavy_check_mark: | N/A |
| `created` | *float* | :heavy_check_mark: | N/A |
| `model` | *str* | :heavy_check_mark: | N/A |
| `object` | [models.ChatCompletionChunkObject](../models/chatcompletionchunkobject.md) | :heavy_check_mark: | N/A |
| `system_fingerprint` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A |
| `usage` | [Optional[models.CompletionUsage]](../models/completionusage.md) | :heavy_minus_sign: | Token usage statistics |
+13
View File
@@ -0,0 +1,13 @@
# ChatCompletionChunkChoice
Streaming completion choice chunk
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `delta` | [models.ChatCompletionChunkChoiceDelta](../models/chatcompletionchunkchoicedelta.md) | :heavy_check_mark: | Delta changes in streaming response |
| `finish_reason` | [Nullable[models.ChatCompletionChunkChoiceFinishReason]](../models/chatcompletionchunkchoicefinishreason.md) | :heavy_check_mark: | N/A |
| `index` | *float* | :heavy_check_mark: | N/A |
| `logprobs` | [OptionalNullable[models.ChatCompletionTokenLogprobs]](../models/chatcompletiontokenlogprobs.md) | :heavy_minus_sign: | Log probabilities for the completion |
@@ -0,0 +1,16 @@
# ChatCompletionChunkChoiceDelta
Delta changes in streaming response
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `role` | [Optional[models.ChatCompletionChunkChoiceDeltaRole]](../models/chatcompletionchunkchoicedeltarole.md) | :heavy_minus_sign: | The role of the message author |
| `content` | *OptionalNullable[str]* | :heavy_minus_sign: | Message content delta |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | Reasoning content delta |
| `refusal` | *OptionalNullable[str]* | :heavy_minus_sign: | Refusal message delta |
| `tool_calls` | List[[models.ChatCompletionChunkChoiceDeltaToolCall](../models/chatcompletionchunkchoicedeltatoolcall.md)] | :heavy_minus_sign: | Tool calls delta |
| `reasoning_details` | List[[models.ReasoningDetail](../models/reasoningdetail.md)] | :heavy_minus_sign: | Reasoning details delta to send reasoning details back to upstream |
| `annotations` | List[[models.AnnotationDetail](../models/annotationdetail.md)] | :heavy_minus_sign: | Annotations delta to send annotations back to upstream |
@@ -0,0 +1,10 @@
# ChatCompletionChunkChoiceDeltaRole
The role of the message author
## Values
| Name | Value |
| ----------- | ----------- |
| `ASSISTANT` | assistant |
@@ -0,0 +1,13 @@
# ChatCompletionChunkChoiceDeltaToolCall
Tool call delta for streaming responses
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `index` | *float* | :heavy_check_mark: | Tool call index in the array |
| `id` | *Optional[str]* | :heavy_minus_sign: | Tool call identifier |
| `type` | [Optional[models.ChatCompletionChunkChoiceDeltaToolCallType]](../models/chatcompletionchunkchoicedeltatoolcalltype.md) | :heavy_minus_sign: | Tool call type |
| `function` | [Optional[models.ChatCompletionChunkChoiceDeltaToolCallFunction]](../models/chatcompletionchunkchoicedeltatoolcallfunction.md) | :heavy_minus_sign: | Function call details |
@@ -0,0 +1,11 @@
# ChatCompletionChunkChoiceDeltaToolCallFunction
Function call details
## Fields
| Field | Type | Required | Description |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `name` | *Optional[str]* | :heavy_minus_sign: | Function name |
| `arguments` | *Optional[str]* | :heavy_minus_sign: | Function arguments as JSON string |
@@ -0,0 +1,10 @@
# ChatCompletionChunkChoiceDeltaToolCallType
Tool call type
## Values
| Name | Value |
| ---------- | ---------- |
| `FUNCTION` | function |
@@ -0,0 +1,12 @@
# ChatCompletionChunkChoiceFinishReason
## Values
| Name | Value |
| ---------------- | ---------------- |
| `TOOL_CALLS` | tool_calls |
| `STOP` | stop |
| `LENGTH` | length |
| `CONTENT_FILTER` | content_filter |
| `ERROR` | error |
+8
View File
@@ -0,0 +1,8 @@
# ChatCompletionChunkObject
## Values
| Name | Value |
| ----------------------- | ----------------------- |
| `CHAT_COMPLETION_CHUNK` | chat.completion.chunk |
+25
View File
@@ -0,0 +1,25 @@
# ChatCompletionContentPart
Content part for chat completion messages
## Supported Types
### `models.ChatCompletionContentPartText`
```python
value: models.ChatCompletionContentPartText = /* values here */
```
### `models.ChatCompletionContentPartImage`
```python
value: models.ChatCompletionContentPartImage = /* values here */
```
### `models.ChatCompletionContentPartAudio`
```python
value: models.ChatCompletionContentPartAudio = /* values here */
```
@@ -0,0 +1,11 @@
# ChatCompletionContentPartAudio
Audio input content part
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionContentPartAudioType](../models/chatcompletioncontentpartaudiotype.md) | :heavy_check_mark: | N/A |
| `input_audio` | [models.InputAudio](../models/inputaudio.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,16 @@
# ChatCompletionContentPartAudioFormat
Audio format
## Values
| Name | Value |
| ------- | ------- |
| `WAV` | wav |
| `MP3` | mp3 |
| `FLAC` | flac |
| `M4A` | m4a |
| `OGG` | ogg |
| `PCM16` | pcm16 |
| `PCM24` | pcm24 |
@@ -0,0 +1,8 @@
# ChatCompletionContentPartAudioType
## Values
| Name | Value |
| ------------- | ------------- |
| `INPUT_AUDIO` | input_audio |
@@ -0,0 +1,11 @@
# ChatCompletionContentPartImage
Image content part for vision models
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionContentPartImageType](../models/chatcompletioncontentpartimagetype.md) | :heavy_check_mark: | N/A |
| `image_url` | [models.ChatCompletionContentPartImageImageURL](../models/chatcompletioncontentpartimageimageurl.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,9 @@
# ChatCompletionContentPartImageImageURL
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- |
| `url` | *str* | :heavy_check_mark: | URL of the image (data: URLs supported) |
| `detail` | [Optional[models.Detail]](../models/detail.md) | :heavy_minus_sign: | Image detail level for vision models |
@@ -0,0 +1,8 @@
# ChatCompletionContentPartImageType
## Values
| Name | Value |
| ----------- | ----------- |
| `IMAGE_URL` | image_url |
@@ -0,0 +1,11 @@
# ChatCompletionContentPartText
Text content part
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `type` | [models.ChatCompletionContentPartTextType](../models/chatcompletioncontentparttexttype.md) | :heavy_check_mark: | N/A |
| `text` | *str* | :heavy_check_mark: | N/A |
@@ -0,0 +1,8 @@
# ChatCompletionContentPartTextType
## Values
| Name | Value |
| ------ | ------ |
| `TEXT` | text |
+34
View File
@@ -0,0 +1,34 @@
# ChatCompletionCreateParams
Chat completion request parameters
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `messages` | List[[models.ChatCompletionMessageParam](../models/chatcompletionmessageparam.md)] | :heavy_check_mark: | List of messages for the conversation | [<br/>{<br/>"role": "user",<br/>"content": "Hello, how are you?"<br/>}<br/>] |
| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | |
| `reasoning` | [OptionalNullable[models.ChatCompletionCreateParamsReasoning]](../models/chatcompletioncreateparamsreasoning.md) | :heavy_minus_sign: | Reasoning configuration | |
| `response_format` | [Optional[models.ChatCompletionCreateParamsResponseFormatUnion]](../models/chatcompletioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | Response format configuration | |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | |
| `stop` | [OptionalNullable[models.ChatCompletionCreateParamsStop]](../models/chatcompletioncreateparamsstop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | |
| `stream` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable streaming response | |
| `stream_options` | [OptionalNullable[models.ChatCompletionCreateParamsStreamOptions]](../models/chatcompletioncreateparamsstreamoptions.md) | :heavy_minus_sign: | N/A | |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | |
| `tool_choice` | [Optional[models.ChatCompletionToolChoiceOption]](../models/chatcompletiontoolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | |
| `tools` | List[[models.ChatCompletionTool](../models/chatcompletiontool.md)] | :heavy_minus_sign: | Available tools for function calling | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | |
| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | |
| `models_llm` | List[*str*] | :heavy_minus_sign: | Order of models to fallback to for this request | |
| `reasoning_effort` | [OptionalNullable[models.ChatCompletionCreateParamsReasoningEffort]](../models/chatcompletioncreateparamsreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort | |
| `provider` | [OptionalNullable[models.ChatCompletionCreateParamsProvider]](../models/chatcompletioncreateparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
| `plugins` | List[[models.ChatCompletionCreateParamsPluginUnion](../models/chatcompletioncreateparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |
@@ -0,0 +1,23 @@
# ChatCompletionCreateParamsAudio
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,23 @@
# ChatCompletionCreateParamsCompletion
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,14 @@
# ChatCompletionCreateParamsDataCollection
Data collection setting. If no available model provider meets the requirement, your request will return an error.
- allow: (default) allow providers which store user data non-transiently and may train on it
- deny: use only providers which do not collect user data.
## Values
| Name | Value |
| ------- | ------- |
| `DENY` | deny |
| `ALLOW` | allow |
@@ -0,0 +1,13 @@
# ChatCompletionCreateParamsEffort
OpenAI-style reasoning effort setting
## Values
| Name | Value |
| --------- | --------- |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
@@ -0,0 +1,9 @@
# ChatCompletionCreateParamsEngine
## Values
| Name | Value |
| -------- | -------- |
| `NATIVE` | native |
| `EXA` | exa |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsIDChainOfThought
## Values
| Name | Value |
| ------------------ | ------------------ |
| `CHAIN_OF_THOUGHT` | chain-of-thought |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsIDFileParser
## Values
| Name | Value |
| ------------- | ------------- |
| `FILE_PARSER` | file-parser |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsIDModeration
## Values
| Name | Value |
| ------------ | ------------ |
| `MODERATION` | moderation |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsIDWeb
## Values
| Name | Value |
| ----- | ----- |
| `WEB` | web |
@@ -0,0 +1,85 @@
# ChatCompletionCreateParamsIgnoreEnum
## Values
| Name | Value |
| ------------------ | ------------------ |
| `ANY_SCALE` | AnyScale |
| `CENT_ML` | Cent-ML |
| `HUGGING_FACE` | HuggingFace |
| `HYPERBOLIC_2` | Hyperbolic 2 |
| `LEPTON` | Lepton |
| `LYNN_2` | Lynn 2 |
| `LYNN` | Lynn |
| `MANCER` | Mancer |
| `MODAL` | Modal |
| `OCTO_AI` | OctoAI |
| `RECURSAL` | Recursal |
| `REFLECTION` | Reflection |
| `REPLICATE` | Replicate |
| `SAMBA_NOVA_2` | SambaNova 2 |
| `SF_COMPUTE` | SF Compute |
| `TOGETHER_2` | Together 2 |
| `ONE_DOT_AI` | 01.AI |
| `AI21` | AI21 |
| `AION_LABS` | AionLabs |
| `ALIBABA` | Alibaba |
| `AMAZON_BEDROCK` | Amazon Bedrock |
| `ANTHROPIC` | Anthropic |
| `ATLAS_CLOUD` | AtlasCloud |
| `ATOMA` | Atoma |
| `AVIAN` | Avian |
| `AZURE` | Azure |
| `BASE_TEN` | BaseTen |
| `CEREBRAS` | Cerebras |
| `CHUTES` | Chutes |
| `CLOUDFLARE` | Cloudflare |
| `COHERE` | Cohere |
| `CROF_AI` | CrofAI |
| `CRUSOE` | Crusoe |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
| `ENFER` | Enfer |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud |
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `INFLECTION` | Inflection |
| `INO_CLOUD` | InoCloud |
| `KLUSTER` | Kluster |
| `LAMBDA` | Lambda |
| `LIQUID` | Liquid |
| `MANCER_2` | Mancer 2 |
| `META` | Meta |
| `MINIMAX` | Minimax |
| `MISTRAL` | Mistral |
| `MOONSHOT_AI` | Moonshot AI |
| `MORPH` | Morph |
| `N_COMPASS` | NCompass |
| `NEBIUS` | Nebius |
| `NEXT_BIT` | NextBit |
| `NINETEEN` | Nineteen |
| `NOVITA` | Novita |
| `OPEN_AI` | OpenAI |
| `OPEN_INFERENCE` | OpenInference |
| `PARASAIL` | Parasail |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
| `SAMBA_NOVA` | SambaNova |
| `STEALTH` | Stealth |
| `SWITCHPOINT` | Switchpoint |
| `TARGON` | Targon |
| `TOGETHER` | Together |
| `UBICLOUD` | Ubicloud |
| `VENICE` | Venice |
| `WAND_B` | WandB |
| `X_AI` | xAI |
| `Z_AI` | Z.AI |
@@ -0,0 +1,17 @@
# ChatCompletionCreateParamsIgnoreUnion
## Supported Types
### `models.ChatCompletionCreateParamsIgnoreEnum`
```python
value: models.ChatCompletionCreateParamsIgnoreEnum = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,23 @@
# ChatCompletionCreateParamsImage
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,11 @@
# ChatCompletionCreateParamsJSONSchema
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | Schema name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) |
| `description` | *Optional[str]* | :heavy_minus_sign: | Schema description for the model |
| `schema_` | [Optional[models.ResponseFormatJSONSchemaSchema]](../models/responseformatjsonschemaschema.md) | :heavy_minus_sign: | The schema for the response format, described as a JSON Schema object |
| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable strict schema adherence |
@@ -0,0 +1,14 @@
# ChatCompletionCreateParamsMaxPrice
The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `prompt` | [Optional[models.ChatCompletionCreateParamsPrompt]](../models/chatcompletioncreateparamsprompt.md) | :heavy_minus_sign: | N/A |
| `completion` | [Optional[models.ChatCompletionCreateParamsCompletion]](../models/chatcompletioncreateparamscompletion.md) | :heavy_minus_sign: | N/A |
| `image` | [Optional[models.ChatCompletionCreateParamsImage]](../models/chatcompletioncreateparamsimage.md) | :heavy_minus_sign: | N/A |
| `audio` | [Optional[models.ChatCompletionCreateParamsAudio]](../models/chatcompletioncreateparamsaudio.md) | :heavy_minus_sign: | N/A |
| `request` | [Optional[models.ChatCompletionCreateParamsRequest]](../models/chatcompletioncreateparamsrequest.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,85 @@
# ChatCompletionCreateParamsOnlyEnum
## Values
| Name | Value |
| ------------------ | ------------------ |
| `ANY_SCALE` | AnyScale |
| `CENT_ML` | Cent-ML |
| `HUGGING_FACE` | HuggingFace |
| `HYPERBOLIC_2` | Hyperbolic 2 |
| `LEPTON` | Lepton |
| `LYNN_2` | Lynn 2 |
| `LYNN` | Lynn |
| `MANCER` | Mancer |
| `MODAL` | Modal |
| `OCTO_AI` | OctoAI |
| `RECURSAL` | Recursal |
| `REFLECTION` | Reflection |
| `REPLICATE` | Replicate |
| `SAMBA_NOVA_2` | SambaNova 2 |
| `SF_COMPUTE` | SF Compute |
| `TOGETHER_2` | Together 2 |
| `ONE_DOT_AI` | 01.AI |
| `AI21` | AI21 |
| `AION_LABS` | AionLabs |
| `ALIBABA` | Alibaba |
| `AMAZON_BEDROCK` | Amazon Bedrock |
| `ANTHROPIC` | Anthropic |
| `ATLAS_CLOUD` | AtlasCloud |
| `ATOMA` | Atoma |
| `AVIAN` | Avian |
| `AZURE` | Azure |
| `BASE_TEN` | BaseTen |
| `CEREBRAS` | Cerebras |
| `CHUTES` | Chutes |
| `CLOUDFLARE` | Cloudflare |
| `COHERE` | Cohere |
| `CROF_AI` | CrofAI |
| `CRUSOE` | Crusoe |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
| `ENFER` | Enfer |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud |
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `INFLECTION` | Inflection |
| `INO_CLOUD` | InoCloud |
| `KLUSTER` | Kluster |
| `LAMBDA` | Lambda |
| `LIQUID` | Liquid |
| `MANCER_2` | Mancer 2 |
| `META` | Meta |
| `MINIMAX` | Minimax |
| `MISTRAL` | Mistral |
| `MOONSHOT_AI` | Moonshot AI |
| `MORPH` | Morph |
| `N_COMPASS` | NCompass |
| `NEBIUS` | Nebius |
| `NEXT_BIT` | NextBit |
| `NINETEEN` | Nineteen |
| `NOVITA` | Novita |
| `OPEN_AI` | OpenAI |
| `OPEN_INFERENCE` | OpenInference |
| `PARASAIL` | Parasail |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
| `SAMBA_NOVA` | SambaNova |
| `STEALTH` | Stealth |
| `SWITCHPOINT` | Switchpoint |
| `TARGON` | Targon |
| `TOGETHER` | Together |
| `UBICLOUD` | Ubicloud |
| `VENICE` | Venice |
| `WAND_B` | WandB |
| `X_AI` | xAI |
| `Z_AI` | Z.AI |
@@ -0,0 +1,17 @@
# ChatCompletionCreateParamsOnlyUnion
## Supported Types
### `models.ChatCompletionCreateParamsOnlyEnum`
```python
value: models.ChatCompletionCreateParamsOnlyEnum = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,85 @@
# ChatCompletionCreateParamsOrderEnum
## Values
| Name | Value |
| ------------------ | ------------------ |
| `ANY_SCALE` | AnyScale |
| `CENT_ML` | Cent-ML |
| `HUGGING_FACE` | HuggingFace |
| `HYPERBOLIC_2` | Hyperbolic 2 |
| `LEPTON` | Lepton |
| `LYNN_2` | Lynn 2 |
| `LYNN` | Lynn |
| `MANCER` | Mancer |
| `MODAL` | Modal |
| `OCTO_AI` | OctoAI |
| `RECURSAL` | Recursal |
| `REFLECTION` | Reflection |
| `REPLICATE` | Replicate |
| `SAMBA_NOVA_2` | SambaNova 2 |
| `SF_COMPUTE` | SF Compute |
| `TOGETHER_2` | Together 2 |
| `ONE_DOT_AI` | 01.AI |
| `AI21` | AI21 |
| `AION_LABS` | AionLabs |
| `ALIBABA` | Alibaba |
| `AMAZON_BEDROCK` | Amazon Bedrock |
| `ANTHROPIC` | Anthropic |
| `ATLAS_CLOUD` | AtlasCloud |
| `ATOMA` | Atoma |
| `AVIAN` | Avian |
| `AZURE` | Azure |
| `BASE_TEN` | BaseTen |
| `CEREBRAS` | Cerebras |
| `CHUTES` | Chutes |
| `CLOUDFLARE` | Cloudflare |
| `COHERE` | Cohere |
| `CROF_AI` | CrofAI |
| `CRUSOE` | Crusoe |
| `DEEP_INFRA` | DeepInfra |
| `DEEP_SEEK` | DeepSeek |
| `ENFER` | Enfer |
| `FEATHERLESS` | Featherless |
| `FIREWORKS` | Fireworks |
| `FRIENDLI` | Friendli |
| `GMI_CLOUD` | GMICloud |
| `GOOGLE` | Google |
| `GOOGLE_AI_STUDIO` | Google AI Studio |
| `GROQ` | Groq |
| `HYPERBOLIC` | Hyperbolic |
| `INCEPTION` | Inception |
| `INFERENCE_NET` | InferenceNet |
| `INFERMATIC` | Infermatic |
| `INFLECTION` | Inflection |
| `INO_CLOUD` | InoCloud |
| `KLUSTER` | Kluster |
| `LAMBDA` | Lambda |
| `LIQUID` | Liquid |
| `MANCER_2` | Mancer 2 |
| `META` | Meta |
| `MINIMAX` | Minimax |
| `MISTRAL` | Mistral |
| `MOONSHOT_AI` | Moonshot AI |
| `MORPH` | Morph |
| `N_COMPASS` | NCompass |
| `NEBIUS` | Nebius |
| `NEXT_BIT` | NextBit |
| `NINETEEN` | Nineteen |
| `NOVITA` | Novita |
| `OPEN_AI` | OpenAI |
| `OPEN_INFERENCE` | OpenInference |
| `PARASAIL` | Parasail |
| `PERPLEXITY` | Perplexity |
| `PHALA` | Phala |
| `SAMBA_NOVA` | SambaNova |
| `STEALTH` | Stealth |
| `SWITCHPOINT` | Switchpoint |
| `TARGON` | Targon |
| `TOGETHER` | Together |
| `UBICLOUD` | Ubicloud |
| `VENICE` | Venice |
| `WAND_B` | WandB |
| `X_AI` | xAI |
| `Z_AI` | Z.AI |
@@ -0,0 +1,17 @@
# ChatCompletionCreateParamsOrderUnion
## Supported Types
### `models.ChatCompletionCreateParamsOrderEnum`
```python
value: models.ChatCompletionCreateParamsOrderEnum = /* values here */
```
### `str`
```python
value: str = /* values here */
```
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsPdf
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `engine` | [Optional[models.ChatCompletionCreateParamsPdfEngine]](../models/chatcompletioncreateparamspdfengine.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,10 @@
# ChatCompletionCreateParamsPdfEngine
## Values
| Name | Value |
| ------------- | ------------- |
| `MISTRAL_OCR` | mistral-ocr |
| `PDF_TEXT` | pdf-text |
| `NATIVE` | native |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsPluginChainOfThought
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| `id` | [models.ChatCompletionCreateParamsIDChainOfThought](../models/chatcompletioncreateparamsidchainofthought.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,10 @@
# ChatCompletionCreateParamsPluginFileParser
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `id` | [models.ChatCompletionCreateParamsIDFileParser](../models/chatcompletioncreateparamsidfileparser.md) | :heavy_check_mark: | N/A |
| `max_files` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `pdf` | [Optional[models.ChatCompletionCreateParamsPdf]](../models/chatcompletioncreateparamspdf.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsPluginModeration
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| `id` | [models.ChatCompletionCreateParamsIDModeration](../models/chatcompletioncreateparamsidmoderation.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,29 @@
# ChatCompletionCreateParamsPluginUnion
## Supported Types
### `models.ChatCompletionCreateParamsPluginModeration`
```python
value: models.ChatCompletionCreateParamsPluginModeration = /* values here */
```
### `models.ChatCompletionCreateParamsPluginWeb`
```python
value: models.ChatCompletionCreateParamsPluginWeb = /* values here */
```
### `models.ChatCompletionCreateParamsPluginChainOfThought`
```python
value: models.ChatCompletionCreateParamsPluginChainOfThought = /* values here */
```
### `models.ChatCompletionCreateParamsPluginFileParser`
```python
value: models.ChatCompletionCreateParamsPluginFileParser = /* values here */
```
@@ -0,0 +1,11 @@
# ChatCompletionCreateParamsPluginWeb
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `id` | [models.ChatCompletionCreateParamsIDWeb](../models/chatcompletioncreateparamsidweb.md) | :heavy_check_mark: | N/A |
| `max_results` | *Optional[float]* | :heavy_minus_sign: | N/A |
| `search_prompt` | *Optional[str]* | :heavy_minus_sign: | N/A |
| `engine` | [Optional[models.ChatCompletionCreateParamsEngine]](../models/chatcompletioncreateparamsengine.md) | :heavy_minus_sign: | N/A |
@@ -0,0 +1,23 @@
# ChatCompletionCreateParamsPrompt
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,18 @@
# ChatCompletionCreateParamsProvider
When multiple model providers are available, optionally indicate your routing preference.
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allow_fallbacks` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to allow backup providers to serve requests<br/>- true: (default) when the primary provider (or your custom providers in "order") is unavailable, use the next best provider.<br/>- false: use only the primary/custom provider, and return the upstream error if it's unavailable.<br/> |
| `require_parameters` | *OptionalNullable[bool]* | :heavy_minus_sign: | Whether to filter providers to only those that support the parameters you've provided. If this setting is omitted or set to false, then providers will receive only the parameters they support, and ignore the rest. |
| `data_collection` | [OptionalNullable[models.ChatCompletionCreateParamsDataCollection]](../models/chatcompletioncreateparamsdatacollection.md) | :heavy_minus_sign: | Data collection setting. If no available model provider meets the requirement, your request will return an error.<br/>- allow: (default) allow providers which store user data non-transiently and may train on it<br/>- deny: use only providers which do not collect user data.<br/> |
| `order` | List[[models.ChatCompletionCreateParamsOrderUnion](../models/chatcompletioncreateparamsorderunion.md)] | :heavy_minus_sign: | An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message. |
| `only` | List[[models.ChatCompletionCreateParamsOnlyUnion](../models/chatcompletioncreateparamsonlyunion.md)] | :heavy_minus_sign: | List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request. |
| `ignore` | List[[models.ChatCompletionCreateParamsIgnoreUnion](../models/chatcompletioncreateparamsignoreunion.md)] | :heavy_minus_sign: | List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request. |
| `quantizations` | List[[models.ChatCompletionCreateParamsQuantization](../models/chatcompletioncreateparamsquantization.md)] | :heavy_minus_sign: | A list of quantization levels to filter the provider by. |
| `sort` | [OptionalNullable[models.ChatCompletionCreateParamsSort]](../models/chatcompletioncreateparamssort.md) | :heavy_minus_sign: | The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed. |
| `max_price` | [Optional[models.ChatCompletionCreateParamsMaxPrice]](../models/chatcompletioncreateparamsmaxprice.md) | :heavy_minus_sign: | The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion. |
@@ -0,0 +1,16 @@
# ChatCompletionCreateParamsQuantization
## Values
| Name | Value |
| --------- | --------- |
| `INT4` | int4 |
| `INT8` | int8 |
| `FP4` | fp4 |
| `FP6` | fp6 |
| `FP8` | fp8 |
| `FP16` | fp16 |
| `BF16` | bf16 |
| `FP32` | fp32 |
| `UNKNOWN` | unknown |
@@ -0,0 +1,13 @@
# ChatCompletionCreateParamsReasoning
Reasoning configuration
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `enabled` | *Optional[bool]* | :heavy_minus_sign: | Enables reasoning with default settings. Only work for some models. |
| `effort` | [OptionalNullable[models.ChatCompletionCreateParamsEffort]](../models/chatcompletioncreateparamseffort.md) | :heavy_minus_sign: | OpenAI-style reasoning effort setting |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | non-OpenAI-style reasoning effort setting |
| `exclude` | *Optional[bool]* | :heavy_minus_sign: | N/A |
@@ -0,0 +1,13 @@
# ChatCompletionCreateParamsReasoningEffort
Reasoning effort
## Values
| Name | Value |
| --------- | --------- |
| `HIGH` | high |
| `MEDIUM` | medium |
| `LOW` | low |
| `MINIMAL` | minimal |
@@ -0,0 +1,23 @@
# ChatCompletionCreateParamsRequest
## Supported Types
### `float`
```python
value: float = /* values here */
```
### `str`
```python
value: str = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,11 @@
# ChatCompletionCreateParamsResponseFormatGrammar
Custom grammar response format
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionCreateParamsTypeGrammar](../models/chatcompletioncreateparamstypegrammar.md) | :heavy_check_mark: | N/A |
| `grammar` | *str* | :heavy_check_mark: | Custom grammar for text generation |
@@ -0,0 +1,10 @@
# ChatCompletionCreateParamsResponseFormatJSONObject
JSON object response format
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionCreateParamsTypeJSONObject](../models/chatcompletioncreateparamstypejsonobject.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,11 @@
# ChatCompletionCreateParamsResponseFormatJSONSchema
JSON Schema response format for structured outputs
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionCreateParamsTypeJSONSchema](../models/chatcompletioncreateparamstypejsonschema.md) | :heavy_check_mark: | N/A |
| `json_schema` | [models.ChatCompletionCreateParamsJSONSchema](../models/chatcompletioncreateparamsjsonschema.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,10 @@
# ChatCompletionCreateParamsResponseFormatPython
Python code response format
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| `type` | [models.ChatCompletionCreateParamsTypePython](../models/chatcompletioncreateparamstypepython.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,10 @@
# ChatCompletionCreateParamsResponseFormatText
Default text response format
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionCreateParamsTypeText](../models/chatcompletioncreateparamstypetext.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,37 @@
# ChatCompletionCreateParamsResponseFormatUnion
Response format configuration
## Supported Types
### `models.ChatCompletionCreateParamsResponseFormatText`
```python
value: models.ChatCompletionCreateParamsResponseFormatText = /* values here */
```
### `models.ChatCompletionCreateParamsResponseFormatJSONObject`
```python
value: models.ChatCompletionCreateParamsResponseFormatJSONObject = /* values here */
```
### `models.ChatCompletionCreateParamsResponseFormatJSONSchema`
```python
value: models.ChatCompletionCreateParamsResponseFormatJSONSchema = /* values here */
```
### `models.ChatCompletionCreateParamsResponseFormatGrammar`
```python
value: models.ChatCompletionCreateParamsResponseFormatGrammar = /* values here */
```
### `models.ChatCompletionCreateParamsResponseFormatPython`
```python
value: models.ChatCompletionCreateParamsResponseFormatPython = /* values here */
```
@@ -0,0 +1,12 @@
# ChatCompletionCreateParamsSort
The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
## Values
| Name | Value |
| ------------ | ------------ |
| `PRICE` | price |
| `THROUGHPUT` | throughput |
| `LATENCY` | latency |
@@ -0,0 +1,25 @@
# ChatCompletionCreateParamsStop
Stop sequences (up to 4)
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[str]`
```python
value: List[str] = /* values here */
```
### `Any`
```python
value: Any = /* values here */
```
@@ -0,0 +1,10 @@
# ChatCompletionCreateParamsStreamOptions
Streaming configuration options
## Fields
| Field | Type | Required | Description |
| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- |
| `include_usage` | *Optional[bool]* | :heavy_minus_sign: | Include usage information in streaming response |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsTypeGrammar
## Values
| Name | Value |
| --------- | --------- |
| `GRAMMAR` | grammar |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsTypeJSONObject
## Values
| Name | Value |
| ------------- | ------------- |
| `JSON_OBJECT` | json_object |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsTypeJSONSchema
## Values
| Name | Value |
| ------------- | ------------- |
| `JSON_SCHEMA` | json_schema |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsTypePython
## Values
| Name | Value |
| -------- | -------- |
| `PYTHON` | python |
@@ -0,0 +1,8 @@
# ChatCompletionCreateParamsTypeText
## Values
| Name | Value |
| ------ | ------ |
| `TEXT` | text |
+16
View File
@@ -0,0 +1,16 @@
# ChatCompletionMessage
Assistant message in completion response
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `role` | [models.ChatCompletionMessageRole](../models/chatcompletionmessagerole.md) | :heavy_check_mark: | N/A |
| `content` | *Nullable[str]* | :heavy_check_mark: | Message content |
| `reasoning` | *OptionalNullable[str]* | :heavy_minus_sign: | Reasoning output |
| `refusal` | *Nullable[str]* | :heavy_check_mark: | Refusal message if content was refused |
| `tool_calls` | List[[models.ChatCompletionMessageToolCall](../models/chatcompletionmessagetoolcall.md)] | :heavy_minus_sign: | Tool calls made by the assistant |
| `reasoning_details` | List[[models.ReasoningDetail](../models/reasoningdetail.md)] | :heavy_minus_sign: | Reasoning details delta to send reasoning details back to upstream |
| `annotations` | List[[models.AnnotationDetail](../models/annotationdetail.md)] | :heavy_minus_sign: | Annotations delta to send annotations back to upstream |
+31
View File
@@ -0,0 +1,31 @@
# ChatCompletionMessageParam
Chat completion message with role-based discrimination
## Supported Types
### `models.ChatCompletionSystemMessageParam`
```python
value: models.ChatCompletionSystemMessageParam = /* values here */
```
### `models.ChatCompletionUserMessageParam`
```python
value: models.ChatCompletionUserMessageParam = /* values here */
```
### `models.ChatCompletionAssistantMessageParam`
```python
value: models.ChatCompletionAssistantMessageParam = /* values here */
```
### `models.ChatCompletionToolMessageParam`
```python
value: models.ChatCompletionToolMessageParam = /* values here */
```
+8
View File
@@ -0,0 +1,8 @@
# ChatCompletionMessageRole
## Values
| Name | Value |
| ----------- | ----------- |
| `ASSISTANT` | assistant |
@@ -0,0 +1,12 @@
# ChatCompletionMessageToolCall
Tool call made by the assistant
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `id` | *str* | :heavy_check_mark: | Tool call identifier |
| `type` | [models.ChatCompletionMessageToolCallType](../models/chatcompletionmessagetoolcalltype.md) | :heavy_check_mark: | N/A |
| `function` | [models.ChatCompletionMessageToolCallFunction](../models/chatcompletionmessagetoolcallfunction.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,9 @@
# ChatCompletionMessageToolCallFunction
## Fields
| Field | Type | Required | Description |
| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- |
| `name` | *str* | :heavy_check_mark: | Function name to call |
| `arguments` | *str* | :heavy_check_mark: | Function arguments as JSON string |
@@ -0,0 +1,8 @@
# ChatCompletionMessageToolCallType
## Values
| Name | Value |
| ---------- | ---------- |
| `FUNCTION` | function |
@@ -0,0 +1,11 @@
# ChatCompletionNamedToolChoice
Named tool choice for specific function
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionNamedToolChoiceType](../models/chatcompletionnamedtoolchoicetype.md) | :heavy_check_mark: | N/A |
| `function` | [models.ChatCompletionNamedToolChoiceFunction](../models/chatcompletionnamedtoolchoicefunction.md) | :heavy_check_mark: | N/A |
@@ -0,0 +1,8 @@
# ChatCompletionNamedToolChoiceFunction
## Fields
| Field | Type | Required | Description |
| --------------------- | --------------------- | --------------------- | --------------------- |
| `name` | *str* | :heavy_check_mark: | Function name to call |
@@ -0,0 +1,8 @@
# ChatCompletionNamedToolChoiceType
## Values
| Name | Value |
| ---------- | ---------- |
| `FUNCTION` | function |
+8
View File
@@ -0,0 +1,8 @@
# ChatCompletionObject
## Values
| Name | Value |
| ----------------- | ----------------- |
| `CHAT_COMPLETION` | chat.completion |
@@ -0,0 +1,12 @@
# ChatCompletionSystemMessageParam
System message for setting behavior
## Fields
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ |
| `role` | [models.ChatCompletionSystemMessageParamRole](../models/chatcompletionsystemmessageparamrole.md) | :heavy_check_mark: | N/A |
| `content` | [models.ChatCompletionSystemMessageParamContent](../models/chatcompletionsystemmessageparamcontent.md) | :heavy_check_mark: | System message content |
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the system message |
@@ -0,0 +1,19 @@
# ChatCompletionSystemMessageParamContent
System message content
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[models.ChatCompletionContentPartText]`
```python
value: List[models.ChatCompletionContentPartText] = /* values here */
```
@@ -0,0 +1,8 @@
# ChatCompletionSystemMessageParamRole
## Values
| Name | Value |
| -------- | -------- |
| `SYSTEM` | system |
+13
View File
@@ -0,0 +1,13 @@
# ChatCompletionTokenLogprob
Token log probability information
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- |
| `token` | *str* | :heavy_check_mark: | The token |
| `logprob` | *float* | :heavy_check_mark: | Log probability of the token |
| `bytes_` | List[*float*] | :heavy_check_mark: | UTF-8 bytes of the token |
| `top_logprobs` | List[[models.TopLogprob](../models/toplogprob.md)] | :heavy_check_mark: | Top alternative tokens with probabilities |
@@ -0,0 +1,11 @@
# ChatCompletionTokenLogprobs
Log probabilities for the completion
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `content` | List[[models.ChatCompletionTokenLogprob](../models/chatcompletiontokenlogprob.md)] | :heavy_check_mark: | Log probabilities for content tokens |
| `refusal` | List[[models.ChatCompletionTokenLogprob](../models/chatcompletiontokenlogprob.md)] | :heavy_check_mark: | Log probabilities for refusal tokens |
+11
View File
@@ -0,0 +1,11 @@
# ChatCompletionTool
Tool definition for function calling
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| `type` | [models.ChatCompletionToolType](../models/chatcompletiontooltype.md) | :heavy_check_mark: | N/A |
| `function` | [models.ChatCompletionToolFunction](../models/chatcompletiontoolfunction.md) | :heavy_check_mark: | Function definition for tool calling |
@@ -0,0 +1,31 @@
# ChatCompletionToolChoiceOption
Tool choice configuration
## Supported Types
### `models.ChatCompletionToolChoiceOptionNone`
```python
value: models.ChatCompletionToolChoiceOptionNone = /* values here */
```
### `models.ChatCompletionToolChoiceOptionAuto`
```python
value: models.ChatCompletionToolChoiceOptionAuto = /* values here */
```
### `models.ChatCompletionToolChoiceOptionRequired`
```python
value: models.ChatCompletionToolChoiceOptionRequired = /* values here */
```
### `models.ChatCompletionNamedToolChoice`
```python
value: models.ChatCompletionNamedToolChoice = /* values here */
```
@@ -0,0 +1,8 @@
# ChatCompletionToolChoiceOptionAuto
## Values
| Name | Value |
| ------ | ------ |
| `AUTO` | auto |
@@ -0,0 +1,8 @@
# ChatCompletionToolChoiceOptionNone
## Values
| Name | Value |
| ------ | ------ |
| `NONE` | none |
@@ -0,0 +1,8 @@
# ChatCompletionToolChoiceOptionRequired
## Values
| Name | Value |
| ---------- | ---------- |
| `REQUIRED` | required |
+13
View File
@@ -0,0 +1,13 @@
# ChatCompletionToolFunction
Function definition for tool calling
## Fields
| Field | Type | Required | Description |
| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- |
| `name` | *str* | :heavy_check_mark: | Function name (a-z, A-Z, 0-9, underscores, dashes, max 64 chars) |
| `description` | *Optional[str]* | :heavy_minus_sign: | Function description for the model |
| `parameters` | [Optional[models.Parameters]](../models/parameters.md) | :heavy_minus_sign: | Function parameters as JSON Schema object |
| `strict` | *OptionalNullable[bool]* | :heavy_minus_sign: | Enable strict schema adherence |
@@ -0,0 +1,12 @@
# ChatCompletionToolMessageParam
Tool response message
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `role` | [models.ChatCompletionToolMessageParamRole](../models/chatcompletiontoolmessageparamrole.md) | :heavy_check_mark: | N/A |
| `content` | [models.ChatCompletionToolMessageParamContent](../models/chatcompletiontoolmessageparamcontent.md) | :heavy_check_mark: | Tool response content |
| `tool_call_id` | *str* | :heavy_check_mark: | ID of the tool call this message responds to |
@@ -0,0 +1,19 @@
# ChatCompletionToolMessageParamContent
Tool response content
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[models.ChatCompletionContentPart]`
```python
value: List[models.ChatCompletionContentPart] = /* values here */
```
@@ -0,0 +1,8 @@
# ChatCompletionToolMessageParamRole
## Values
| Name | Value |
| ------ | ------ |
| `TOOL` | tool |
+8
View File
@@ -0,0 +1,8 @@
# ChatCompletionToolType
## Values
| Name | Value |
| ---------- | ---------- |
| `FUNCTION` | function |
@@ -0,0 +1,12 @@
# ChatCompletionUserMessageParam
User message
## Fields
| Field | Type | Required | Description |
| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `role` | [models.ChatCompletionUserMessageParamRole](../models/chatcompletionusermessageparamrole.md) | :heavy_check_mark: | N/A |
| `content` | [models.ChatCompletionUserMessageParamContent](../models/chatcompletionusermessageparamcontent.md) | :heavy_check_mark: | User message content |
| `name` | *Optional[str]* | :heavy_minus_sign: | Optional name for the user |
@@ -0,0 +1,19 @@
# ChatCompletionUserMessageParamContent
User message content
## Supported Types
### `str`
```python
value: str = /* values here */
```
### `List[models.ChatCompletionContentPart]`
```python
value: List[models.ChatCompletionContentPart] = /* values here */
```
@@ -0,0 +1,8 @@
# ChatCompletionUserMessageParamRole
## Values
| Name | Value |
| ------ | ------ |
| `USER` | user |
@@ -0,0 +1,34 @@
# ChatStreamCompletionCreateParams
Chat completion request parameters
## Fields
| Field | Type | Required | Description | Example |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `messages` | List[[models.ChatCompletionMessageParam](../models/chatcompletionmessageparam.md)] | :heavy_check_mark: | List of messages for the conversation | [<br/>{<br/>"role": "user",<br/>"content": "Hello, how are you?"<br/>}<br/>] |
| `model` | *Optional[str]* | :heavy_minus_sign: | Model to use for completion | |
| `frequency_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Frequency penalty (-2.0 to 2.0) | |
| `logit_bias` | Dict[str, *float*] | :heavy_minus_sign: | Token logit bias adjustments | |
| `logprobs` | *OptionalNullable[bool]* | :heavy_minus_sign: | Return log probabilities | |
| `top_logprobs` | *OptionalNullable[float]* | :heavy_minus_sign: | Number of top log probabilities to return (0-20) | |
| `max_completion_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens in completion | |
| `max_tokens` | *OptionalNullable[float]* | :heavy_minus_sign: | Maximum tokens (deprecated, use max_completion_tokens) | |
| `metadata` | Dict[str, *str*] | :heavy_minus_sign: | Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values) | |
| `presence_penalty` | *OptionalNullable[float]* | :heavy_minus_sign: | Presence penalty (-2.0 to 2.0) | |
| `reasoning` | [OptionalNullable[models.ChatStreamCompletionCreateParamsReasoning]](../models/chatstreamcompletioncreateparamsreasoning.md) | :heavy_minus_sign: | Reasoning configuration | |
| `response_format` | [Optional[models.ChatStreamCompletionCreateParamsResponseFormatUnion]](../models/chatstreamcompletioncreateparamsresponseformatunion.md) | :heavy_minus_sign: | Response format configuration | |
| `seed` | *OptionalNullable[int]* | :heavy_minus_sign: | Random seed for deterministic outputs | |
| `stop` | [OptionalNullable[models.ChatStreamCompletionCreateParamsStop]](../models/chatstreamcompletioncreateparamsstop.md) | :heavy_minus_sign: | Stop sequences (up to 4) | |
| `stream` | *Optional[bool]* | :heavy_minus_sign: | Enable streaming response | |
| `stream_options` | [OptionalNullable[models.ChatStreamCompletionCreateParamsStreamOptions]](../models/chatstreamcompletioncreateparamsstreamoptions.md) | :heavy_minus_sign: | N/A | |
| `temperature` | *OptionalNullable[float]* | :heavy_minus_sign: | Sampling temperature (0-2) | |
| `tool_choice` | [Optional[models.ChatCompletionToolChoiceOption]](../models/chatcompletiontoolchoiceoption.md) | :heavy_minus_sign: | Tool choice configuration | |
| `tools` | List[[models.ChatCompletionTool](../models/chatcompletiontool.md)] | :heavy_minus_sign: | Available tools for function calling | |
| `top_p` | *OptionalNullable[float]* | :heavy_minus_sign: | Nucleus sampling parameter (0-1) | |
| `user` | *Optional[str]* | :heavy_minus_sign: | Unique user identifier | |
| `models_llm` | List[*str*] | :heavy_minus_sign: | Order of models to fallback to for this request | |
| `reasoning_effort` | [OptionalNullable[models.ChatStreamCompletionCreateParamsReasoningEffort]](../models/chatstreamcompletioncreateparamsreasoningeffort.md) | :heavy_minus_sign: | Reasoning effort | |
| `provider` | [OptionalNullable[models.ChatStreamCompletionCreateParamsProvider]](../models/chatstreamcompletioncreateparamsprovider.md) | :heavy_minus_sign: | When multiple model providers are available, optionally indicate your routing preference. | |
| `plugins` | List[[models.ChatStreamCompletionCreateParamsPluginUnion](../models/chatstreamcompletioncreateparamspluginunion.md)] | :heavy_minus_sign: | Plugins you want to enable for this request, including their settings. | |

Some files were not shown because too many files have changed in this diff Show More