From 9dc95f000e9efbf318fc1ba180a46c23eae40fe2 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Thu, 30 May 2024 14:45:37 -0700 Subject: [PATCH] update mistral-large models to mistral-large-latest --- .../src/models/chat/chat_mistralai_tools.ts | 2 +- .../src/models/chat/chat_mistralai_wsa.ts | 2 +- .../models/chat/chat_mistralai_wsa_json.ts | 2 +- .../src/tests/agent.int.test.ts | 2 +- .../src/tests/chat_models.int.test.ts | 26 +++++++++---------- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/examples/src/models/chat/chat_mistralai_tools.ts b/examples/src/models/chat/chat_mistralai_tools.ts index 7e6e9ebf3928..fce2c9c69a54 100644 --- a/examples/src/models/chat/chat_mistralai_tools.ts +++ b/examples/src/models/chat/chat_mistralai_tools.ts @@ -33,7 +33,7 @@ class CalculatorTool extends StructuredTool { const model = new ChatMistralAI({ apiKey: process.env.MISTRAL_API_KEY, - model: "mistral-large", + model: "mistral-large-latest", }); // Bind the tool to the model diff --git a/examples/src/models/chat/chat_mistralai_wsa.ts b/examples/src/models/chat/chat_mistralai_wsa.ts index 37d36fecca64..0e429fe7e364 100644 --- a/examples/src/models/chat/chat_mistralai_wsa.ts +++ b/examples/src/models/chat/chat_mistralai_wsa.ts @@ -14,7 +14,7 @@ const calculatorSchema = z const model = new ChatMistralAI({ apiKey: process.env.MISTRAL_API_KEY, - model: "mistral-large", + model: "mistral-large-latest", }); // Pass the schema and tool name to the withStructuredOutput method diff --git a/examples/src/models/chat/chat_mistralai_wsa_json.ts b/examples/src/models/chat/chat_mistralai_wsa_json.ts index 4a9553055edd..3dbe3508bb39 100644 --- a/examples/src/models/chat/chat_mistralai_wsa_json.ts +++ b/examples/src/models/chat/chat_mistralai_wsa_json.ts @@ -21,7 +21,7 @@ const calculatorJsonSchema = { const model = new ChatMistralAI({ apiKey: process.env.MISTRAL_API_KEY, - model: "mistral-large", + model: "mistral-large-latest", }); // Pass the schema and tool name to the withStructuredOutput method diff --git a/libs/langchain-mistralai/src/tests/agent.int.test.ts b/libs/langchain-mistralai/src/tests/agent.int.test.ts index 206347bb5e9a..156b773859f1 100644 --- a/libs/langchain-mistralai/src/tests/agent.int.test.ts +++ b/libs/langchain-mistralai/src/tests/agent.int.test.ts @@ -18,7 +18,7 @@ test("createToolCallingAgent works", async () => { // ["placeholder", "{agent_scratchpad}"], // ]); // const llm = new ChatMistralAI({ - // model: "mistral-large", + // model: "mistral-large-latest", // temperature: 0, // }); // const agent = await createToolCallingAgent({ diff --git a/libs/langchain-mistralai/src/tests/chat_models.int.test.ts b/libs/langchain-mistralai/src/tests/chat_models.int.test.ts index 17a3069a2c81..d423cf356c44 100644 --- a/libs/langchain-mistralai/src/tests/chat_models.int.test.ts +++ b/libs/langchain-mistralai/src/tests/chat_models.int.test.ts @@ -71,7 +71,7 @@ test("Can call tools using structured tools", async () => { } const model = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", }).bind({ tools: [new Calculator()], }); @@ -120,7 +120,7 @@ test("Can call tools", async () => { ]; const model = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", }).bind({ tools, }); @@ -170,7 +170,7 @@ test("Can call .stream with tool calling", async () => { } const model = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", }).bind({ tools: [new Calculator()], }); @@ -208,7 +208,7 @@ test("Can call .stream with tool calling", async () => { test("Can use json mode response format", async () => { const model = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", }).bind({ response_format: { type: "json_object", @@ -235,7 +235,7 @@ To use a calculator respond with valid JSON containing a single key: 'calculator test("Can call .stream with json mode", async () => { const model = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", }).bind({ response_format: { type: "json_object", @@ -294,7 +294,7 @@ test("Can stream and concat responses for a complex tool", async () => { } const model = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", }).bind({ tools: [new PersonTraits()], }); @@ -332,7 +332,7 @@ test("Can stream and concat responses for a complex tool", async () => { test("Few shotting with tool calls", async () => { const chat = new ChatMistralAI({ - modelName: "mistral-large", + modelName: "mistral-large-latest", temperature: 0, }).bind({ tools: [ @@ -385,7 +385,7 @@ describe("withStructuredOutput", () => { test("withStructuredOutput zod schema function calling", async () => { const model = new ChatMistralAI({ temperature: 0, - modelName: "mistral-large", + modelName: "mistral-large-latest", }); const calculatorSchema = z @@ -421,7 +421,7 @@ describe("withStructuredOutput", () => { test("withStructuredOutput zod schema JSON mode", async () => { const model = new ChatMistralAI({ temperature: 0, - modelName: "mistral-large", + modelName: "mistral-large-latest", }); const calculatorSchema = z.object({ @@ -459,7 +459,7 @@ describe("withStructuredOutput", () => { test("withStructuredOutput JSON schema function calling", async () => { const model = new ChatMistralAI({ temperature: 0, - modelName: "mistral-large", + modelName: "mistral-large-latest", }); const calculatorSchema = z @@ -496,7 +496,7 @@ describe("withStructuredOutput", () => { test("withStructuredOutput OpenAI function definition function calling", async () => { const model = new ChatMistralAI({ temperature: 0, - modelName: "mistral-large", + modelName: "mistral-large-latest", }); const calculatorSchema = z @@ -531,7 +531,7 @@ describe("withStructuredOutput", () => { test("withStructuredOutput JSON schema JSON mode", async () => { const model = new ChatMistralAI({ temperature: 0, - modelName: "mistral-large", + modelName: "mistral-large-latest", }); const calculatorSchema = z.object({ @@ -569,7 +569,7 @@ describe("withStructuredOutput", () => { test("withStructuredOutput includeRaw true", async () => { const model = new ChatMistralAI({ temperature: 0, - modelName: "mistral-large", + modelName: "mistral-large-latest", }); const calculatorSchema = z