Closed hyperlink closed 2 months ago
Looks like there are some extraneous fields in the body that bedrock does not like stream
and model
. If those keys are removed the invoke is sent successfully and the response is also handled correctly.
However, I encountered an issue using the streaming method. Looks like the response coming back from Bedrock is not in an EventStream format so it fails to parse the responses:
unknownStreamingResponseLine("{\"type\":\"message_start\",\"message\":{\"id\":\"msg_bdrk_014XMPhb8Q1dgobb29cjzVhj\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"claude-3-haiku-20240307\",\"stop_sequence\":null,\"usage\":{\"input_tokens\":20,\"output_tokens\":1},\"content\":[],\"stop_reason\":null}}")
Hi @hyperlink . Thanks for your reporting.
The problems reported have been corrected. If you would like, could you try the main
branch to see if the problem has been fixed?
fixed by #20 and #21
AntropicSwiftSDK: 0.4.0 aws-sdk-swift: 0.46.0
I encountered a validation exception when sending a message using the Bedrock client. I plan on investigating further and updating this issue.
Test code:
Error in the console: