togetherai_chat_completion
Run chat completions with Together AI models, supporting Llama, Mistral, Qwen and 100+ open-source models. Control generation with temperature, tokens, and stop sequences.
Instructions
Run a chat completion with any Together AI model. Supports Llama, Mistral, Qwen, and 100+ open-source models.
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": {
"api_key": "<api_key>",
"model": "<model>",
"messages": "<messages>"
},
"name": "togetherai_chat_completion"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stop | No | Stop sequences | |
| model | Yes | Model ID (e.g. meta-llama/Llama-3-8b-chat-hf). Use togetherai_list_models to browse. | |
| top_k | No | Top-k sampling | |
| top_p | No | Top-p nucleus sampling | |
| api_key | Yes | Together AI API key | |
| messages | Yes | Array of {role, content} message objects | |
| max_tokens | No | Maximum tokens to generate | |
| temperature | No | Sampling temperature 0-2 (default 0.7) |