forked from wishonia/wishonia
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtavily.d.ts
43 lines (38 loc) · 1.05 KB
/
tavily.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
declare module '@tavily/core' {
export interface TavilySearchOptions {
searchDepth?: "basic" | "advanced";
topic?: "general" | "news" | "finance";
days?: number;
maxResults?: number;
includeImages?: boolean;
includeImageDescriptions?: boolean;
includeAnswer?: boolean;
includeRawContent?: boolean;
includeDomains?: Array<string>;
excludeDomains?: Array<string>;
maxTokens?: number;
}
export interface TavilyImage {
url: string;
description?: string;
}
export interface TavilySearchResult {
title: string;
url: string;
content: string;
rawContent?: string;
score: number;
publishedDate: string;
}
export interface TavilySearchResponse {
answer?: string;
query: string;
responseTime: number;
images: Array<TavilyImage>;
results: Array<TavilySearchResult>;
}
export interface TavilyClient {
search: (query: string, options: TavilySearchOptions) => Promise<TavilySearchResponse>;
}
export function tavily(options?: { apiKey?: string }): TavilyClient;
}