Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Dec 20, 2024
1 parent a76d83e commit 366d65a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libs/langchain-openai/src/tests/chat_models-vision.int.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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",
},
},
],
});
Expand Down

0 comments on commit 366d65a

Please sign in to comment.