File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -246,14 +246,14 @@ public OrchestrationChatResponse grounding(@Nonnull final String userMessage) {
246246 SearchDocumentKeyValueListPair .create ()
247247 .key ("document metadata" )
248248 .value ("2" )
249- .selectMode ( List . of ( SearchSelectOptionEnum .IGNORE_IF_KEY_ABSENT ) );
249+ .addSelectModeItem ( SearchSelectOptionEnum .IGNORE_IF_KEY_ABSENT );
250250 // optional filter for document chunks
251251 val databaseFilter =
252252 DocumentGroundingFilter .create ()
253253 .id ("" )
254254 .dataRepositoryType (DataRepositoryType .VECTOR )
255255 .searchConfig (GroundingFilterSearchConfiguration .create ().maxChunkCount (1 ))
256- .documentMetadata ( List . of ( documentMetadata ) );
256+ .addDocumentMetadataItem ( documentMetadata );
257257
258258 val groundingConfig = Grounding .create ().filters (databaseFilter );
259259 val prompt = groundingConfig .createGroundingPrompt (userMessage );
You can’t perform that action at this time.
0 commit comments