From 1395896266b5d4c60d89cbf5dcc0ac6e98a1d51f Mon Sep 17 00:00:00 2001 From: "Viththagan R.N." Date: Fri, 14 Mar 2025 16:39:01 +0530 Subject: [PATCH] model updated to gemini-2.0-flash --- src/lib/gemini.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/gemini.ts b/src/lib/gemini.ts index 8f9e208..c7f7589 100644 --- a/src/lib/gemini.ts +++ b/src/lib/gemini.ts @@ -2,12 +2,12 @@ import { GoogleGenerativeAI } from "@google/generative-ai"; import { Software } from "../data/software.ts"; const genAI = new GoogleGenerativeAI(import.meta.env.VITE_GEMINI_API_KEY); - +const geminiModel = "gemini-2.0-flash"; export async function getSuggestions(input: string): Promise { if (!input.trim()) return []; // Return empty array if input is empty or whitespace try { - const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" }); + const model = genAI.getGenerativeModel({ model: geminiModel }); const prompt = `Given the following partial task description: "${input}", Suggest 5 short, actionable completions or clarifications to help finish this description. @@ -35,7 +35,7 @@ Return only the suggestions as a JSON array of strings. Each suggestion should b export async function analyzeSoftwareNeeds(description: string): Promise { try { - const model = genAI.getGenerativeModel({ model: "gemini-1.5-flash" }); + const model = genAI.getGenerativeModel({ model: geminiModel }); const prompt = ` Generate a structured JSON output for software recommendations based on the given task description: '${description}'