Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
f-bourqui opened this issue Jan 16, 2025 · 0 comments
Assignees
Labels
Build Features planned for next Build conference .NET Issue or Pull requests regarding .NET code text_search

Comments

@f-bourqui
Copy link

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?

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Jan 16, 2025
@github-actions github-actions bot changed the title Plugin ITextSearch.CreateWithGetSearchResults configurable with TextSearchOptions .Net: Plugin ITextSearch.CreateWithGetSearchResults configurable with TextSearchOptions Jan 16, 2025
@markwallace-microsoft markwallace-microsoft self-assigned this Jan 16, 2025
@markwallace-microsoft markwallace-microsoft added the Build Features planned for next Build conference label Jan 16, 2025
@markwallace-microsoft markwallace-microsoft moved this to Sprint: In Progress in Semantic Kernel Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Features planned for next Build conference .NET Issue or Pull requests regarding .NET code text_search
Projects
Status: Sprint: In Progress
Development

No branches or pull requests

2 participants