Hugging Face · Schema
TextGenerationRequest
Properties
| Name | Type | Description |
|---|---|---|
| inputs | string | The prompt text to generate from |
| parameters | object | |
| options | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/TextGenerationRequest",
"title": "TextGenerationRequest",
"type": "object",
"required": [
"inputs"
],
"properties": {
"inputs": {
"type": "string",
"description": "The prompt text to generate from",
"example": "The answer to the universe is"
},
"parameters": {
"type": "object",
"properties": {
"max_new_tokens": {
"type": "integer",
"description": "Maximum number of tokens to generate",
"example": 250
},
"temperature": {
"type": "number",
"format": "float",
"description": "Sampling temperature (0.0 to 100.0)",
"example": 1.0
},
"top_p": {
"type": "number",
"format": "float",
"description": "Nucleus sampling parameter",
"example": 0.95
},
"top_k": {
"type": "integer",
"description": "Top-k sampling parameter",
"example": 50
},
"repetition_penalty": {
"type": "number",
"format": "float",
"description": "Repetition penalty (1.0 means no penalty)",
"example": 1.0
},
"do_sample": {
"type": "boolean",
"description": "Whether to use sampling instead of greedy decoding",
"default": true
},
"return_full_text": {
"type": "boolean",
"description": "Whether to return the full text including the prompt",
"default": true
},
"stop": {
"type": "array",
"items": {
"type": "string"
},
"description": "Stop sequences to halt generation"
}
},
"example": "example_value"
},
"options": {
"type": "object",
"properties": {
"use_cache": {
"type": "boolean",
"default": true
},
"wait_for_model": {
"type": "boolean",
"default": false
}
},
"example": "example_value"
}
}
}