diff --git a/backend/services/gemini.go b/backend/services/gemini.go index c1cafa4..71f8e5f 100644 --- a/backend/services/gemini.go +++ b/backend/services/gemini.go @@ -62,6 +62,18 @@ User query: ` + query, "responseMimeType": "application/json", "temperature": 0.2, "maxOutputTokens": 220, + "responseSchema": map[string]any{ + "type": "OBJECT", + "properties": map[string]any{ + "querywords": map[string]any{ + "type": "ARRAY", + "items": map[string]any{ + "type": "STRING", + }, + }, + }, + "required": []string{"querywords"}, + }, }, } @@ -92,6 +104,18 @@ User query: ` + query, "responseMimeType": "application/json", "temperature": 0.1, "maxOutputTokens": 220, + "responseSchema": map[string]any{ + "type": "OBJECT", + "properties": map[string]any{ + "querywords": map[string]any{ + "type": "ARRAY", + "items": map[string]any{ + "type": "STRING", + }, + }, + }, + "required": []string{"querywords"}, + }, }, } rawText, retryErr := g.generateText(strictBody)