Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(openai): Fix test #7415

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading