Files
compute-engine/relaykit/relayconvert/testdata/golden/response/gemini_to_openai.golden.json
T
Pine 28e53d90fc feat: 算力引擎 Go 后端核心(new-api)
- 统一 OpenAI 兼容 /v1 中继 + 渠道/额度/令牌/流水
- 各领域包:relay 模型网关、model 数据层、controller 管理 API
2026-08-23 22:38:46 +08:00

64 lines
1.5 KiB
JSON

{
"id": "chatcmpl-<uuid>",
"model": "upstream-model",
"object": "chat.completion",
"created": 0,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The answer is 42.",
"tool_calls": [
{
"id": "call_<uuid>",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"city\":\"Paris\"}"
}
}
]
},
"finish_reason": "tool_calls"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 7,
"total_tokens": 15,
"billing_usage": {
"source": "gemini_chat",
"semantic": "gemini",
"gemini_usage_metadata": {
"promptTokenCount": 10,
"toolUsePromptTokenCount": 0,
"candidatesTokenCount": 5,
"totalTokenCount": 15,
"thoughtsTokenCount": 2,
"cachedContentTokenCount": 0,
"promptTokensDetails": [],
"toolUsePromptTokensDetails": [],
"candidatesTokensDetails": []
}
},
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 10,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0,
"reasoning_tokens": 2
},
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": null,
"claude_cache_creation_5_m_tokens": 0,
"claude_cache_creation_1_h_tokens": 0
}
}