- Newest
- Most votes
- Most comments
Based on the error message you're receiving, it appears that Mistral 2 Large currently doesn't support tool use in streaming mode when using the ConverseStream API.
To address your questions:
-
Regarding when AWS will support tool use with streaming for Mistral 2 Large: There is no specific timeline mentioned in the available information. AWS regularly updates its services, but there's no announced roadmap for when this specific capability will be added for Mistral 2 Large.
-
To modify your approach to allow streaming without tools:
You have two options:
- Remove the toolConfig parameter entirely from your ConverseStream call. This would allow you to use streaming but without tool functionality:
final_response = self.bedrock.converse_stream( modelId=self.config.model_id, system=system, messages=messages, inferenceConfig=inferenceConfig # toolConfig parameter removed )
- Alternatively, if you need both streaming and tool functionality, you might need to implement a hybrid approach where you use non-streaming calls (the regular
converseAPI) when tool use is required, and switch toconverse_streamwhen streaming without tools is acceptable.
It's worth noting that there are some limitations in the current Bedrock APIs. For example, another known limitation is that guardrails cannot be enabled when using tools in converse operations. These are current implementation constraints that may be addressed in future updates.
If tool functionality is critical for your application, you might need to temporarily use the non-streaming version of the API until AWS adds support for tool use in streaming mode for Mistral 2 Large.
Sources
able to use streamingConfigurations in AgentsforBedrockRuntime invoke_agent boto3 sdk | AWS re:Post
Why Guardrails cannot be enabled when using tools in converse operations | AWS re:Post
AWS Bedrock Agents Support Streaming Responses? | AWS re:Post
Converse API examples - Amazon Bedrock
Relevant content
- asked 2 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
