aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/chatbot/tools
diff options
context:
space:
mode:
authoralyssaf16 <alyssa_feinberg@brown.edu>2024-11-04 21:56:25 -0500
committeralyssaf16 <alyssa_feinberg@brown.edu>2024-11-04 21:56:25 -0500
commit1e4909f04fdcc4c0b3a60b8c75e8b687e2b63b8e (patch)
tree16fe239082c37cd4f7e10bbfa6964d13a458046a /src/client/views/nodes/chatbot/tools
parent95afe2c1093dc3229375c08e6684b3d9866ef7a2 (diff)
parent09d7d63d1f248a0bf1d36e4da804cbde5e12e209 (diff)
Merge branch 'ajs-finalagent' into alyssa-agent
Diffstat (limited to 'src/client/views/nodes/chatbot/tools')
-rw-r--r--src/client/views/nodes/chatbot/tools/SearchTool.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/chatbot/tools/SearchTool.ts b/src/client/views/nodes/chatbot/tools/SearchTool.ts
index 03340aae5..d22f4c189 100644
--- a/src/client/views/nodes/chatbot/tools/SearchTool.ts
+++ b/src/client/views/nodes/chatbot/tools/SearchTool.ts
@@ -6,7 +6,7 @@ import { ParametersType } from '../types/tool_types';
const searchToolParams = [
{
- name: 'query',
+ name: 'queries',
type: 'string[]',
description: 'The search query or queries to use for finding websites',
required: true,
@@ -20,7 +20,7 @@ export class SearchTool extends BaseTool<SearchToolParamsType> {
private _addLinkedUrlDoc: (url: string, id: string) => void;
private _max_results: number;
- constructor(addLinkedUrlDoc: (url: string, id: string) => void, max_results: number = 5) {
+ constructor(addLinkedUrlDoc: (url: string, id: string) => void, max_results: number = 4) {
super(
'searchTool',
'Search the web to find a wide range of websites related to a query or multiple queries',
@@ -33,8 +33,9 @@ export class SearchTool extends BaseTool<SearchToolParamsType> {
}
async execute(args: ParametersType<SearchToolParamsType>): Promise<Observation[]> {
- const queries = args.query;
+ const queries = args.queries;
+ console.log(`Searching the web for queries: ${queries[0]}`);
// Create an array of promises, each one handling a search for a query
const searchPromises = queries.map(async query => {
try {