Extends the RequestsToolkit class and adds a dynamic tool for
exploring JSON data. It creates a JSON agent using the JsonToolkit
and the provided language model, and adds the JSON explorer tool to the
toolkit.
constresult = awaittoolkit.invoke({ input: "Make a POST request to openai /completions. The prompt should be 'tell me a joke.'", }); console.log(`Got output ${result.output}`);
Extends the
RequestsToolkit
class and adds a dynamic tool for exploring JSON data. It creates a JSON agent using theJsonToolkit
and the provided language model, and adds the JSON explorer tool to the toolkit.Example