@codebam/cf-workers-telegram-bot 12.6.16 → 12.6.17
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/ai.js +1 -1
- package/dist/utils.d.ts +3 -2
- package/dist/utils.js +2 -1
- package/package.json +1 -1
package/dist/ai.js
CHANGED
|
@@ -79,7 +79,7 @@ input, config) {
|
|
|
79
79
|
return `- Name: ${t.name}\n Description: ${t.description}\n Parameters: ${JSON.stringify(t.parameters)}`;
|
|
80
80
|
})
|
|
81
81
|
.join('\n');
|
|
82
|
-
const promptInstruction = `\n\n[SYSTEM INSTRUCTION] You have access to the following tools:\n${toolInstructions}\n\nTo use a tool, you MUST output a tool call wrapped in XML format, like so:\n<tool_call>{"name": "search", "arguments": {"
|
|
82
|
+
const promptInstruction = `\n\n[SYSTEM INSTRUCTION] You have access to the following tools:\n${toolInstructions}\n\nTo use a tool, you MUST output a tool call wrapped in XML format, like so:\n<tool_call>{"name": "search", "arguments": {"query": "query" }}</tool_call>\nor\n<tool_call>{"name": "fetch", "arguments": {"url": "https://example.com" }}</tool_call>\n\nMake sure the tool call is outputted EXACTLY as shown. The system will intercept this call, execute the tool, and return the output to you. Do not write code or direct the user to run code; call the tools yourself.`;
|
|
83
83
|
systemMsg.content = systemMsg.content + promptInstruction;
|
|
84
84
|
}
|
|
85
85
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
|
@@ -132,7 +132,8 @@ export const searchTool = {
|
|
|
132
132
|
},
|
|
133
133
|
required: ['query'],
|
|
134
134
|
},
|
|
135
|
-
function: async (
|
|
135
|
+
function: async (args) => {
|
|
136
|
+
const query = args.query || args.q || '';
|
|
136
137
|
const instances = [
|
|
137
138
|
'https://searxng.site/',
|
|
138
139
|
'https://priv.au/',
|