Hi making some tests in js, node.js i discovered the way to config a model and use it its some how:
// Agrega el nuevo mensaje al historial
historyGoogleai.push({
role: "user",
parts: [
{ text: userMessage }
]
});
const model = await genAI.getGenerativeModel({ model: chatbotSettings.chatbotModel });
const result = await model.generateContent({
contents: historyGoogleai,
generationConfig: {
temperature: 0.7,
maxOutputTokens: 500,
},
});
My doubts;
1 - Gemini does not allow a system message as initial one, to describe the character, language, how to address to users…so the first message should be made by model…
2 - I like more to put the setup or config of model in getGenerativeAiModel, so you prepare one model with name of model-base, temperature, max_tokens etc… and once ready you only have to sen messages to that model…not every message to add the setup of the model… So its a way to use some kind of startChat and sendMessages in Gemini 2.0
3 - The same works for gemini in streaming no ?
4 - Offtopic: as Gemma is Ghttps://discuss.ai.google.dev/c/gemini-api/4emini open source, is there any link to download the different models
tHanks