OpenAPIToolkit#

class langchain_community.agent_toolkits.openapi.toolkit.OpenAPIToolkit[source]#

Bases: BaseToolkit

Toolkit for interacting with an OpenAPI API.

Security Note: This toolkit contains tools that can read and modify

the state of a service; e.g., by creating, deleting, or updating, reading underlying data.

For example, this toolkit can be used to delete data exposed via an OpenAPI compliant API.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param allow_dangerous_requests: bool = False#

Allow dangerous requests. See documentation for details.

param json_agent: Any = None#

The JSON agent.

param requests_wrapper: TextRequestsWrapper [Required]#

The requests wrapper.

classmethod from_llm(llm: BaseLanguageModel, json_spec: JsonSpec, requests_wrapper: TextRequestsWrapper, allow_dangerous_requests: bool = False, **kwargs: Any) OpenAPIToolkit[source]#

Create json agent from llm, then initialize.

Parameters:
Return type:

OpenAPIToolkit

get_tools() List[BaseTool][source]#

Get the tools in the toolkit.

Return type:

List[BaseTool]

Examples using OpenAPIToolkit