Microsoft Azure · Schema
CreateCompletionRequest
Request body for creating a text completion.
API ManagementCloudCloud ComputingEnterpriseInfrastructure as a ServicePlatform as a ServiceT1
Properties
| Name | Type | Description |
|---|---|---|
| prompt | object | The prompt(s) to generate completions for. |
| max_tokens | integer | The maximum number of tokens that can be generated. |
| temperature | number | Sampling temperature to use. |
| top_p | number | Nucleus sampling parameter. |
| n | integer | How many completions to generate for each prompt. |
| stream | boolean | Whether to stream back partial progress. |
| stop | object | Up to 4 sequences where the API will stop generating further tokens. |
| presence_penalty | number | Penalizes new tokens based on whether they appear in the text so far. |
| frequency_penalty | number | Penalizes new tokens based on their existing frequency in the text. |
| user | string | A unique identifier representing your end-user. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/CreateCompletionRequest",
"title": "CreateCompletionRequest",
"type": "object",
"description": "Request body for creating a text completion.",
"properties": {
"prompt": {
"description": "The prompt(s) to generate completions for.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"example": "example_value"
},
"max_tokens": {
"type": "integer",
"default": 16,
"description": "The maximum number of tokens that can be generated.",
"example": 10
},
"temperature": {
"type": "number",
"default": 1,
"minimum": 0,
"maximum": 2,
"description": "Sampling temperature to use.",
"example": 42.5
},
"top_p": {
"type": "number",
"default": 1,
"minimum": 0,
"maximum": 1,
"description": "Nucleus sampling parameter.",
"example": 42.5
},
"n": {
"type": "integer",
"default": 1,
"minimum": 1,
"maximum": 128,
"description": "How many completions to generate for each prompt.",
"example": 10
},
"stream": {
"type": "boolean",
"default": false,
"description": "Whether to stream back partial progress.",
"example": true
},
"stop": {
"description": "Up to 4 sequences where the API will stop generating further tokens.",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
},
"maxItems": 4
}
],
"example": "example_value"
},
"presence_penalty": {
"type": "number",
"default": 0,
"minimum": -2,
"maximum": 2,
"description": "Penalizes new tokens based on whether they appear in the text so far.",
"example": 42.5
},
"frequency_penalty": {
"type": "number",
"default": 0,
"minimum": -2,
"maximum": 2,
"description": "Penalizes new tokens based on their existing frequency in the text.",
"example": 42.5
},
"user": {
"type": "string",
"description": "A unique identifier representing your end-user.",
"example": "example_value"
}
},
"required": [
"prompt"
]
}