ai_chat
Send OpenAI-compatible chat completion requests to the Badgr API and receive replies with token usage; max_tokens is capped at 4096 and usage is metered.
Instructions
Call the Badgr AI API (OpenAI-compatible chat completion) and return the reply with token usage. max_tokens is capped at 4096 per call. Usage is metered.
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": "ai_chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model ID to call | |
| messages | Yes | ||
| max_tokens | No | ||
| temperature | No |