TextSearchExtensions.CreateWithGetSearchResults Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| CreateWithGetSearchResults(ITextSearch, String, String) |
Creates a plugin from an ITextSearch implementation. |
| CreateWithGetSearchResults(ITextSearch, String, JsonSerializerOptions, String) |
Creates a plugin from an ITextSearch implementation. |
CreateWithGetSearchResults(ITextSearch, String, String)
Creates a plugin from an ITextSearch implementation.
public static Microsoft.SemanticKernel.KernelPlugin CreateWithGetSearchResults(this Microsoft.SemanticKernel.Data.ITextSearch textSearch, string pluginName, string? description = default);
static member CreateWithGetSearchResults : Microsoft.SemanticKernel.Data.ITextSearch * string * string -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function CreateWithGetSearchResults (textSearch As ITextSearch, pluginName As String, Optional description As String = Nothing) As KernelPlugin
Parameters
- textSearch
- ITextSearch
The instance of ITextSearch to be used by the plugin.
- pluginName
- String
The name for the plugin.
- description
- String
A description of the plugin.
Returns
A KernelPlugin instance with a GetSearchResults operation that calls the provided GetSearchResultsAsync(String, TextSearchOptions, CancellationToken).
Remarks
The plugin will have a single function called `GetSearchResults` which will return a IEnumerable<T>
Applies to
CreateWithGetSearchResults(ITextSearch, String, JsonSerializerOptions, String)
Creates a plugin from an ITextSearch implementation.
public static Microsoft.SemanticKernel.KernelPlugin CreateWithGetSearchResults(this Microsoft.SemanticKernel.Data.ITextSearch textSearch, string pluginName, System.Text.Json.JsonSerializerOptions jsonSerializerOptions, string? description = default);
static member CreateWithGetSearchResults : Microsoft.SemanticKernel.Data.ITextSearch * string * System.Text.Json.JsonSerializerOptions * string -> Microsoft.SemanticKernel.KernelPlugin
<Extension()>
Public Function CreateWithGetSearchResults (textSearch As ITextSearch, pluginName As String, jsonSerializerOptions As JsonSerializerOptions, Optional description As String = Nothing) As KernelPlugin
Parameters
- textSearch
- ITextSearch
The instance of ITextSearch to be used by the plugin.
- pluginName
- String
The name for the plugin.
- jsonSerializerOptions
- JsonSerializerOptions
The JsonSerializerOptions to use for serialization and deserialization of various aspects of the function.
- description
- String
A description of the plugin.
Returns
A KernelPlugin instance with a GetSearchResults operation that calls the provided GetSearchResultsAsync(String, TextSearchOptions, CancellationToken).
Remarks
The plugin will have a single function called `GetSearchResults` which will return a IEnumerable<T>