GoogleGenerativeAIFetchError: [GoogleGenerativeAI Error]: Error fetching from https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent: [400 ] Unable to submit request because it has a topK value of 64 but the supported range…
it works,
const generationConfig = {
temperature: 1,
topP: 0.95,
topK: 40,
maxOutputTokens: 8192,
responseMimeType: “text/plain”,
};
set 64 to 40
Welcome to the forum.
The documentation (what is topK and what does it do) is here À propos des modèles génératifs | Gemini API | Google AI for Developers