From 34f52c9b259d3a2762b5d75db132e9051d46202f Mon Sep 17 00:00:00 2001 From: LeeJongBeom <52884648+devleejb@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:24:57 +0900 Subject: [PATCH] Disable model checking when intelligence is `false` (#388) --- backend/src/langchain/langchain.module.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/src/langchain/langchain.module.ts b/backend/src/langchain/langchain.module.ts index 712c3b1c..73b159fe 100644 --- a/backend/src/langchain/langchain.module.ts +++ b/backend/src/langchain/langchain.module.ts @@ -8,6 +8,9 @@ const chatModelFactory = { provide: "ChatModel", useFactory: (configService: ConfigService) => { const modelType = configService.get("YORKIE_INTELLIGENCE"); + + if (modelType === "false") return null; + try { // Split the modelType string into provider and model // ex) "ollama:gemma2:2b" => ["ollama", "gemma2:2b"]