api call retry

This commit is contained in:
kosukesuenaga 2025-12-08 14:22:40 +09:00
parent c004f6c34f
commit bb072cc91c
11 changed files with 126 additions and 23 deletions

View file

@ -6,7 +6,7 @@ const aiClient = new GoogleGenAI({
});
export const aiController = {
generateMinutes: async(text: string) => {
generateMinutes: async(text: string): Promise<string | null> => {
const prompt = `
@ -28,6 +28,7 @@ export const aiController = {
model: process.env.GEMINI_MODEL_ID || "gemini-2.5-flash",
contents: prompt,
})
if(!response.text) return null;
console.log("AI Response:", response.text);
return response.text;
} catch (error) {