Skip to content

Commit 16e8cae

Browse files
committed
Verify requestId in Bederock response
Signed-off-by: Stuart Loxton <[email protected]>
1 parent 902c8ec commit 16e8cae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

models/spring-ai-bedrock-converse/src/test/java/org/springframework/ai/bedrock/converse/BedrockConverseChatClientIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void call() {
7171
.param("name", "Bob")
7272
.param("voice", "pirate"))
7373
.user(u -> u.text("Tell me about 3 famous pirates from the Golden Age of Piracy and what they did")
74-
.param("requestId", "1234")
74+
.metadata("requestId", "12345")
7575
)
7676
.call()
7777
.chatResponse();
@@ -80,6 +80,7 @@ void call() {
8080
logger.info("" + response);
8181
assertThat(response.getResults()).hasSize(1);
8282
assertThat(response.getResults().get(0).getOutput().getText()).contains("Blackbeard");
83+
assertThat(response.getResults().get(0).getMetadata().containsKey("requestId"));
8384
}
8485

8586
@Test

0 commit comments

Comments
 (0)