chat_completion
Generate chat completions with any model in your LiteLLM instance, using configurable parameters for temperature, top_p, max_tokens, and streaming.
Instructions
Generate chat completions using LiteLLM. Supports all models available in your LiteLLM instance.
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>",
"messages": "<messages>"
},
"name": "chat_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | The model to use (e.g., gpt-4, claude-3-opus, etc.) | |
| top_p | No | Nucleus sampling parameter | |
| stream | No | Whether to stream the response | |
| messages | Yes | Array of message objects with role and content | |
| max_tokens | No | Maximum tokens to generate | |
| temperature | No | Sampling temperature (0-2) |