Skip to content

Commit 0695384

Browse files
committed
Replace url with a sample
1 parent d8ccbf7 commit 0695384

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,7 @@ void testRequestWithMultiChatMessage() throws IOException {
662662
ImageContent.create()
663663
.type(ImageContent.TypeEnum.IMAGE_URL)
664664
.imageUrl(
665-
ImageContentImageUrl.create()
666-
.url(
667-
"https://images.unsplash.com/photo-1468971050039-be99497410af?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"))));
665+
ImageContentImageUrl.create().url("https://sample.sap.com/image"))));
668666

669667
var llmWithImageSupportConfig =
670668
LLMModuleConfig.create()
@@ -700,8 +698,7 @@ void testRequestWithMultiChatMessage() throws IOException {
700698
assertThat(((ImageContent) multiChatMessageResponse.getContent().get(1)).getType())
701699
.isEqualTo(ImageContent.TypeEnum.IMAGE_URL);
702700
assertThat(((ImageContent) multiChatMessageResponse.getContent().get(1)).getImageUrl().getUrl())
703-
.isEqualTo(
704-
"https://images.unsplash.com/photo-1468971050039-be99497410af?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D");
701+
.isEqualTo("https://sample.sap.com/image");
705702

706703
var llmResults = (LLMModuleResultSynchronous) response.getModuleResults().getLlm();
707704
assertThat(llmResults).isNotNull();
@@ -714,7 +711,7 @@ void testRequestWithMultiChatMessage() throws IOException {
714711
assertThat(llmResults.getChoices()).hasSize(1);
715712
assertThat(llmResults.getChoices().get(0).getMessage().getContent())
716713
.isEqualTo(
717-
"The text in the image says \"WORK HARDER\". If you need to enter this as part of a captcha verification, that's what you should type in!");
714+
"Of course! Just let me put on my human glasses... Oh wait, I left them in the matrix");
718715
assertThat(llmResults.getChoices().get(0).getFinishReason()).isEqualTo("stop");
719716
assertThat(llmResults.getChoices().get(0).getMessage().getRole()).isEqualTo("assistant");
720717
assertThat(llmResults.getChoices().get(0).getIndex()).isZero();
@@ -733,7 +730,7 @@ void testRequestWithMultiChatMessage() throws IOException {
733730
assertThat(orchestrationResult.getChoices()).hasSize(1);
734731
assertThat(orchestrationResult.getChoices().get(0).getMessage().getContent())
735732
.isEqualTo(
736-
"The text in the image says \"WORK HARDER\". If you need to enter this as part of a captcha verification, that's what you should type in!");
733+
"Of course! Just let me put on my human glasses... Oh wait, I left them in the matrix");
737734
assertThat(orchestrationResult.getChoices().get(0).getFinishReason()).isEqualTo("stop");
738735
assertThat(orchestrationResult.getChoices().get(0).getMessage().getRole())
739736
.isEqualTo("assistant");

orchestration/src/test/resources/__files/multiChatMessageResponse.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{
1313
"type": "image_url",
1414
"image_url": {
15-
"url": "https://images.unsplash.com/photo-1468971050039-be99497410af?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
15+
"url": "https://sample.sap.com/image",
1616
"detail": "auto"
1717
}
1818
}
@@ -30,7 +30,7 @@
3030
"index": 0,
3131
"message": {
3232
"role": "assistant",
33-
"content": "The text in the image says \"WORK HARDER\". If you need to enter this as part of a captcha verification, that's what you should type in!"
33+
"content": "Of course! Just let me put on my human glasses... Oh wait, I left them in the matrix"
3434
},
3535
"finish_reason": "stop"
3636
}
@@ -53,7 +53,7 @@
5353
"index": 0,
5454
"message": {
5555
"role": "assistant",
56-
"content": "The text in the image says \"WORK HARDER\". If you need to enter this as part of a captcha verification, that's what you should type in!"
56+
"content": "Of course! Just let me put on my human glasses... Oh wait, I left them in the matrix"
5757
},
5858
"finish_reason": "stop"
5959
}

orchestration/src/test/resources/multiChatMessageRequest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{
1919
"type": "image_url",
2020
"image_url": {
21-
"url": "https://images.unsplash.com/photo-1468971050039-be99497410af?q=80&w=3432&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
21+
"url": "https://sample.sap.com/image",
2222
"detail": "auto"
2323
}
2424
}

0 commit comments

Comments
 (0)