File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 1
1
import '@ungap/with-resolvers' ;
2
2
3
3
4
- // import { Mistral } from "@mistralai/mistralai";
5
4
import { GoogleGenerativeAI } from "@google/generative-ai" ;
6
5
import { type ExamDetail } from '@/interface' ;
7
6
@@ -101,7 +100,7 @@ function parseExamDetail(analysis: string): ExamDetail {
101
100
}
102
101
}
103
102
104
- // Function to analyze images using Mistral AI
103
+ // Function to analyze images using Gemini AI
105
104
async function analyzeImage ( dataUrl : string ) : Promise < AnalysisResult [ ] > {
106
105
try {
107
106
const apiKey = process . env . GEMINI_API_KEY ;
@@ -110,7 +109,7 @@ async function analyzeImage(dataUrl: string): Promise<AnalysisResult[]> {
110
109
}
111
110
112
111
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" } )
114
113
const results : AnalysisResult [ ] = [ ] ;
115
114
116
115
// const dataUrl = `data:image/png;base64,${imageBase64}`;
You can’t perform that action at this time.
0 commit comments