chat-agent-toolkit 1.2.9 → 1.2.11
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.
|
@@ -9,12 +9,12 @@ export declare const AGENT_TOOLS: ({
|
|
|
9
9
|
query: z.ZodString;
|
|
10
10
|
category: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
11
11
|
general: "general";
|
|
12
|
-
it: "it";
|
|
13
|
-
files: "files";
|
|
14
12
|
news: "news";
|
|
15
13
|
videos: "videos";
|
|
16
14
|
images: "images";
|
|
17
15
|
science: "science";
|
|
16
|
+
files: "files";
|
|
17
|
+
it: "it";
|
|
18
18
|
}>>>;
|
|
19
19
|
recency: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
20
20
|
none: "none";
|
|
@@ -69,14 +69,14 @@ export declare const AGENT_TOOLS: ({
|
|
|
69
69
|
description: string;
|
|
70
70
|
schema: z.ZodObject<{
|
|
71
71
|
provider: z.ZodEnum<{
|
|
72
|
-
anthropic: "anthropic";
|
|
73
|
-
openai: "openai";
|
|
74
72
|
groq: "groq";
|
|
73
|
+
openai: "openai";
|
|
74
|
+
anthropic: "anthropic";
|
|
75
75
|
xai: "xai";
|
|
76
76
|
google: "google";
|
|
77
|
+
cloudflare: "cloudflare";
|
|
77
78
|
perplexity: "perplexity";
|
|
78
79
|
together: "together";
|
|
79
|
-
cloudflare: "cloudflare";
|
|
80
80
|
}>;
|
|
81
81
|
key: z.ZodOptional<z.ZodString>;
|
|
82
82
|
agent: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
@@ -120,16 +120,16 @@ export declare const AGENT_TOOLS: ({
|
|
|
120
120
|
wait: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
121
121
|
timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
122
122
|
waitUntil: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
123
|
-
load: "load";
|
|
124
123
|
domcontentloaded: "domcontentloaded";
|
|
124
|
+
load: "load";
|
|
125
125
|
networkidle0: "networkidle0";
|
|
126
126
|
networkidle2: "networkidle2";
|
|
127
127
|
}>>>;
|
|
128
128
|
bypassCaptcha: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
129
129
|
sessionId: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
130
130
|
format: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
131
|
-
json: "json";
|
|
132
131
|
html: "html";
|
|
132
|
+
json: "json";
|
|
133
133
|
}>>>;
|
|
134
134
|
scraperUrl: z.ZodOptional<z.ZodString>;
|
|
135
135
|
scraperApiKey: z.ZodOptional<z.ZodString>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chat-agent-toolkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.11",
|
|
4
4
|
"description": "Multi-provider AI agent toolkit: generate language responses, search the web, extract content, and manage memory across 10+ LLM providers.",
|
|
5
5
|
"author": "vtempest <grokthiscontact@gmail.com>",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -67,13 +67,13 @@ export async function rerankDocs(
|
|
|
67
67
|
return docs;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
let filesData: {
|
|
70
|
+
let filesData: { title: string; content: string }[] = [];
|
|
71
71
|
|
|
72
72
|
if (fileIds.length > 0 && r2Credentials) {
|
|
73
73
|
const results = await Promise.all(
|
|
74
74
|
fileIds.map((fileId) => downloadExtractedContent(fileId, r2Credentials))
|
|
75
75
|
);
|
|
76
|
-
filesData = results.filter((r) => r !== null)
|
|
76
|
+
filesData = results.filter((r) => r !== null);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
if (query.toLocaleLowerCase() === "summarize") {
|
|
@@ -86,7 +86,7 @@ export async function rerankDocs(
|
|
|
86
86
|
|
|
87
87
|
const fileDocs: Document[] = filesData.map((fileData) => ({
|
|
88
88
|
pageContent: fileData.content,
|
|
89
|
-
metadata: { title: fileData.
|
|
89
|
+
metadata: { title: fileData.title, url: "File" },
|
|
90
90
|
}));
|
|
91
91
|
|
|
92
92
|
// Combine file docs with web results, cap at 15
|