I'm using Prompt Management for Bedrock and this library is almost compatible with it.
First, when using Prompt Management, the request cannot contains some fields:
And when testing, I can't getting that error. So after some figuring out, I found out that inferenceConfig was being set because of the default maxTokens value of 2048 set in the ConfiguresTrait.
So, I overrode maxTokens using: ->withMaxTokens(null).
Next, I get errors because of "Unknown named parameter $responseMessages" when I finally get a response. Looking at the code, in ConverseTextHandler::prepareTempResponse it initiates responseMessages while that property does not exist in Prism\Prism\Text\Response (same with ConverseStructuredHandler).
Looking at the commit history, it seems that this commit was not applied to the Bedrock provider: prism-php/prism@b8fac4d
I'm using Prompt Management for Bedrock and this library is almost compatible with it.
First, when using Prompt Management, the request cannot contains some fields:
And when testing, I can't getting that error. So after some figuring out, I found out that inferenceConfig was being set because of the default maxTokens value of 2048 set in the ConfiguresTrait.
So, I overrode maxTokens using:
->withMaxTokens(null).Next, I get errors because of "Unknown named parameter $responseMessages" when I finally get a response. Looking at the code, in
ConverseTextHandler::prepareTempResponseit initiatesresponseMessageswhile that property does not exist inPrism\Prism\Text\Response(same with ConverseStructuredHandler).Looking at the commit history, it seems that this commit was not applied to the Bedrock provider: prism-php/prism@b8fac4d