File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ import { GoogleGenerativeAI } from "@google/generative-ai";
22import { Software } from "../data/software.ts" ;
33
44const genAI = new GoogleGenerativeAI ( import . meta. env . VITE_GEMINI_API_KEY ) ;
5-
5+ const geminiModel = "gemini-2.0-flash" ;
66export async function getSuggestions ( input : string ) : Promise < string [ ] > {
77 if ( ! input . trim ( ) ) return [ ] ; // Return empty array if input is empty or whitespace
88
99 try {
10- const model = genAI . getGenerativeModel ( { model : "gemini-1.5-flash" } ) ;
10+ const model = genAI . getGenerativeModel ( { model : geminiModel } ) ;
1111
1212 const prompt = `Given the following partial task description: "${ input } ",
1313Suggest 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
3535
3636export async function analyzeSoftwareNeeds ( description : string ) : Promise < any > {
3737 try {
38- const model = genAI . getGenerativeModel ( { model : "gemini-1.5-flash" } ) ;
38+ const model = genAI . getGenerativeModel ( { model : geminiModel } ) ;
3939 const prompt = `
4040Generate a structured JSON output for software recommendations based on the given task description:
4141'${ description } '
You can’t perform that action at this time.
0 commit comments