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:
@ -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 {
|
||||
|
||||
@ -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})`);
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user