builder / lib /web-search /types.ts
Leon4gr45's picture
Upload folder using huggingface_hub (part 3)
94193b5 verified
Raw
History Blame Contribute Delete
725 Bytes
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[];
}