Skip to content

Commit a21d5cb

Browse files
authored
fix: Gemini test payload error (#305)
1 parent 71c219e commit a21d5cb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

internal/channel/gemini_channel.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,12 @@ func (ch *GeminiChannel) ValidateKey(ctx context.Context, apiKey *models.APIKey,
111111

112112
payload := gin.H{
113113
"contents": []gin.H{
114-
{"parts": []gin.H{
115-
{"text": "hi"},
116-
}},
114+
{
115+
"role": "user",
116+
"parts": []gin.H{
117+
{"text": "hi"},
118+
},
119+
},
117120
},
118121
}
119122
body, err := json.Marshal(payload)

0 commit comments

Comments
 (0)