Skip to content

Commit ac7ec07

Browse files
authored
Raise ValueError if .with_structured_output is called with an unsupported model (#323)
1 parent 784445c commit ac7ec07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/aws/langchain_aws/chat_models/bedrock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ class AnswerWithJustification(BaseModel):
805805
schema, include_raw=include_raw, **kwargs
806806
)
807807
if "claude-3" not in self._get_model():
808-
ValueError(
808+
raise ValueError(
809809
f"Structured output is not supported for model {self._get_model()}"
810810
)
811811

0 commit comments

Comments
 (0)