mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-05-24 03:24:28 +00:00
🐛 fix: Gemini FunctionResponse parts inlineData parsing
Gemini native FunctionResponse may include media in functionResponse.parts. Previously, the Parts field was defined as json.RawMessage, preventing GeminiPart custom unmarshal logic from normalizing snake_case keys (inline_data/mime_type) to the camelCase format (inlineData/mimeType) required by Gemini REST. This change updates GeminiFunctionResponse.Parts to []GeminiPart so nested media parts are correctly parsed and forwarded, enabling the model to read inline data.
This commit is contained in:
@@ -219,7 +219,7 @@ type GeminiFunctionResponse struct {
|
||||
Response map[string]interface{} `json:"response"`
|
||||
WillContinue json.RawMessage `json:"willContinue,omitempty"`
|
||||
Scheduling json.RawMessage `json:"scheduling,omitempty"`
|
||||
Parts json.RawMessage `json:"parts,omitempty"`
|
||||
Parts []GeminiPart `json:"parts,omitempty"`
|
||||
ID json.RawMessage `json:"id,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user