- Newest
- Most votes
- Most comments
Based on the available information about the Amazon Bedrock Converse API, it does not appear that the API currently provides the specific stop sequence that caused the model to stop generating content when multiple stop sequences are provided.
The Converse API response includes a stopReason field in the metrics, which can indicate that the model stopped due to a stop sequence being encountered. However, the API does not seem to specify which particular stop sequence from the provided list was responsible for halting the generation.
This level of detail about which specific stop sequence was triggered is not mentioned in the documentation for the Converse API response structure. The response typically includes the generated message, usage metrics (such as token counts), and general stop reasons, but does not appear to offer the granularity of identifying the exact stop sequence that was encountered.
It's worth noting that the behavior you described for the invokeModel API with Claude models, where the specific stop sequence is provided, is not mentioned as a feature of the Converse API. This could be due to the Converse API being designed to work across multiple model types, and not all models may support or provide this level of detail in their responses.
If this feature is important for your use case, you might want to check for updates to the Converse API documentation or consider reaching out to AWS support to inquire about future plans for including this information in the API response. Alternatively, you may need to implement your own logic to determine which stop sequence was likely triggered based on the model's output.
Sources
Using the Converse API - Amazon Bedrock
