From 366d65ac64c837198e03380fcfe00e3ebab5a6c6 Mon Sep 17 00:00:00 2001 From: jacoblee93 Date: Thu, 19 Dec 2024 18:02:16 -0800 Subject: [PATCH] Fix test --- .../src/tests/chat_models-vision.int.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libs/langchain-openai/src/tests/chat_models-vision.int.test.ts b/libs/langchain-openai/src/tests/chat_models-vision.int.test.ts index 23c00bbd0602..8486f438c8a9 100644 --- a/libs/langchain-openai/src/tests/chat_models-vision.int.test.ts +++ b/libs/langchain-openai/src/tests/chat_models-vision.int.test.ts @@ -10,7 +10,7 @@ test("Test ChatOpenAI with a file", async () => { const __dirname = path.dirname(__filename); const imageData = await fs.readFile(path.join(__dirname, "/data/hotdog.jpg")); const chat = new ChatOpenAI({ - modelName: "gpt-4-vision-preview", + modelName: "gpt-4o", maxTokens: 1024, }); const message = new HumanMessage({ @@ -35,19 +35,20 @@ test("Test ChatOpenAI with a file", async () => { test("Test ChatOpenAI with a URL", async () => { const chat = new ChatOpenAI({ - modelName: "gpt-4-vision-preview", + modelName: "gpt-4o", maxTokens: 1024, }); const message = new HumanMessage({ content: [ { type: "text", - text: "What does this image say?", + text: "What's in this image?", }, { type: "image_url", - image_url: - "https://www.freecodecamp.org/news/content/images/2023/05/Screenshot-2023-05-29-at-5.40.38-PM.png", + image_url: { + url: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg", + }, }, ], });