File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
src/main/java/com/sap/ai/sdk/orchestration Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 3131 </developers >
3232 <properties >
3333 <project .rootdir>${project.basedir} /../</project .rootdir>
34- <coverage .complexity>78 %</coverage .complexity>
35- <coverage .line>91 %</coverage .line>
34+ <coverage .complexity>76 %</coverage .complexity>
35+ <coverage .line>90 %</coverage .line>
3636 <coverage .instruction>91%</coverage .instruction>
37- <coverage .branch>70 %</coverage .branch>
37+ <coverage .branch>69 %</coverage .branch>
3838 <coverage .method>70%</coverage .method>
3939 <coverage .class>100%</coverage .class>
4040 </properties >
Original file line number Diff line number Diff line change 1111import javax .annotation .Nonnull ;
1212import lombok .AccessLevel ;
1313import lombok .NoArgsConstructor ;
14+ import lombok .val ;
1415
1516/** Internal utility class for getting a default object mapper with preset configuration. */
1617@ NoArgsConstructor (access = AccessLevel .NONE )
@@ -28,11 +29,11 @@ public class OrchestrationJacksonConfiguration {
2829 @ Beta
2930 public static ObjectMapper getOrchestrationObjectMapper () {
3031
31- ObjectMapper JACKSON = getDefaultObjectMapper ();
32+ val jackson = getDefaultObjectMapper ();
3233
3334 // Add mix-ins
34- JACKSON .addMixIn (LLMModuleResult .class , JacksonMixins .LLMModuleResultMixIn .class );
35- JACKSON .addMixIn (
35+ jackson .addMixIn (LLMModuleResult .class , JacksonMixins .LLMModuleResultMixIn .class );
36+ jackson .addMixIn (
3637 ModuleResultsOutputUnmaskingInner .class ,
3738 JacksonMixins .ModuleResultsOutputUnmaskingInnerMixIn .class );
3839
@@ -42,7 +43,7 @@ public static ObjectMapper getOrchestrationObjectMapper() {
4243 ChatMessagesInner .class ,
4344 PolymorphicFallbackDeserializer .fromJsonSubTypes (ChatMessagesInner .class ))
4445 .setMixInAnnotation (ChatMessagesInner .class , JacksonMixins .NoneTypeInfoMixin .class );
45- JACKSON .registerModule (module );
46- return JACKSON ;
46+ jackson .registerModule (module );
47+ return jackson ;
4748 }
4849}
Original file line number Diff line number Diff line change 1111import com .fasterxml .jackson .core .JsonProcessingException ;
1212import com .fasterxml .jackson .databind .ObjectMapper ;
1313import com .google .common .annotations .Beta ;
14+ import com .sap .ai .sdk .orchestration .OrchestrationClientException ;
1415import com .sap .ai .sdk .orchestration .OrchestrationModuleConfig ;
1516import com .sap .ai .sdk .orchestration .model .LLMModuleConfig ;
1617import com .sap .ai .sdk .orchestration .model .ModuleConfigs ;
@@ -165,7 +166,8 @@ public <T extends ChatOptions> T copy() {
165166 return (T ) new OrchestrationChatOptions (copyConfig );
166167
167168 } catch (JsonProcessingException e ) {
168- throw new RuntimeException (e );
169+ throw new OrchestrationClientException (
170+ "Orchestration module configuration not readable: " + config , e );
169171 }
170172 }
171173
You can’t perform that action at this time.
0 commit comments