Update enums to be all caps (#12372)

- Make custom domain public (remove from lab)
- Use ALL_CAPS definition for enums
This commit is contained in:
Félix Malfait
2025-05-29 14:08:36 +02:00
committed by GitHub
parent 76d0be7f81
commit 4485e8e3db
165 changed files with 845 additions and 847 deletions

View File

@ -1,7 +1,7 @@
import { ModuleMetadata, FactoryProvider } from '@nestjs/common';
import { FactoryProvider, ModuleMetadata } from '@nestjs/common';
export enum LLMChatModelDriver {
OpenAI = 'openai',
OPENAI = 'OPENAI',
}
export interface LLMChatModelModuleOptions {

View File

@ -8,8 +8,8 @@ export const llmChatModelModuleFactory = (
const driver = twentyConfigService.get('LLM_CHAT_MODEL_DRIVER');
switch (driver) {
case LLMChatModelDriver.OpenAI: {
return { type: LLMChatModelDriver.OpenAI };
case LLMChatModelDriver.OPENAI: {
return { type: LLMChatModelDriver.OPENAI };
}
default:
// `No LLM chat model driver (${driver})`);

View File

@ -5,8 +5,8 @@ import {
LLMChatModelModuleAsyncOptions,
} from 'src/engine/core-modules/llm-chat-model/interfaces/llm-chat-model.interface';
import { LLM_CHAT_MODEL_DRIVER } from 'src/engine/core-modules/llm-chat-model/llm-chat-model.constants';
import { OpenAIDriver } from 'src/engine/core-modules/llm-chat-model/drivers/openai.driver';
import { LLM_CHAT_MODEL_DRIVER } from 'src/engine/core-modules/llm-chat-model/llm-chat-model.constants';
import { LLMChatModelService } from 'src/engine/core-modules/llm-chat-model/llm-chat-model.service';
@Global()
@ -19,7 +19,7 @@ export class LLMChatModelModule {
const config = options.useFactory(...args);
switch (config?.type) {
case LLMChatModelDriver.OpenAI: {
case LLMChatModelDriver.OPENAI: {
return new OpenAIDriver();
}
}