.Net: Plugin ITextSearch.CreateWithGetSearchResults configurable with TextSearchOptions #10207
Open
Description
I want to create a plugin using CreateWithGetSearchResults
on a VectorStoreTextSearch
and I'd like to configure the TextSearchOptions
.
Unfortunately, it's not available.
public static KernelPlugin CreateWithGetSearchResults(this ITextSearch textSearch, string pluginName, string? description = null)
{
Verify.NotNull(textSearch);
Verify.NotNull(pluginName);
return KernelPluginFactory.CreateFromFunctions(pluginName, description, [textSearch.CreateGetSearchResults()]);
}
I would have expected to have this instead
public static KernelPlugin CreateWithGetSearchResults(this ITextSearch textSearch, string pluginName, string? description = null, TextSearchOptions? searchOptions = null)
{
Verify.NotNull(textSearch);
Verify.NotNull(pluginName);
return KernelPluginFactory.CreateFromFunctions(pluginName, description, [textSearch.CreateGetSearchResults(searchOptions:searchOptions)]);
}
I first thought that it would be configurable while injecting it kernelBuilder.AddVectorStoreTextSearch
by proving VectorStoreTextSearchOptions
but that class is empty.
Does it make sense to add TextSearchOptions
to CreateWithGetSearchResults
or is it planned to do it with VectorStoreTextSearchOptions
?
Metadata
Assignees
Type
Projects
Status
Sprint: In Progress