機能

ツール呼び出し

モデルにあなたの関数を呼ばせる。

tools に関数を宣言すると、モデルが必要に応じて tool_calls を返します。実行結果を role: tool で返してください。

-d '{"model":"waffo.seed-2-0-mini-260428",
     "messages":[{"role":"user","content":"东京明天天气?"}],
     "tools":[{"type":"function","function":{"name":"get_weather",
       "parameters":{"type":"object","properties":{"city":{"type":"string"}},"required":["city"]}}}]}'
ツール対応モデルはモデル一覧に tools タグが付いています。