llama-index-tools-chatgpt-plugin


Namellama-index-tools-chatgpt-plugin JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
Summaryllama-index tools chatgpt_plugin integration
upload_time2024-08-22 14:47:23
maintainerajhofmann
docs_urlNone
authorYour Name
requires_python<4.0,>=3.8.1
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-chatgpt-plugin/examples/chatgpt_plugin.ipynb)

```python
# 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.agent.openai import OpenAIAgent
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 = OpenAIAgent.from_tools(
    [*plugin_spec.to_tool_list(), *requests_spec.to_tool_list()], verbose=True
)
print(agent.chat("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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "llama-index-tools-chatgpt-plugin",
    "maintainer": "ajhofmann",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": null,
    "keywords": null,
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/97/8a/8a29e168409092fc761beb17dd154ca9239816702eea1dd7fb2018a0aa3d/llama_index_tools_chatgpt_plugin-0.2.0.tar.gz",
    "platform": null,
    "description": "# ChatGPT Plugin Tool\n\nThis tool allows Agents to load a plugin using a ChatGPT manifest file, and have the Agent interact with it.\n\n## Usage\n\nThis tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-chatgpt-plugin/examples/chatgpt_plugin.ipynb)\n\n```python\n# Load the manifest\nimport requests\nimport yaml\n\nf = requests.get(\n    \"https://raw.githubusercontent.com/sisbell/chatgpt-plugin-store/main/manifests/today-currency-converter.oiconma.repl.co.json\"\n).text\nmanifest = yaml.safe_load(f)\n\nfrom llama_index.tools.chatgpt_plugin import ChatGPTPluginToolSpec\nfrom llama_index.agent.openai import OpenAIAgent\nfrom llama_index.tools.requests import RequestsToolSpec\n\nrequests_spec = RequestsToolSpec()\nplugin_spec = ChatGPTPluginToolSpec(manifest)\n# OR\nplugin_spec = ChatGPTPluginToolSpec(\n    manifest_url=\"https://raw.githubusercontent.com/sisbell/chatgpt-plugin-store/main/manifests/today-currency-converter.oiconma.repl.co.json\"\n)\n\nagent = OpenAIAgent.from_tools(\n    [*plugin_spec.to_tool_list(), *requests_spec.to_tool_list()], verbose=True\n)\nprint(agent.chat(\"Convert 100 euros to CAD\"))\n```\n\n`describe_plugin`: Describe the plugin that has been loaded.\n`load_openapi_spec`: Returns the parsed OpenAPI spec that the class was initialized with\n\nIn 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\n\nThis loader is designed to be used as a way to load data as a Tool in a Agent.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index tools chatgpt_plugin integration",
    "version": "0.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5b1eae50be45ed8b9c637645c9eee83475c94d6e014f1bd1aa8e4f77d35884f",
                "md5": "4556ff284b0007957d9d2b7623916802",
                "sha256": "804fe59b6c8bbfaa0259f3009ffabecbc4b74a6de2bd6d6e8e272eb5c3aab1ae"
            },
            "downloads": -1,
            "filename": "llama_index_tools_chatgpt_plugin-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4556ff284b0007957d9d2b7623916802",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3386,
            "upload_time": "2024-08-22T14:47:22",
            "upload_time_iso_8601": "2024-08-22T14:47:22.217957Z",
            "url": "https://files.pythonhosted.org/packages/c5/b1/eae50be45ed8b9c637645c9eee83475c94d6e014f1bd1aa8e4f77d35884f/llama_index_tools_chatgpt_plugin-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "978a8a29e168409092fc761beb17dd154ca9239816702eea1dd7fb2018a0aa3d",
                "md5": "1aa4c97b86bba4fde03223176b17b4e0",
                "sha256": "ea25eb293864eeb8193d57c06019beae0945e44d55e973f1e862dbfbe36d3bef"
            },
            "downloads": -1,
            "filename": "llama_index_tools_chatgpt_plugin-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1aa4c97b86bba4fde03223176b17b4e0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 3027,
            "upload_time": "2024-08-22T14:47:23",
            "upload_time_iso_8601": "2024-08-22T14:47:23.622024Z",
            "url": "https://files.pythonhosted.org/packages/97/8a/8a29e168409092fc761beb17dd154ca9239816702eea1dd7fb2018a0aa3d/llama_index_tools_chatgpt_plugin-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-22 14:47:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-tools-chatgpt-plugin"
}
        
Elapsed time: 0.43601s