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

anthropic on vertexai: Update parsed parameter from image_url to image #669

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

dotrunghieu96
Copy link
Contributor

@dotrunghieu96 dotrunghieu96 commented Jan 3, 2025

update the type image input from image_url to image for compliance with the anthropic latest api

PR Description

Update the type image_url to image when sending request to vertex anthropic api for compliance with the latest anthropic api format

Relevant issues

Fixes #668

Type

🐛 Bug Fix

Changes(optional)

Testing(optional)

Note(optional)

update the type image input from `image_url` to `image` for compliance with the anthropic latest api
@lkuligin
Copy link
Collaborator

lkuligin commented Jan 4, 2025

Does this change applies to all Anthropic models? In other words, is this change backwards compatible to old models that users might still be using?

@dotrunghieu96
Copy link
Contributor Author

dotrunghieu96 commented Jan 6, 2025

Does this change applies to all Anthropic models? In other words, is this change backwards compatible to old models that users might still be using?

@lkuligin yes, the new format is also specified in Model Garden for all claude models including 3 Opus and 3 Sonnet (haiku does not do multimodel anw)
claude-3-opus
image

@lkuligin
Copy link
Collaborator

lkuligin commented Jan 6, 2025

@dotrunghieu96 it looks like some unit tests require an update after your change. Could you take a look, please?

@dotrunghieu96 dotrunghieu96 changed the title Update _anthropic_utils.py anthropic on vertexai: Update _anthropic_utils.py Jan 7, 2025
@dotrunghieu96
Copy link
Contributor Author

@lkuligin I haved updated the unittest case, please check again :D Thanks.

@dotrunghieu96 dotrunghieu96 changed the title anthropic on vertexai: Update _anthropic_utils.py anthropic on vertexai: Update parsed parameter from image_url to image Jan 7, 2025
@dotrunghieu96 dotrunghieu96 requested a review from lkuligin January 7, 2025 07:06
@lkuligin lkuligin merged commit 258d624 into langchain-ai:main Jan 7, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChatAnthropicVertex deprecated image_url type
2 participants