File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
sample-code/spring-app/src/test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1313import com .sap .ai .sdk .orchestration .model .DPIEntities ;
1414import com .sap .ai .sdk .orchestration .model .LLMChoice ;
1515import com .sap .ai .sdk .orchestration .model .LLMModuleResultSynchronous ;
16+
17+ import java .util .List ;
1618import java .util .Map ;
1719import java .util .concurrent .atomic .AtomicInteger ;
1820import lombok .extern .slf4j .Slf4j ;
@@ -109,6 +111,28 @@ void testMessagesHistory() {
109111 assertThat (choices .get (0 ).getMessage ().getContent ()).isNotEmpty ();
110112 }
111113
114+ @ Test
115+ void testImageInput () {
116+ final var result =
117+ service
118+ .imageInput (
119+ "https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/SAP_2011_logo.svg/440px-SAP_2011_logo.svg.png" )
120+ .getOriginalResponse ();
121+ final var choices = ((LLMModuleResultSynchronous ) result .getOrchestrationResult ()).getChoices ();
122+ assertThat (choices .get (0 ).getMessage ().getContent ()).isNotEmpty ();
123+ }
124+
125+ @ Test
126+ void testMultiStringInput () {
127+ final var result =
128+ service
129+ .multiStringInput (
130+ List .of ("What is the capital of France?" , "What is Chess about?" , "What is 2+2?" ))
131+ .getOriginalResponse ();
132+ final var choices = ((LLMModuleResultSynchronous ) result .getOrchestrationResult ()).getChoices ();
133+ assertThat (choices .get (0 ).getMessage ().getContent ()).isNotEmpty ();
134+ }
135+
112136 @ SuppressWarnings ("unchecked" )
113137 @ Test
114138 void testMaskingAnonymization () {
You can’t perform that action at this time.
0 commit comments