Open API Toolkit
The Open API Toolkit node is a component that loads and initializes an Open API specification, creating a set of tools that can be used to interact with the API described by the specification.
Node Details
-
Name: OpenAPIToolkit_Tools
-
Type: OpenAPIToolkit
-
Category: Tools
-
Version: 1.0
-
Description: Load OpenAPI specification
Parameters
Inputs
-
Language Model
-
Name: model
-
Type: BaseLanguageModel
-
Description: The language model to be used with the OpenAPI toolkit
-
-
YAML File
-
Name: yamlFile
-
Type: file
-
File Type: .yaml
-
Description: The OpenAPI specification file in YAML format
-
Credential (Optional)
-
Name: credential
-
Type: credential
-
Credential Names: openAPIAuth
-
Description: Only needed if the YAML OpenAPI Spec requires authentication
Functionality
-
Loads the provided YAML file containing the OpenAPI specification
-
Supports loading from base64-encoded string or file storage
-
Initializes the OpenApiToolkit with the loaded specification and provided language model
-
Handles authentication if credentials are provided
-
Returns a set of tools based on the OpenAPI specification
Usage
This node is used to create a toolkit of tools based on an OpenAPI specification. These tools can be used in various AI applications, such as chatbots or agents, to interact with the API described by the specification.
Output
The node returns an array of tools generated from the OpenAPI specification, which can be used in downstream nodes or processes.
Dependencies
-
js-yaml: For parsing YAML files
-
langchain: For OpenApiToolkit and related classes
-
Custom interfaces and utility functions from the parent project
Notes
-
The node supports loading YAML files from both base64-encoded strings and file storage systems
-
Authentication is handled through optional credentials, supporting Bearer token authentication
-
The node is designed to be flexible and can be integrated into various AI workflows that require API interaction based on OpenAPI specifications