Skip to Content

classifyWebSearch

classifyWebSearch(prompt: string, options: WebSearchClassifierOptions): Promise<WebSearchClassification>

Defined in: src/lib/chat/webSearchClassifier.ts:44 

Classify whether a prompt needs a web search.

Embeds the prompt and compares it against the pre-computed search and no-search centroid vectors.

Parameters

ParameterType

prompt

string

options

WebSearchClassifierOptions

Returns

Promise<WebSearchClassification>

Last updated on