feat: integrate Gemini service and update dependency lockfile

This commit is contained in:
Hamza-Ayed
2026-07-17 02:25:14 +03:00
parent 9d6b752ea8
commit 8b3b57fe0f
2 changed files with 9493 additions and 2 deletions
+9491
View File
File diff suppressed because it is too large Load Diff
@@ -15,14 +15,14 @@ export interface GeminiImage {
export class GeminiService { export class GeminiService {
private readonly logger = new Logger('Gemini'); private readonly logger = new Logger('Gemini');
constructor(private readonly config: ConfigService) {} constructor(private readonly config: ConfigService) { }
get enabled(): boolean { get enabled(): boolean {
return !!this.config.get<string>('gemini.apiKey'); return !!this.config.get<string>('gemini.apiKey');
} }
private endpoint(): string { private endpoint(): string {
const model = this.config.get<string>('gemini.model') ?? 'gemini-2.0-flash'; const model = this.config.get<string>('gemini.model') ?? 'gemini-flash-lite-latest';
const key = this.config.get<string>('gemini.apiKey'); const key = this.config.get<string>('gemini.apiKey');
return `https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent?key=${key}`; return `https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent?key=${key}`;
} }