Class: WebSearch

WebSearch(agent)

new WebSearch(agent)

Parameters:
Name Type Description
agent Agent
Source:

Members

args :Object.<string, string>

Dictionary of arguments for the tool.

Type:
  • Object.<string, string>
Source:

resp :Object.<string, string>

Response format of the tool.

Type:
  • Object.<string, string>
Source:

Methods

(async) _addToMemory(memEntry)

Parameters:
Name Type Description
memEntry
Source:

(async) googleSearch(query)

Parameters:
Name Type Description
query string
Source:

(async) run(args) → {Promise.<any>}

Executes the search.

Parameters:
Name Type Description
args Array.<{query: string, numResults: (number|undefined)}> | Object

The args object.

Source:
Returns:

The search results. The search results as a string.

Type
Promise.<any>