IWebSearchService
Last updated
Last updated
The offers web search capabilities. Currently, the only implemented consumer of this service is the . However, you can also incorporate this service into your own tools as needed.
Implementing this service is straightforward, as it requires only a single property and one method. The property, MaxSites
, is used to limit the number of search results returned. The method is responsible for returning the search results.
The result is a single string that is included in the RAG (Retrieve-and-Generate) context. You can format this string as you wish, but it's essential that the AI can discern both the URL and a snippet or abstract text from it. The built-in services typically format the result as follows:
The IWebSearchService interface offers several built-in implementations: , , and .
You can download the implementation below, which serves as a basic guideline for setting up your own web search service.