chat-agent-toolkit 1.2.123 → 1.2.125

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.
@@ -64,53 +64,6 @@ export declare const AGENT_TOOLS: ({
64
64
  baseURL: any;
65
65
  apiKey: any;
66
66
  }) => Promise<string>;
67
- } | {
68
- name: string;
69
- description: string;
70
- schema: z.ZodObject<{
71
- provider: z.ZodEnum<{
72
- groq: "groq";
73
- openai: "openai";
74
- anthropic: "anthropic";
75
- xai: "xai";
76
- google: "google";
77
- cloudflare: "cloudflare";
78
- perplexity: "perplexity";
79
- together: "together";
80
- }>;
81
- key: z.ZodOptional<z.ZodString>;
82
- agent: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
83
- question: "question";
84
- "summarize-bullets": "summarize-bullets";
85
- summarize: "summarize";
86
- "suggest-followups": "suggest-followups";
87
- "answer-cite-sources": "answer-cite-sources";
88
- "query-resolution": "query-resolution";
89
- "knowledge-graph-nodes": "knowledge-graph-nodes";
90
- "summary-longtext": "summary-longtext";
91
- }>>>;
92
- model: z.ZodDefault<z.ZodOptional<z.ZodString>>;
93
- temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
94
- html: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
95
- query: z.ZodOptional<z.ZodString>;
96
- chat_history: z.ZodOptional<z.ZodString>;
97
- article: z.ZodOptional<z.ZodString>;
98
- baseURL: z.ZodOptional<z.ZodString>;
99
- apiKey: z.ZodOptional<z.ZodString>;
100
- }, z.core.$strip>;
101
- func: ({ provider, key, agent, model, temperature, html, query, chat_history, article, baseURL, apiKey }: {
102
- provider: any;
103
- key: any;
104
- agent?: string;
105
- model?: string;
106
- temperature?: number;
107
- html?: boolean;
108
- query: any;
109
- chat_history: any;
110
- article: any;
111
- baseURL: any;
112
- apiKey: any;
113
- }) => Promise<string>;
114
67
  } | {
115
68
  name: string;
116
69
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chat-agent-toolkit",
3
- "version": "1.2.123",
3
+ "version": "1.2.125",
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": "rights.institute/PROSPER",
@@ -98,7 +98,7 @@
98
98
  "html-entities": "^2.6.0",
99
99
  "manage-storage": "^0.0.13",
100
100
  "marked": "^17.0.4",
101
- "qwksearch-api-client": "^0.0.12",
101
+ "qwksearch-api-client": "^0.9.64",
102
102
  "write-language": "^0.1.4",
103
103
  "zod": "^4.3.6"
104
104
  },
@@ -39,14 +39,14 @@ export const AGENT_TOOLS = [
39
39
  const baseUrl = baseURL || QWKSEARCH_CONFIG.baseURL;
40
40
  const headers = apiKey || QWKSEARCH_CONFIG.apiKey ? { 'x-api-key': apiKey || QWKSEARCH_CONFIG.apiKey } : undefined;
41
41
 
42
- const result = await QwkSearch.searchWeb({
42
+ const result = await QwkSearch.agentSearch({
43
43
  query: {
44
44
  q: query,
45
45
  cat: category,
46
46
  recency: recency,
47
47
  page: page,
48
48
  lang: language,
49
- public: isPublic,
49
+ publicInstances: isPublic,
50
50
  timeout: timeout
51
51
  },
52
52
  baseUrl: baseUrl,
@@ -102,7 +102,7 @@ export const AGENT_TOOLS = [
102
102
  const baseUrl = baseURL || QWKSEARCH_CONFIG.baseURL;
103
103
  const headers = apiKey || QWKSEARCH_CONFIG.apiKey ? { 'x-api-key': apiKey || QWKSEARCH_CONFIG.apiKey } : undefined;
104
104
 
105
- const result = await QwkSearch.extractContent({
105
+ const result = await QwkSearch.getArticle({
106
106
  query: {
107
107
  url: url,
108
108
  images: images,
@@ -165,90 +165,6 @@ export const AGENT_TOOLS = [
165
165
  }
166
166
  },
167
167
  },
168
- {
169
- name: "generate_ai_response",
170
- description:
171
- "Generate AI language model responses using QwkSearch API with various agent templates. Supports multiple providers (Groq, OpenAI, Anthropic, etc.) and agent types for different tasks like summarization, question answering, and content generation.",
172
- schema: z.object({
173
- provider: z.enum(["groq", "openai", "anthropic", "together", "xai", "google", "perplexity", "cloudflare"]),
174
- key: z.string().optional(),
175
- agent: z.enum([
176
- "question",
177
- "summarize-bullets",
178
- "summarize",
179
- "suggest-followups",
180
- "answer-cite-sources",
181
- "query-resolution",
182
- "knowledge-graph-nodes",
183
- "summary-longtext"
184
- ]).optional().default("question"),
185
- model: z.string().optional().default("meta-llama/llama-4-maverick-17b-128e-instruct"),
186
- temperature: z.number().min(0).max(2).optional().default(0.7),
187
- html: z.boolean().optional().default(true),
188
- query: z.string().optional(),
189
- chat_history: z.string().optional(),
190
- article: z.string().optional(),
191
- baseURL: z.string().optional(),
192
- apiKey: z.string().optional()
193
- }),
194
- func: async ({ provider, key, agent = "question", model = "meta-llama/llama-4-maverick-17b-128e-instruct", temperature = 0.7, html = true, query, chat_history, article, baseURL, apiKey }) => {
195
- try {
196
- // Use provided config or fall back to environment/defaults
197
- const baseUrl = baseURL || QWKSEARCH_CONFIG.baseURL;
198
- const headers = apiKey || QWKSEARCH_CONFIG.apiKey ? { 'x-api-key': apiKey || QWKSEARCH_CONFIG.apiKey } : undefined;
199
-
200
- const requestBody = {
201
- agent,
202
- provider,
203
- model,
204
- html,
205
- temperature
206
- };
207
-
208
- if (key) {
209
- requestBody.key = key;
210
- }
211
-
212
- if (query) {
213
- requestBody.query = query;
214
- }
215
-
216
- if (chat_history) {
217
- requestBody.chat_history = chat_history;
218
- }
219
-
220
- if (article) {
221
- requestBody.article = article;
222
- }
223
-
224
- const result = await QwkSearch.writeLanguage({
225
- body: requestBody,
226
- baseUrl: baseUrl,
227
- ...(headers && { headers })
228
- });
229
-
230
- if (!result.data) {
231
- return `No response generated. Please check your input parameters and try again.`;
232
- }
233
-
234
- let resultText = `AI Response (${agent} agent, ${provider} provider):\n\n`;
235
-
236
- if (result.data.content) {
237
- resultText += result.data.content;
238
- }
239
-
240
- if (result.data.extract) {
241
- resultText += `\n\nStructured Extract:\n${JSON.stringify(result.data.extract, null, 2)}`;
242
- }
243
-
244
- resultText += `\n\nThis is the complete AI-generated response.`;
245
-
246
- return resultText;
247
- } catch (error) {
248
- return `Unable to generate AI response. Error: ${error.message}`;
249
- }
250
- },
251
- },
252
168
  {
253
169
  name: "render_page_with_javascript",
254
170
  description: