completion
Generate text by sending a model and prompt to LiteLLM's legacy endpoint, with options for streaming, token limits, and temperature.
Instructions
Generate text completions (legacy endpoint) using LiteLLM.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>",
"prompt": "<prompt>"
},
"name": "completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | The model to use | |
| prompt | Yes | The prompt to generate completions for | |
| stream | No | Whether to stream the response | |
| max_tokens | No | Maximum tokens to generate | |
| temperature | No | Sampling temperature (0-2) |