Documentation
¶
Index ¶
- Constants
- Variables
- func ResponseName(label string) string
- type GoogleCandidate
- type GoogleContent
- type GoogleFunctionCall
- type GoogleFunctionCallResp
- type GoogleFunctionCallingConfig
- type GoogleFunctionDeclaration
- type GoogleGenerateRequest
- type GoogleGenerateResponse
- type GoogleInlineData
- type GooglePart
- type GoogleTool
- type GoogleToolConfig
- type GoogleUsageMetadata
- type Model
- type OpenAIChatRequest
- type OpenAIChatResponse
- type OpenAIChoice
- type OpenAIFunction
- type OpenAIMessage
- type OpenAITool
- type OpenAIToolCall
- type OpenAIToolCallFunction
- type OpenAIUsage
- type Resolved
Constants ¶
const DefaultModelName = "gemini-3.5-flash-lite"
Anonymous upstream responses reported "3.5 Flash-Lite" (mode 6) for every tested chat selector. Expose that single route instead of invented versions.
const UnknownUpstreamModel = "gemini-web"
Variables ¶
var MODELS = map[string]Model{ DefaultModelName: {Mode: 6, Think: 4, Desc: "Gemini web chat; anonymous upstream metadata reported 3.5 Flash-Lite. Account routing can change."}, }
Functions ¶
func ResponseName ¶
ResponseName uses the model label from upstream metadata, never model prose or the name requested by the caller. Missing metadata stays explicitly unknown.
Types ¶
type GoogleCandidate ¶
type GoogleCandidate struct {
Index int `json:"index"`
Content *GoogleContent `json:"content,omitempty"`
FinishReason string `json:"finishReason,omitempty"`
}
type GoogleContent ¶
type GoogleContent struct {
Role string `json:"role,omitempty"`
Parts []GooglePart `json:"parts"`
}
type GoogleFunctionCall ¶
type GoogleFunctionCallResp ¶
type GoogleGenerateRequest ¶
type GoogleGenerateRequest struct {
Contents []GoogleContent `json:"contents"`
Tools []GoogleTool `json:"tools"`
ToolConfig *GoogleToolConfig `json:"toolConfig"`
SystemInstruction *GoogleContent `json:"systemInstruction"`
}
type GoogleGenerateResponse ¶
type GoogleGenerateResponse struct {
Candidates []GoogleCandidate `json:"candidates"`
UsageMetadata *GoogleUsageMetadata `json:"usageMetadata,omitempty"`
ModelVersion string `json:"modelVersion,omitempty"`
}
type GoogleInlineData ¶
type GooglePart ¶
type GooglePart struct {
Text string `json:"text,omitempty"`
InlineData *GoogleInlineData `json:"inlineData,omitempty"`
FunctionCall *GoogleFunctionCall `json:"functionCall,omitempty"`
FunctionResponse *GoogleFunctionCallResp `json:"functionResponse,omitempty"`
}
type GoogleTool ¶
type GoogleTool struct {
FunctionDeclarations []GoogleFunctionDeclaration `json:"functionDeclarations"`
}
type GoogleToolConfig ¶
type GoogleToolConfig struct {
FunctionCallingConfig *GoogleFunctionCallingConfig `json:"functionCallingConfig"`
}
type GoogleUsageMetadata ¶
type OpenAIChatRequest ¶
type OpenAIChatRequest struct {
Model string `json:"model"`
Messages []OpenAIMessage `json:"messages"`
Tools []OpenAITool `json:"tools"`
ToolChoice any `json:"tool_choice"`
Stream bool `json:"stream"`
}
type OpenAIChatResponse ¶
type OpenAIChatResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []OpenAIChoice `json:"choices"`
Usage *OpenAIUsage `json:"usage,omitempty"`
}
type OpenAIChoice ¶
type OpenAIChoice struct {
Index int `json:"index"`
Message *OpenAIMessage `json:"message,omitempty"`
Delta *OpenAIMessage `json:"delta,omitempty"`
FinishReason *string `json:"finish_reason"`
}
type OpenAIFunction ¶
type OpenAIMessage ¶
type OpenAIMessage struct {
Role string `json:"role"`
Content any `json:"content"`
Name string `json:"name,omitempty"`
ToolCalls []OpenAIToolCall `json:"tool_calls,omitempty"`
}
type OpenAITool ¶
type OpenAITool struct {
Type string `json:"type"`
Function OpenAIFunction `json:"function"`
Name string `json:"name,omitempty"`
Description string `json:"description,omitempty"`
Parameters any `json:"parameters,omitempty"`
}
type OpenAIToolCall ¶
type OpenAIToolCall struct {
ID string `json:"id"`
Type string `json:"type"`
Function OpenAIToolCallFunction `json:"function"`
}