Skip to content

Commit cabd762

Browse files
fix(mistral-ai): hub.pull with ChatMistralAI auto-instanciate (#9081)
Co-authored-by: Hunter Lovell <[email protected]> Co-authored-by: Hunter Lovell <[email protected]>
1 parent 20144d5 commit cabd762

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"langchain": patch
3+
---
4+
5+
fix(langchain): add ChatMistralAI to well known models

β€Žlangchain/src/hub/base.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ export function generateModelImportMap(
112112
importMapKey = "chat_models__google_genai";
113113
} else if (modelLcName === "ChatBedrockConverse") {
114114
importMapKey = "chat_models__chat_bedrock_converse";
115+
} else if (modelLcName === "ChatMistralAI") {
116+
importMapKey = "chat_models__mistralai";
115117
} else if (modelLcName === "ChatMistral") {
116118
importMapKey = "chat_models__mistralai";
117119
} else if (modelLcName === "ChatFireworks") {

β€Žlangchain/src/hub/node.tsβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ export async function pull<T extends Runnable>(
7777
.ChatGoogleGenerativeAI;
7878
} else if (modelName === "ChatBedrockConverse") {
7979
modelClass = (await import("@langchain/aws")).ChatBedrockConverse;
80+
} else if (modelName === "ChatMistralAI") {
81+
modelClass = (await import("@langchain/mistralai")).ChatMistralAI;
8082
} else if (modelName === "ChatMistral") {
8183
modelClass = (await import("@langchain/mistralai")).ChatMistralAI;
8284
} else if (modelName === "ChatGroq") {

0 commit comments

Comments
Β (0)