Skip to content

Commit bddf04c

Browse files
authored
Merge pull request #107 from CodeChefVIT/staging
Update Gemini Model
2 parents 3e50928 + 61f035b commit bddf04c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/util/gemini.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import '@ungap/with-resolvers';
22

33

4-
// import { Mistral } from "@mistralai/mistralai";
54
import {GoogleGenerativeAI} from "@google/generative-ai";
65
import {type ExamDetail } from '@/interface';
76

@@ -101,7 +100,7 @@ function parseExamDetail(analysis: string): ExamDetail {
101100
}
102101
}
103102

104-
// Function to analyze images using Mistral AI
103+
// Function to analyze images using Gemini AI
105104
async function analyzeImage(dataUrl: string): Promise<AnalysisResult[]> {
106105
try {
107106
const apiKey = process.env.GEMINI_API_KEY;
@@ -110,7 +109,7 @@ async function analyzeImage(dataUrl: string): Promise<AnalysisResult[]> {
110109
}
111110

112111
const genAI = new GoogleGenerativeAI(apiKey);
113-
const model = genAI.getGenerativeModel({model: "gemini-1.5-flash"})
112+
const model = genAI.getGenerativeModel({model: "gemini-2.0-flash"})
114113
const results: AnalysisResult[] = [];
115114

116115
// const dataUrl = `data:image/png;base64,${imageBase64}`;

0 commit comments

Comments
 (0)