Tool

Integrate ChatGPT Plugins with Agents

ChatGPT Plugin Tool loads ChatGPT manifest files, allowing Agents to interact with plugins via OpenAPI specs.

Works with githubopenairequests

81
Spark score
out of 100
Updated 2 days ago
Version 0.14.23
Models

Add to Favorites

Why it matters

Enable your AI agents to interact with external services by loading ChatGPT plugins. This asset allows agents to understand and utilize plugin functionalities, expanding their capabilities beyond core LLM functions.

Outcomes

What it gets done

01

Load ChatGPT plugins using manifest files or URLs.

02

Expose plugin functionalities as tools for AI agents.

03

Allow agents to query and interact with loaded plugins.

04

Leverage OpenAPI specifications for tool integration.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/li-tool-tools-chatgpt-plugin | bash

Overview

ChatGPT Plugin Tool

ChatGPT Plugin Tool allows Agents to load a plugin using a ChatGPT manifest file and interact with it. It parses the plugin's OpenAPI specification and makes tools available from the OpenAPI Tool Spec and Requests Tool Spec. Authentication headers are passed to the Requests tool spec. Use this tool when you need an Agent to load and interact with a ChatGPT plugin using its manifest file. The tool is designed to be used as a way to load data as a Tool in an Agent.

What it does

ChatGPT Plugin Tool allows Agents to load a plugin using a ChatGPT manifest file and interact with it. It parses the plugin's OpenAPI specification and makes tools available from the OpenAPI Tool Spec and Requests Tool Spec. Authentication headers are passed to the Requests tool spec.

When to use - and when NOT to

Use this tool when you need an Agent to load and interact with a ChatGPT plugin using its manifest file. The tool is designed to be used as a way to load data as a Tool in an Agent.

Do not use this tool if you don't have a ChatGPT plugin manifest file to work with.

Inputs and outputs

You provide either a parsed manifest dictionary (loaded via YAML/JSON) or a direct URL to a manifest file. The tool returns a ChatGPTPluginToolSpec object that converts into a list of callable tools for your agent. The describe_plugin method returns a description of the loaded plugin, while load_openapi_spec returns the parsed OpenAPI specification.

Integrations

This tool makes tools available from the OpenAPI Tool Spec and Requests Tool Spec. The plugin OpenAPI definition is loaded into the OpenAPI tool spec, and authentication headers are passed in to the Requests tool spec.

Who it's for

This tool is for developers working with Agents who need to load and interact with ChatGPT plugins using manifest files.

Example usage

### Load the manifest
import requests
import yaml

f = requests.get(
    "https://raw.githubusercontent.com/sisbell/chatgpt-plugin-store/main/manifests/today-currency-converter.oiconma.repl.co.json"
).text
manifest = yaml.safe_load(f)

from llama_index.tools.chatgpt_plugin import ChatGPTPluginToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.requests import RequestsToolSpec

requests_spec = RequestsToolSpec()
plugin_spec = ChatGPTPluginToolSpec(manifest)
### OR
plugin_spec = ChatGPTPluginToolSpec(
    manifest_url="https://raw.githubusercontent.com/sisbell/chatgpt-plugin-store/main/manifests/today-currency-converter.oiconma.repl.co.json"
)

agent = FunctionAgent(
    tools=[*plugin_spec.to_tool_list(), *requests_spec.to_tool_list()],
    llm=OpenAI(model="gpt-4.1"),
)
print(await agent.run("Convert 100 euros to CAD"))
Source README

ChatGPT Plugin Tool

This tool allows Agents to load a plugin using a ChatGPT manifest file, and have the Agent interact with it.

Usage

This tool has more extensive example usage documented in a Jupyter notebook here

### Load the manifest
import requests
import yaml

f = requests.get(
    "https://raw.githubusercontent.com/sisbell/chatgpt-plugin-store/main/manifests/today-currency-converter.oiconma.repl.co.json"
).text
manifest = yaml.safe_load(f)

from llama_index.tools.chatgpt_plugin import ChatGPTPluginToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
from llama_index.tools.requests import RequestsToolSpec

requests_spec = RequestsToolSpec()
plugin_spec = ChatGPTPluginToolSpec(manifest)
### OR
plugin_spec = ChatGPTPluginToolSpec(
    manifest_url="https://raw.githubusercontent.com/sisbell/chatgpt-plugin-store/main/manifests/today-currency-converter.oiconma.repl.co.json"
)

agent = FunctionAgent(
    tools=[*plugin_spec.to_tool_list(), *requests_spec.to_tool_list()],
    llm=OpenAI(model="gpt-4.1"),
)
print(await agent.run("Convert 100 euros to CAD"))

describe_plugin: Describe the plugin that has been loaded.
load_openapi_spec: Returns the parsed OpenAPI spec that the class was initialized with

In addition to the above method, this tool makes all of the tools available from the OpenAPI Tool Spec and Requests Tool Spec available to the agent. The plugin OpenAPI definition is loaded into the OpenAPI tool spec, and authentication headers are passed in to the Requests tool spec

This loader is designed to be used as a way to load data as a Tool in a Agent.

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.