chore: Crud openai complete

This commit is contained in:
Davidson Gomes
2024-07-18 10:14:53 -03:00
parent 5b13de377b
commit 29b9e688a8
12 changed files with 2417 additions and 135 deletions

View File

@@ -191,6 +191,7 @@ export type Chatwoot = {
PLACEHOLDER_MEDIA_MESSAGE: boolean;
};
};
export type Openai = { ENABLED: boolean; API_KEY_GLOBAL?: string };
export type S3 = {
ACCESS_KEY: string;
@@ -224,6 +225,7 @@ export interface Env {
QRCODE: QrCode;
TYPEBOT: Typebot;
CHATWOOT: Chatwoot;
OPENAI: Openai;
CACHE: CacheConf;
S3?: S3;
AUTHENTICATION: Auth;
@@ -431,6 +433,10 @@ export class ConfigService {
PLACEHOLDER_MEDIA_MESSAGE: process.env?.CHATWOOT_IMPORT_PLACEHOLDER_MEDIA_MESSAGE === 'true',
},
},
OPENAI: {
ENABLED: process.env?.OPENAI_ENABLED === 'true',
API_KEY_GLOBAL: process.env?.OPENAI_API_KEY_GLOBAL || null,
},
CACHE: {
REDIS: {
ENABLED: process.env?.CACHE_REDIS_ENABLED === 'true',