You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
Some models like BedrockAnthropic3 support stopSequences parameter, while the completions meet that token it will stop to generate. So there's a change to make model not generate anything. For example, we pass the prompt as 'Hi' and set stopSequences to 'Hello', that probably make model not generate anything.
Environment
Spring AI 1.0.0-SNAPSHOT, Java 17
Steps to reproduce
Expected behavior
Since 1.0.0-SNAPSHOT is not stable, this case serves as a reminder in case you incorporate the following code snippet into the stable version.
···
return new ChatResponse(List.of(new Generation(((Anthropic3ChatBedrockApi.MediaContent)response.content().get(0)).text())));
···
The text was updated successfully, but these errors were encountered:
Bug description
Some models like BedrockAnthropic3 support stopSequences parameter, while the completions meet that token it will stop to generate. So there's a change to make model not generate anything. For example, we pass the prompt as 'Hi' and set stopSequences to 'Hello', that probably make model not generate anything.
Environment
Spring AI 1.0.0-SNAPSHOT, Java 17
Steps to reproduce
![BedrockAnthropic3ChatModelIssue](https://private-user-images.githubusercontent.com/16474510/333099078-ab388447-1899-46f5-a6f1-a799e8c085fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzMzczMTEsIm5iZiI6MTcyMDMzNzAxMSwicGF0aCI6Ii8xNjQ3NDUxMC8zMzMwOTkwNzgtYWIzODg0NDctMTg5OS00NmY1LWE2ZjEtYTc5OWU4YzA4NWZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDA3MjMzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmNzYzMDQzMDBhM2Y0NDkwZThhY2Q3OTk4M2Y4NWUwZWI2YmQ3ODNiNTM5OTMwNTk4ZjZjN2Q3ODE4NWU2OWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.DD0wBrTlheD6pEE5DDYpPzBuLK8BRqY4jS_lDu8Ir9I)
Expected behavior
Since 1.0.0-SNAPSHOT is not stable, this case serves as a reminder in case you incorporate the following code snippet into the stable version.
···
return new ChatResponse(List.of(new Generation(((Anthropic3ChatBedrockApi.MediaContent)response.content().get(0)).text())));
···
The text was updated successfully, but these errors were encountered: