28e53d90fc
- 统一 OpenAI 兼容 /v1 中继 + 渠道/额度/令牌/流水 - 各领域包:relay 模型网关、model 数据层、controller 管理 API
182 lines
4.5 KiB
JSON
182 lines
4.5 KiB
JSON
{
|
|
"events": [
|
|
{
|
|
"id": "msg_fixed",
|
|
"object": "chat.completion.chunk",
|
|
"created": 0,
|
|
"model": "claude-test",
|
|
"system_fingerprint": null,
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": "",
|
|
"role": "assistant"
|
|
},
|
|
"logprobs": null,
|
|
"finish_reason": null,
|
|
"index": 0
|
|
}
|
|
],
|
|
"usage": {
|
|
"prompt_tokens": 4,
|
|
"completion_tokens": 0,
|
|
"total_tokens": 4,
|
|
"usage_semantic": "openai",
|
|
"usage_source": "anthropic",
|
|
"billing_usage": {
|
|
"source": "claude_messages",
|
|
"semantic": "anthropic",
|
|
"claude_usage": {
|
|
"input_tokens": 4,
|
|
"cache_creation_input_tokens": 0,
|
|
"cache_read_input_tokens": 0,
|
|
"output_tokens": 0,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
},
|
|
"prompt_tokens_details": {
|
|
"cached_tokens": 0,
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0
|
|
},
|
|
"completion_tokens_details": {
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0,
|
|
"reasoning_tokens": 0
|
|
},
|
|
"input_tokens": 4,
|
|
"output_tokens": 0,
|
|
"input_tokens_details": null,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
},
|
|
{
|
|
"id": "",
|
|
"object": "chat.completion.chunk",
|
|
"created": 0,
|
|
"model": "",
|
|
"system_fingerprint": null,
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": ""
|
|
},
|
|
"logprobs": null,
|
|
"finish_reason": null,
|
|
"index": 0
|
|
}
|
|
],
|
|
"usage": null
|
|
},
|
|
{
|
|
"id": "",
|
|
"object": "chat.completion.chunk",
|
|
"created": 0,
|
|
"model": "",
|
|
"system_fingerprint": null,
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": "Hello world"
|
|
},
|
|
"logprobs": null,
|
|
"finish_reason": null,
|
|
"index": 0
|
|
}
|
|
],
|
|
"usage": null
|
|
},
|
|
{
|
|
"id": "",
|
|
"object": "chat.completion.chunk",
|
|
"created": 0,
|
|
"model": "",
|
|
"system_fingerprint": null,
|
|
"choices": [
|
|
{
|
|
"delta": {},
|
|
"logprobs": null,
|
|
"finish_reason": "stop",
|
|
"index": 0
|
|
}
|
|
],
|
|
"usage": {
|
|
"prompt_tokens": 0,
|
|
"completion_tokens": 2,
|
|
"total_tokens": 2,
|
|
"usage_semantic": "openai",
|
|
"usage_source": "anthropic",
|
|
"billing_usage": {
|
|
"source": "claude_messages",
|
|
"semantic": "anthropic",
|
|
"claude_usage": {
|
|
"input_tokens": 0,
|
|
"cache_creation_input_tokens": 0,
|
|
"cache_read_input_tokens": 0,
|
|
"output_tokens": 2,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
},
|
|
"prompt_tokens_details": {
|
|
"cached_tokens": 0,
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0
|
|
},
|
|
"completion_tokens_details": {
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0,
|
|
"reasoning_tokens": 0
|
|
},
|
|
"input_tokens": 0,
|
|
"output_tokens": 0,
|
|
"input_tokens_details": null,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
}
|
|
],
|
|
"usage": {
|
|
"prompt_tokens": 0,
|
|
"completion_tokens": 2,
|
|
"total_tokens": 2,
|
|
"usage_semantic": "openai",
|
|
"usage_source": "anthropic",
|
|
"billing_usage": {
|
|
"source": "claude_messages",
|
|
"semantic": "anthropic",
|
|
"claude_usage": {
|
|
"input_tokens": 0,
|
|
"cache_creation_input_tokens": 0,
|
|
"cache_read_input_tokens": 0,
|
|
"output_tokens": 2,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
},
|
|
"prompt_tokens_details": {
|
|
"cached_tokens": 0,
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0
|
|
},
|
|
"completion_tokens_details": {
|
|
"text_tokens": 0,
|
|
"audio_tokens": 0,
|
|
"image_tokens": 0,
|
|
"reasoning_tokens": 0
|
|
},
|
|
"input_tokens": 0,
|
|
"output_tokens": 0,
|
|
"input_tokens_details": null,
|
|
"claude_cache_creation_5_m_tokens": 0,
|
|
"claude_cache_creation_1_h_tokens": 0
|
|
}
|
|
}
|