最近我們增強了Gemini API的相容性,支援了更加完整的Function Call以及API相容性:
-
chat/completions-
messages-
content -
role- "system" (=>
system_instruction) - "user"
- "assistant"
- "tool"
- "system" (=>
-
tool_calls
-
-
model -
frequency_penalty -
logit_bias -
logprobs -
top_logprobs -
max_tokens,max_completion_tokens -
n(candidateCount<8, not for streaming) -
presence_penalty -
reasoning_effort -
response_format- "json_object"
- "json_schema" (a select subset of an OpenAPI 3.0 schema object)
- "text"
-
seed -
stop: string|array (stopSequences[1,5]) -
stream -
stream_options-
include_usage
-
-
temperature(0.0..2.0 for OpenAI, but Gemini supports up to infinity) -
top_p -
tools -
tool_choice -
parallel_tool_calls(is always active in Gemini) -
extra_body
-
更詳細的範例和文件將在後續補充和發布。