Function createJsonAgent

  • Creates a JSON agent using a language model, a JSON toolkit, and optional prompt arguments. It creates a prompt for the agent using the JSON tools and the provided prefix and suffix. It then creates a ZeroShotAgent with the prompt and the JSON tools, and returns an AgentExecutor for executing the agent with the tools.

    Parameters

    • llm: BaseLanguageModel<any, BaseLanguageModelCallOptions>

      The language model used to create the JSON agent.

    • toolkit: JsonToolkit

      The JSON toolkit used to create the JSON agent.

    • Optional args: ZeroShotCreatePromptArgs

      Optional prompt arguments used to create the JSON agent.

    Returns AgentExecutor

    An AgentExecutor for executing the created JSON agent with the tools.

Generated using TypeDoc