WebServiceCollectionExtensions.AddGoogleTextSearch 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.
Register an ITextSearch instance with the specified service ID.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddGoogleTextSearch(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string searchEngineId, string apiKey, Microsoft.SemanticKernel.Plugins.Web.Google.GoogleTextSearchOptions? options = default, string? serviceId = default);
static member AddGoogleTextSearch : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Microsoft.SemanticKernel.Plugins.Web.Google.GoogleTextSearchOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddGoogleTextSearch (services As IServiceCollection, searchEngineId As String, apiKey As String, Optional options As GoogleTextSearchOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the ITextSearch on.
- searchEngineId
- String
Google Search Engine ID (looks like "a12b345...")
- apiKey
- String
The API key credential used to authenticate requests against the Search service.
- options
- GoogleTextSearchOptions
Instance of GoogleTextSearchOptions to used when creating the GoogleTextSearch.
- serviceId
- String
An optional service id to use as the service key.