Skip to content

Commit

Permalink
feat(createChatModelInstance.ts): add support for ChatAnthropic model…
Browse files Browse the repository at this point in the history
… to enhance AI model options
  • Loading branch information
anpigon committed Jul 7, 2024
1 parent 11390e3 commit 80c098f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/ai/createChatModelInstance.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {ChatOllama} from '@langchain/community/chat_models/ollama';
import {ChatGoogleGenerativeAI} from '@langchain/google-genai';
import {ChatAnthropic} from '@langchain/anthropic';
import {ChatOpenAI} from '@langchain/openai';
import {ChatGroq} from '@langchain/groq';

Expand All @@ -20,6 +21,8 @@ export default function createChatModelInstance(provider: LLM_PROVIDERS, model:
return new ChatGoogleGenerativeAI(options);
case LLM_PROVIDERS.GROQ:
return new ChatGroq(options);
case LLM_PROVIDERS.ANTHROPIC:
return new ChatAnthropic(options);
default:
return new ChatOpenAI({
...options,
Expand Down

0 comments on commit 80c098f

Please sign in to comment.