Skip to content

.Net: Plugin ITextSearch.CreateWithGetSearchResults configurable with TextSearchOptions #10207

Open
@f-bourqui

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

Labels

.NETIssue or Pull requests regarding .NET codeBuildFeatures planned for next Build conferencetext_search

Type

No type

Projects

  • Status

    Sprint: In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions