Table of Contents

Class WebSearchTools

Namespace
JD.AI.Core.Tools
Assembly
JD.AI.Core.dll

Web search tool using Bing Search API (via Copilot connector auth or direct API key).

[ToolPlugin("WebSearchTools", RequiresInjection = true)]
public sealed class WebSearchTools : IDisposable
Inheritance
WebSearchTools
Implements
Inherited Members

Constructors

WebSearchTools(string?)

public WebSearchTools(string? bingApiKey = null)

Parameters

bingApiKey string

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

SearchAsync(string, int, CancellationToken)

[KernelFunction("web_search")]
[ToolSafetyTier(SafetyTier.AlwaysConfirm)]
public Task<string> SearchAsync(string query, int count = 5, CancellationToken ct = default)

Parameters

query string
count int
ct CancellationToken

Returns

Task<string>