File size: 725 Bytes
94193b5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | export interface WebSearchResult {
title: string;
url: string;
snippet: string;
content?: string; // page content, present only when the provider returns it
}
export interface WebSearchOpts { count?: number; markdown?: boolean; }
export interface WebSearchAuth { key?: string; searxngUrl?: string; }
export type WebSearchProviderId = 'tavily' | 'firecrawl' | 'brave' | 'searxng';
export interface WebSearchProvider {
id: WebSearchProviderId;
name: string;
auth: 'key' | 'url';
nativeContent: boolean; // true if search results already include page content
buildRequest(query: string, opts: WebSearchOpts, auth: WebSearchAuth): { url: string; init: RequestInit };
normalize(raw: any): WebSearchResult[];
}
|