CompletionArgs
March 20, 2026 ยท View on GitHub
White-listed arguments from the completion API
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
stop | OptionalNullable[models.CompletionArgsStop] | :heavy_minus_sign: | N/A | |
presence_penalty | OptionalNullable[float] | :heavy_minus_sign: | N/A | |
frequency_penalty | OptionalNullable[float] | :heavy_minus_sign: | N/A | |
temperature | OptionalNullable[float] | :heavy_minus_sign: | N/A | |
top_p | OptionalNullable[float] | :heavy_minus_sign: | N/A | |
max_tokens | OptionalNullable[int] | :heavy_minus_sign: | N/A | |
random_seed | OptionalNullable[int] | :heavy_minus_sign: | N/A | |
prediction | OptionalNullable[models.Prediction] | :heavy_minus_sign: | N/A | |
response_format | OptionalNullable[models.ResponseFormat] | :heavy_minus_sign: | N/A | Example 1: { "type": "text" } Example 2: { "type": "json_object" } Example 3: { "type": "json_schema", "json_schema": { "schema": { "properties": { "name": { "title": "Name", "type": "string" }, "authors": { "items": { "type": "string" }, "title": "Authors", "type": "array" } }, "required": [ "name", "authors" ], "title": "Book", "type": "object", "additionalProperties": false }, "name": "book", "strict": true } } |
tool_choice | Optional[models.ToolChoiceEnum] | :heavy_minus_sign: | N/A | |
reasoning_effort | OptionalNullable[models.ReasoningEffort] | :heavy_minus_sign: | N/A |