api call retry
This commit is contained in:
parent
c004f6c34f
commit
bb072cc91c
11 changed files with 126 additions and 23 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue