Function createOpenApiAgent

  • Parameters

    • llm: BaseLanguageModelInterface

      The language model to use.

    • openApiToolkit: OpenApiToolkit

      The OpenAPI toolkit to use.

    • Optional args: ZeroShotCreatePromptArgs

      Optional arguments for creating the prompt.

    Returns AgentExecutor

    An AgentExecutor for executing the agent with the tools.

    ⚠️ Deprecated ⚠️

    Create a specific agent with a custom tool instead.

    This feature is deprecated and will be removed in the future.

    It is not recommended for use.

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

    Security

    Security Notice This agent provides access to external APIs. Use with caution as this agent can make API calls with arbitrary headers. Exposing this agent to users could lead to security vulnerabilities. Consider limiting access to what endpoints it can hit, what actions can be taken, and more.

    Link

    See https://js.langchain.com/docs/security for more information.

Generated using TypeDoc