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

correctly raise ValueError for ChatBedrock models that don't support structured_output #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andymli
Copy link

@andymli andymli commented Jul 30, 2024

small addendum to an old PR: #70

Comment on lines 786 to 789
if "claude-3" not in self._get_model():
ValueError(
raise ValueError(
f"Structured output is not supported for model {self._get_model()}"
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest to rather get rid of this block as there are other providers that support tool calling and structured output.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there an up-to-date list of these providers given by AWS? the above branch condition was written by the original PR author. I think it's correct as from my manual testing, only claude-3 models support structured output on Bedrock (for now).
I'm only providing a code correction so it correctly raises an error like it should have been doing, not any major breaking changes.

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.

2 participants