flying-delta-tools-graphql


Nameflying-delta-tools-graphql JSON
Version 0.1.0 PyPI version JSON
download
home_page
Summaryllama-index tools graphql integration
upload_time2024-01-28 19:30:16
maintainer
docs_urlNone
authorYour Name
requires_python>=3.8.1,<3.12
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # GraphQL Tool

This tool provides agents the ability to easily execute GraphQL queries against a server. The tool can be initialized with the server url and any required headers and thereafter perform queries against the server

## Usage

This tool has a more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/graphql.ipynb)

Here's an example usage of the GraphQLToolSpec.

This tool works best when the Agent has access to the GraphQL schema for the server. See [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/shopify.ipynb) for an example of using a tool with a file loader to create even more powerful Agents.

```python
from llama_index.tools.graphql import GraphQLToolSpec
from llama_index.agent import OpenAIAgent

tool_spec = GraphQLToolSpec(
    url="https://spacex-production.up.railway.app/",
    headers={
        "content-type": "application/json",
    },
)

agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())

agent.chat(
    "get the id, model, name and type of the Ships from the graphql endpoint"
)
```

`graphql_request`: Runs a GraphQL query against the configured server

This loader is designed to be used as a way to load data as a Tool in a Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "flying-delta-tools-graphql",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<3.12",
    "maintainer_email": "",
    "keywords": "",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/5f/58/3a730872635c2d2b1a3b688a9902bbbcd880482576a2303cba7a3d602fcc/flying_delta_tools_graphql-0.1.0.tar.gz",
    "platform": null,
    "description": "# GraphQL Tool\n\nThis tool provides agents the ability to easily execute GraphQL queries against a server. The tool can be initialized with the server url and any required headers and thereafter perform queries against the server\n\n## Usage\n\nThis tool has a more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/graphql.ipynb)\n\nHere's an example usage of the GraphQLToolSpec.\n\nThis tool works best when the Agent has access to the GraphQL schema for the server. See [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/shopify.ipynb) for an example of using a tool with a file loader to create even more powerful Agents.\n\n```python\nfrom llama_index.tools.graphql import GraphQLToolSpec\nfrom llama_index.agent import OpenAIAgent\n\ntool_spec = GraphQLToolSpec(\n    url=\"https://spacex-production.up.railway.app/\",\n    headers={\n        \"content-type\": \"application/json\",\n    },\n)\n\nagent = OpenAIAgent.from_tools(tool_spec.to_tool_list())\n\nagent.chat(\n    \"get the id, model, name and type of the Ships from the graphql endpoint\"\n)\n```\n\n`graphql_request`: Runs a GraphQL query against the configured server\n\nThis loader is designed to be used as a way to load data as a Tool in a Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index tools graphql integration",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3be23fca25af43365ecc06956e9772fbe4d1f03238adcc271992d665cbcbbae",
                "md5": "3a3ad533c7dac4ed792fa965defd4427",
                "sha256": "087295abff6c650f105dcc076597544e6194eb621e03e23e8dcd9b0a940446fe"
            },
            "downloads": -1,
            "filename": "flying_delta_tools_graphql-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3a3ad533c7dac4ed792fa965defd4427",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<3.12",
            "size": 2667,
            "upload_time": "2024-01-28T19:30:14",
            "upload_time_iso_8601": "2024-01-28T19:30:14.537391Z",
            "url": "https://files.pythonhosted.org/packages/e3/be/23fca25af43365ecc06956e9772fbe4d1f03238adcc271992d665cbcbbae/flying_delta_tools_graphql-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f583a730872635c2d2b1a3b688a9902bbbcd880482576a2303cba7a3d602fcc",
                "md5": "74e1855272a8b1322e75940aaccd7a2c",
                "sha256": "2e7f2426db4c3e25a9ec30282bd1f38332403a96236746f576812c610bcd4d71"
            },
            "downloads": -1,
            "filename": "flying_delta_tools_graphql-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "74e1855272a8b1322e75940aaccd7a2c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<3.12",
            "size": 2478,
            "upload_time": "2024-01-28T19:30:16",
            "upload_time_iso_8601": "2024-01-28T19:30:16.360865Z",
            "url": "https://files.pythonhosted.org/packages/5f/58/3a730872635c2d2b1a3b688a9902bbbcd880482576a2303cba7a3d602fcc/flying_delta_tools_graphql-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-28 19:30:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "flying-delta-tools-graphql"
}
        
Elapsed time: 0.35433s