Skip to content

Commit

Permalink
update mistral-large models to mistral-large-latest
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed May 30, 2024
1 parent 6278b57 commit 9dc95f0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/src/models/chat/chat_mistralai_tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/src/models/chat/chat_mistralai_wsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/src/models/chat/chat_mistralai_wsa_json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/langchain-mistralai/src/tests/agent.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
26 changes: 13 additions & 13 deletions libs/langchain-mistralai/src/tests/chat_models.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
});
Expand Down Expand Up @@ -120,7 +120,7 @@ test("Can call tools", async () => {
];

const model = new ChatMistralAI({
modelName: "mistral-large",
modelName: "mistral-large-latest",
}).bind({
tools,
});
Expand Down Expand Up @@ -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()],
});
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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()],
});
Expand Down Expand Up @@ -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: [
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9dc95f0

Please sign in to comment.