Skip to content

Conversation

@rhysemmerson
Copy link
Contributor

Description

Adds an option to use the recently added validated json results feature.

$response = Prism::structured()
        ->withSchema($schema)
        ->using('bedrock', 'us.anthropic.claude-haiku-4-5-20251001-v1:0')
-       ->withProviderOptions(['apiSchema' => BedrockSchema::Converse])
+       ->withProviderOptions(['apiSchema' => BedrockSchema::Converse, 'validated_schema' => true])
        ->withSystemPrompt('The tigers game is at 3pm and the temperature will be 70º')
        ->withPrompt('What time is the tigers game today and should I wear a coat?')
        ->asStructured();

Breaking Changes

No 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.

1 participant