generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Description
Describe the Problem
When using
public VectorSearchResults search(
@Nonnull final String aiResourceGroup, @Nonnull final TextSearchRequest textSearchRequest)
throws OpenApiRequestExceptionthe VectorSearchResults are too deeply nested. To access the actual matching chunks someone has to do the following:
var context = new StringBuilder();
searchResult.getResults().forEach(r -> {
r.getResults().forEach(
s -> s.getDocuments().forEach(
d -> d.getChunks().forEach(
c -> {
context.append(c.getContent());
})));
});This makes the usage unnecessarily complex.
Propose a Solution
I would expect a Collection<VectorChunk> objects from the searchResult object, so they can be used directly in inference afterwards.
Describe Alternatives
No response
Affected Development Phase
Development
Impact
Inconvenience
Timeline
No response