28e53d90fc
- 统一 OpenAI 兼容 /v1 中继 + 渠道/额度/令牌/流水 - 各领域包:relay 模型网关、model 数据层、controller 管理 API
68 lines
1.3 KiB
JSON
68 lines
1.3 KiB
JSON
{
|
|
"model": "claude-test",
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"content": "You are a helpful assistant."
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "What is in this image?"
|
|
},
|
|
{
|
|
"type": "image_url",
|
|
"image_url": {
|
|
"url": "data:image/png;base64,aGVsbG8=",
|
|
"MimeType": ""
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "assistant",
|
|
"content": null,
|
|
"tool_calls": [
|
|
{
|
|
"id": "toolu_abc",
|
|
"type": "function",
|
|
"function": {
|
|
"name": "get_weather",
|
|
"arguments": "{\"city\":\"Paris\"}"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "tool",
|
|
"content": "15 degrees",
|
|
"name": "get_weather",
|
|
"tool_call_id": "toolu_abc"
|
|
}
|
|
],
|
|
"stream": true,
|
|
"max_tokens": 1024,
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"description": "Get weather by city",
|
|
"name": "get_weather",
|
|
"parameters": {
|
|
"properties": {
|
|
"city": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"city"
|
|
],
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|