Skip to content

Commit

Permalink
fix: refactor by github review
Browse files Browse the repository at this point in the history
  • Loading branch information
sihyeong671 committed Aug 20, 2024
1 parent 0674eea commit 4ec2f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/langchain/langchain.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const chatModelFactory = {
const [provider, model] = modelType.split(":", 2);
let chatModel: BaseChatModel | ChatOllama;

if (modelList[provider] && modelList[provider].includes(model)) {
if (modelList[provider]?.includes(model)) {
if (provider === "ollama") {
chatModel = new ChatOllama({
model: model,
Expand Down

0 comments on commit 4ec2f73

Please sign in to comment.