ollama_chat_completion
Generate OpenAI-compatible chat completions from local Ollama models by sending conversation messages, with optional temperature and timeout controls.
Instructions
OpenAI-compatible chat completion API
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": "ollama_chat_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Name of the Ollama model to use | |
| timeout | No | Timeout in milliseconds (default: 60000) | |
| messages | Yes | Array of messages in the conversation | |
| temperature | No | Sampling temperature (0-2) |