Documentation
¶
Index ¶
- Constants
- Variables
- func BuildGeminiGenerateContentRequestFromOpenAi(openaiBody map[string]any, modelName string) map[string]any
- func NormalizeRequest(body map[string]any, modelName string) map[string]any
- func ReasoningToThinkingConfig(effort string, budgetTokens int) map[string]any
- func ResolveGeminiThinkingConfigFromRequest(modelName string, body map[string]any) map[string]any
Constants ¶
const DummyThoughtSignature = "c2tpcF90aG91Z2h0X3NpZ25hdHVyZV92YWxpZGF0b3I="
DummyThoughtSignature is the base64 sentinel for "skip_thought_signature_validator". Gemini accepts any non-empty base64 string when a real thought signature is unavailable.
Variables ¶
var AllowedGeminiKeys = map[string]bool{ "contents": true, "systemInstruction": true, "cachedContent": true, "safetySettings": true, "generationConfig": true, "tools": true, "toolConfig": true, "labels": true, "model": true, }
AllowedGeminiKeys are the 9 keys forwarded to the Gemini API.
Functions ¶
func BuildGeminiGenerateContentRequestFromOpenAi ¶
func BuildGeminiGenerateContentRequestFromOpenAi(openaiBody map[string]any, modelName string) map[string]any
BuildGeminiGenerateContentRequestFromOpenAi converts an OpenAI body to Gemini format.
func NormalizeRequest ¶
NormalizeRequest filters and normalizes an incoming Gemini request body.
func ReasoningToThinkingConfig ¶
ReasoningToThinkingConfig converts OpenAI reasoning settings to Gemini thinkingConfig.
Types ¶
This section is empty.