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()))); ···
Comment From: maxjiang153
Hi @ShaunDeng could you provide a demo to reproduce this issue?
Comment From: ShaunDeng
Hi @maxjiang153 , as I post at the above, just set the prompt as 'hi', and set the model stopSequences to 'Hello' or 'hi' to reproduce
Comment From: csterwa
Closed as merged.