How do I send a tool's result back?
After the model's reply with tool_calls:
- Append that assistant message (with its
tool_calls) tomessages. - For each call, append:
{"role": "tool", "tool_call_id": "call_abc123", "content": "{\"status\": \"shipped\", \"eta\": \"Nov 5\"}"}
- Call the API again with the same
tools.
content is a string; JSON text is the usual choice. If the tool failed, say so in the content ("error: order not found") so the model can explain or try something else.
Good to know#
- Your key's account is responsible for your end users' text under the Abuse policy. What it means for apps
- New accounts get $5 of free credit; top up from $1 to $800 per purchase in Console › Billing › Credits. Billing
- Model ids:
supercosmos-flash,supercosmos-max,supercosmos-heavy(SuperCosmos 1.1). Which to call
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.