@tavily/ai-sdk 0.4.1 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ declare const tavilySearch: (options?: TavilySearchOptions) => ai.Tool<{
11
11
  query: string;
12
12
  searchDepth?: "basic" | "advanced" | "fast" | "ultra-fast" | undefined;
13
13
  timeRange?: "year" | "month" | "week" | "day" | "y" | "m" | "w" | "d" | undefined;
14
+ exactMatch?: boolean | undefined;
14
15
  }, _tavily_core.TavilySearchResponse>;
15
16
 
16
17
  type TavilyExtractOptions = TavilyClientOptions & Partial<TavilyExtractOptions$1>;
package/dist/index.js CHANGED
@@ -9,7 +9,8 @@ var tavilySearch = (options = {}) => {
9
9
  searchDepth: z.enum(["basic", "advanced", "fast", "ultra-fast"]).optional().describe(
10
10
  "The depth of the search - 'basic' for quick results, 'advanced' for comprehensive search, 'fast' for low latency with high relevance (BETA), 'ultra-fast' prioritizes latency above all (BETA)"
11
11
  ),
12
- timeRange: z.enum(["year", "month", "week", "day", "y", "m", "w", "d"]).optional().describe("Time range for search results")
12
+ timeRange: z.enum(["year", "month", "week", "day", "y", "m", "w", "d"]).optional().describe("Time range for search results"),
13
+ exactMatch: z.boolean().optional().describe("Only return results containing the exact phrase(s) in quotes in your query")
13
14
  });
14
15
  return tool({
15
16
  description: "Search the web for real-time information using Tavily's AI-optimized search engine. Returns relevant sources, snippets, and optional AI-generated answers.",
@@ -17,12 +18,14 @@ var tavilySearch = (options = {}) => {
17
18
  execute: async ({
18
19
  query,
19
20
  searchDepth: inputSearchDepth,
20
- timeRange: inputTimeRange
21
+ timeRange: inputTimeRange,
22
+ exactMatch: inputExactMatch
21
23
  }) => {
22
24
  return await client.search(query, {
23
25
  ...options,
24
26
  searchDepth: inputSearchDepth ?? options.searchDepth,
25
- timeRange: inputTimeRange ?? options.timeRange
27
+ timeRange: inputTimeRange ?? options.timeRange,
28
+ ...inputExactMatch !== void 0 && { exactMatch: inputExactMatch }
26
29
  });
27
30
  }
28
31
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tavily/ai-sdk",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Tavily AI SDK tools - Search, Extract, Crawl, and Map",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -44,7 +44,7 @@
44
44
  "typescript": "^5.9.3"
45
45
  },
46
46
  "dependencies": {
47
- "@tavily/core": "^0.6.2"
47
+ "@tavily/core": "^0.7.2"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "ai": "^5.0.0 || ^6.0.0",