feat: integrate Gemini service and update dependency lockfile
This commit is contained in:
Generated
+9491
File diff suppressed because it is too large
Load Diff
@@ -15,14 +15,14 @@ export interface GeminiImage {
|
||||
export class GeminiService {
|
||||
private readonly logger = new Logger('Gemini');
|
||||
|
||||
constructor(private readonly config: ConfigService) {}
|
||||
constructor(private readonly config: ConfigService) { }
|
||||
|
||||
get enabled(): boolean {
|
||||
return !!this.config.get<string>('gemini.apiKey');
|
||||
}
|
||||
|
||||
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');
|
||||
return `https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent?key=${key}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user