20251125 save

This commit is contained in:
kosukesuenaga 2025-11-25 14:54:01 +09:00
parent 922fa0e77a
commit 092f2ec0f3
11 changed files with 299 additions and 1 deletions

View file

@ -0,0 +1,38 @@
import { GoogleGenAI } from "@google/genai";
const aiClient = new GoogleGenAI({
apiKey: process.env.GEMINI_API_KEY,
});
export const aiController = {
generateMinutes: async(text: string) => {
const prompt = `
:
1. AIによる書き起こしミスがある可能性を考慮してください
2.
3.
4.
5. 500
6.
7. 使使
${text}
`
try {
const response = await aiClient.models.generateContent({
model: process.env.GEMINI_MODEL_ID || "gemini-2.5-flash",
contents: prompt,
})
console.log("AI Response:", response.text);
return response.text;
} catch (error) {
console.error("AI Generation Error:", error);
return null;
}
}
};