Security audit #1
This commit is contained in:
parent
68bc591150
commit
cd04d34b23
8 changed files with 131 additions and 56 deletions
|
|
@ -4,11 +4,10 @@ import { buildQuizPrompt, JSON_EXAMPLE_GUIDANCE } from "../server/src/shared/qui
|
|||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
const getGeminiClient = (apiKey?: string) => {
|
||||
const key = apiKey || process.env.API_KEY;
|
||||
if (!key) {
|
||||
throw new Error("Gemini API key is missing");
|
||||
if (!apiKey) {
|
||||
throw new Error("Gemini API key is required. Use your own API key or enable System AI.");
|
||||
}
|
||||
return new GoogleGenAI({ apiKey: key });
|
||||
return new GoogleGenAI({ apiKey });
|
||||
};
|
||||
|
||||
const DEFAULT_GEMINI_MODEL = 'gemini-3-flash-preview';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue