Files
anyllm-proxy/fixtures/openai/chat_completion_tool_call.json
whit3rabbitandClaude Opus 4.6 f2e3ed15f4 Initial commit: Anthropic-to-OpenAI API translation proxy
Rust workspace with two crates:
- translator: pure, IO-free mapping between Anthropic Messages API and OpenAI Chat Completions
- proxy: axum HTTP server with auth, streaming SSE, retry/backoff, concurrency limits

169 tests passing (unit, golden fixture, integration).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:25:43 -05:00

53 lines
1.2 KiB
JSON

{
"request": {
"model": "gpt-5.4",
"messages": [
{ "role": "user", "content": "What is the S&P 500 at today?" }
],
"tools": [
{
"type": "function",
"function": {
"name": "get_stock_price",
"description": "Get the latest price for an index or ticker.",
"parameters": {
"type": "object",
"properties": { "ticker": { "type": "string" } },
"required": ["ticker"]
}
}
}
],
"tool_choice": "required"
},
"response": {
"id": "chatcmpl-def456",
"object": "chat.completion",
"model": "gpt-5.4",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"tool_calls": [
{
"id": "call_xyz789",
"type": "function",
"function": {
"name": "get_stock_price",
"arguments": "{\"ticker\":\"^GSPC\"}"
}
}
]
},
"finish_reason": "tool_calls"
}
],
"usage": {
"prompt_tokens": 50,
"completion_tokens": 15,
"total_tokens": 65
}
}
}