-
-
Notifications
You must be signed in to change notification settings - Fork 813
Open
Labels
feature request ✨Feature RequestFeature Request
Description
需求/建议描述
根据 gemini 官方示例附加generationConfig后请求失败
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
"contents": [
{
"parts": [
{
"text": "Provide a list of 3 famous physicists and their key contributions"
}
]
}
],
"generationConfig": {
"thinkingConfig": {
"thinkingBudget": 1024
# Thinking off:
# "thinkingBudget": 0
# Turn on dynamic thinking:
# "thinkingBudget": -1
}
}
}'
提示
[ {
"error" : {
"code" : 400,
"message" : "Invalid JSON payload received. Unknown name \"generationConfig\": Cannot find field.",
"status" : "INVALID_ARGUMENT",
"details" : [ {
"@type" : "type.googleapis.com/google.rpc.BadRequest",
"fieldViolations" : [ {
"description" : "Invalid JSON payload received. Unknown name \"generationConfig\": Cannot find field."
} ]
} ]
}
} ]
建议的解决方案
添加gemini专属
附加信息
No response
Metadata
Metadata
Assignees
Labels
feature request ✨Feature RequestFeature Request