28e53d90fc
- 统一 OpenAI 兼容 /v1 中继 + 渠道/额度/令牌/流水 - 各领域包:relay 模型网关、model 数据层、controller 管理 API
95 lines
1.7 KiB
JSON
95 lines
1.7 KiB
JSON
{
|
|
"contents": [
|
|
{
|
|
"role": "user",
|
|
"parts": [
|
|
{
|
|
"text": "What is in this image?"
|
|
},
|
|
{
|
|
"inlineData": {
|
|
"mimeType": "image/png",
|
|
"data": "aGVsbG8="
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "model",
|
|
"parts": [
|
|
{
|
|
"functionCall": {
|
|
"name": "get_weather",
|
|
"args": {
|
|
"city": "Paris"
|
|
}
|
|
},
|
|
"thoughtSignature": "context_engineering_is_the_way_to_go"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "user",
|
|
"parts": [
|
|
{
|
|
"functionResponse": {
|
|
"name": "get_weather",
|
|
"response": {
|
|
"content": "15 degrees"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"safetySettings": [
|
|
{
|
|
"category": "HARM_CATEGORY_HARASSMENT",
|
|
"threshold": "OFF"
|
|
},
|
|
{
|
|
"category": "HARM_CATEGORY_HATE_SPEECH",
|
|
"threshold": "OFF"
|
|
},
|
|
{
|
|
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
|
|
"threshold": "OFF"
|
|
},
|
|
{
|
|
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
|
|
"threshold": "OFF"
|
|
}
|
|
],
|
|
"generationConfig": {
|
|
"maxOutputTokens": 1024
|
|
},
|
|
"tools": [
|
|
{
|
|
"functionDeclarations": [
|
|
{
|
|
"description": "Get weather by city",
|
|
"name": "get_weather",
|
|
"parameters": {
|
|
"properties": {
|
|
"city": {
|
|
"type": "STRING"
|
|
}
|
|
},
|
|
"required": [
|
|
"city"
|
|
],
|
|
"type": "OBJECT"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"systemInstruction": {
|
|
"parts": [
|
|
{
|
|
"text": "You are a helpful assistant."
|
|
}
|
|
]
|
|
}
|
|
}
|