File tree Expand file tree Collapse file tree 6 files changed +7
-9
lines changed
main/java/com/sap/ai/sdk/orchestration
java/com/sap/ai/sdk/orchestration
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services Expand file tree Collapse file tree 6 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1212
1313### ✨ New Functionality
1414
15+ - Upgrade to release 2502a of AI Core.
1516- [ Add Orchestration ` LlamaGuardFilter ` ] ( ../guides/ORCHESTRATION_CHAT_COMPLETION.md#chat-completion-filter ) .
1617
1718### 📈 Improvements
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ public class Grounding implements GroundingProvider {
2828
2929 @ Nonnull
3030 private List <GroundingModuleConfigConfigFiltersInner > filters =
31- List .of (
32- DocumentGroundingFilter .create ().id ("" ).dataRepositoryType (DataRepositoryType .VECTOR ));
31+ List .of (DocumentGroundingFilter .create ().dataRepositoryType (DataRepositoryType .VECTOR ));
3332
3433 @ Setter (onMethod_ = {@ Nonnull })
3534 private TypeEnum documentGroundingService = TypeEnum .DOCUMENT_GROUNDING_SERVICE ;
Original file line number Diff line number Diff line change @@ -145,14 +145,14 @@ void testGroundingConfig() {
145145 List <GroundingModuleConfigConfigFiltersInner > filters = configConfig .getFilters ();
146146 assertThat (filters ).hasSize (1 );
147147 DocumentGroundingFilter filter = (DocumentGroundingFilter ) filters .get (0 );
148- assertThat (filter .getId ()).isEqualTo ( "" );
148+ assertThat (filter .getId ()).isNull ( );
149149 assertThat (filter .getDataRepositoryType ()).isEqualTo (VECTOR );
150150 }
151151
152152 @ Test
153153 void testGroundingConfigWithFilters () {
154- var filter1 = DocumentGroundingFilter .create ().id ("123" ). dataRepositoryType ( VECTOR );
155- var filter2 = DocumentGroundingFilter .create ().id ("234" ). dataRepositoryType ( VECTOR );
154+ var filter1 = DocumentGroundingFilter .create ().dataRepositoryType ( VECTOR ). id ("123" );
155+ var filter2 = DocumentGroundingFilter .create ().dataRepositoryType ( VECTOR ). id ("234" );
156156 var groundingConfig = Grounding .create ().filters (filter1 , filter2 );
157157 var config =
158158 new OrchestrationModuleConfig ().withLlmConfig (GPT_4O ).withGrounding (groundingConfig );
Original file line number Diff line number Diff line change @@ -153,7 +153,6 @@ void testGrounding() throws IOException {
153153 .selectMode (List .of (SearchSelectOptionEnum .IGNORE_IF_KEY_ABSENT ));
154154 final var databaseFilter =
155155 DocumentGroundingFilter .create ()
156- .id ("arbitrary-user-defined-id" )
157156 .dataRepositoryType (DataRepositoryType .VECTOR )
158157 .searchConfig (GroundingFilterSearchConfiguration .create ().maxChunkCount (3 ))
159158 .documentMetadata (List .of (documentMetadata ))
Original file line number Diff line number Diff line change 2525 "type" : " document_grounding_service" ,
2626 "config" : {
2727 "filters" : [ {
28- "id" : " arbitrary-user-defined-id" ,
2928 "search_config" : {
3029 "max_chunk_count" : 3
3130 },
4342 } ]
4443 } ],
4544 "input_params" : [ " query" ],
46- "output_param" : " results"
45+ "output_param" : " results" ,
46+ "metadata_params" : [ ]
4747 }
4848 }
4949 },
Original file line number Diff line number Diff line change @@ -293,7 +293,6 @@ public OrchestrationChatResponse grounding(@Nonnull final String userMessage) {
293293 // optional filter for document chunks
294294 val databaseFilter =
295295 DocumentGroundingFilter .create ()
296- .id ("" )
297296 .dataRepositoryType (DataRepositoryType .VECTOR )
298297 .searchConfig (GroundingFilterSearchConfiguration .create ().maxChunkCount (1 ))
299298 .addDocumentMetadataItem (documentMetadata );
You can’t perform that action at this time.
0 commit comments