Skip to content

Commit 1395896

Browse files
committed
model updated to gemini-2.0-flash
1 parent c1a4e46 commit 1395896

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/gemini.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { GoogleGenerativeAI } from "@google/generative-ai";
22
import { Software } from "../data/software.ts";
33

44
const genAI = new GoogleGenerativeAI(import.meta.env.VITE_GEMINI_API_KEY);
5-
5+
const geminiModel = "gemini-2.0-flash";
66
export 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}",
1313
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
3535

3636
export 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 = `
4040
Generate a structured JSON output for software recommendations based on the given task description:
4141
'${description}'

0 commit comments

Comments
 (0)