@tavily/ai-sdk 0.3.0 → 0.4.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 +1 -1
- package/dist/index.js +6 -6
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ type TavilySearchOptions = TavilyClientOptions & Partial<TavilySearchOptions$1>;
|
|
|
9
9
|
*/
|
|
10
10
|
declare const tavilySearch: (options?: TavilySearchOptions) => ai.Tool<{
|
|
11
11
|
query: string;
|
|
12
|
-
searchDepth?: "basic" | "advanced" | undefined;
|
|
12
|
+
searchDepth?: "basic" | "advanced" | "fast" | "ultra-fast" | undefined;
|
|
13
13
|
timeRange?: "year" | "month" | "week" | "day" | "y" | "m" | "w" | "d" | undefined;
|
|
14
14
|
}, _tavily_core.TavilySearchResponse>;
|
|
15
15
|
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { tool } from "ai";
|
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { tavily } from "@tavily/core";
|
|
5
5
|
var tavilySearch = (options = {}) => {
|
|
6
|
-
const client = tavily(options);
|
|
6
|
+
const client = tavily({ ...options, clientSource: "ai-sdk" });
|
|
7
7
|
const inputSchema = z.object({
|
|
8
8
|
query: z.string().describe("The search query to look up on the web"),
|
|
9
|
-
searchDepth: z.enum(["basic", "advanced"]).optional().describe(
|
|
10
|
-
"The depth of the search - 'basic' for quick results, 'advanced' for comprehensive search"
|
|
9
|
+
searchDepth: z.enum(["basic", "advanced", "fast", "ultra-fast"]).optional().describe(
|
|
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
12
|
timeRange: z.enum(["year", "month", "week", "day", "y", "m", "w", "d"]).optional().describe("Time range for search results")
|
|
13
13
|
});
|
|
@@ -33,7 +33,7 @@ import { tool as tool2 } from "ai";
|
|
|
33
33
|
import { z as z2 } from "zod";
|
|
34
34
|
import { tavily as tavily2 } from "@tavily/core";
|
|
35
35
|
var tavilyExtract = (options = {}) => {
|
|
36
|
-
const client = tavily2(options);
|
|
36
|
+
const client = tavily2({ ...options, clientSource: "ai-sdk" });
|
|
37
37
|
const inputSchema = z2.object({
|
|
38
38
|
urls: z2.array(z2.string()).describe("Array of URLs to extract content from"),
|
|
39
39
|
extractDepth: z2.enum(["basic", "advanced"]).optional().describe(
|
|
@@ -63,7 +63,7 @@ import { tool as tool3 } from "ai";
|
|
|
63
63
|
import { z as z3 } from "zod";
|
|
64
64
|
import { tavily as tavily3 } from "@tavily/core";
|
|
65
65
|
var tavilyCrawl = (options = {}) => {
|
|
66
|
-
const client = tavily3(options);
|
|
66
|
+
const client = tavily3({ ...options, clientSource: "ai-sdk" });
|
|
67
67
|
const inputSchema = z3.object({
|
|
68
68
|
url: z3.string().describe("The base URL to start crawling from"),
|
|
69
69
|
maxDepth: z3.number().min(1).max(5).optional().describe(
|
|
@@ -102,7 +102,7 @@ import { tool as tool4 } from "ai";
|
|
|
102
102
|
import { z as z4 } from "zod";
|
|
103
103
|
import { tavily as tavily4 } from "@tavily/core";
|
|
104
104
|
var tavilyMap = (options = {}) => {
|
|
105
|
-
const client = tavily4(options);
|
|
105
|
+
const client = tavily4({ ...options, clientSource: "ai-sdk" });
|
|
106
106
|
const inputSchema = z4.object({
|
|
107
107
|
url: z4.string().describe("The base URL to start mapping from"),
|
|
108
108
|
maxDepth: z4.number().min(1).max(5).optional().describe(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tavily/ai-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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": "
|
|
47
|
+
"@tavily/core": "^0.6.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"ai": "^5.0.0",
|