Name | llama-index-tools-graphql JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | llama-index tools graphql integration |
upload_time | 2024-11-17 23:07:17 |
maintainer | ajhofmann |
docs_url | None |
author | Your Name |
requires_python | <4.0,>=3.9 |
license | MIT |
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/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-graphql/examples/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/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-shopify/examples/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.openai 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "llama-index-tools-graphql",
"maintainer": "ajhofmann",
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "you@example.com",
"download_url": "https://files.pythonhosted.org/packages/35/92/f8936efd33dcf9e438abc270b3dd47b61a2de895d6fedeba1a57b8335cd8/llama_index_tools_graphql-0.3.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/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-graphql/examples/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/run-llama/llama_index/blob/main/llama-index-integrations/tools/llama-index-tools-shopify/examples/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.openai 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.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "llama-index tools graphql integration",
"version": "0.3.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ef9a5aee14f33272a8073160f695ab1bca889be6717d4f8a0783e82727ea0976",
"md5": "f81e7f00f735a3718a34ba490be4bc82",
"sha256": "09df6b4c9eb702e2311327aae3233137f0c915e83f78e8bfa801415d006fbb97"
},
"downloads": -1,
"filename": "llama_index_tools_graphql-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f81e7f00f735a3718a34ba490be4bc82",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 2663,
"upload_time": "2024-11-17T23:07:16",
"upload_time_iso_8601": "2024-11-17T23:07:16.437461Z",
"url": "https://files.pythonhosted.org/packages/ef/9a/5aee14f33272a8073160f695ab1bca889be6717d4f8a0783e82727ea0976/llama_index_tools_graphql-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3592f8936efd33dcf9e438abc270b3dd47b61a2de895d6fedeba1a57b8335cd8",
"md5": "bb0f06d757919fe751974a73a7f6980d",
"sha256": "8bd5e8ea5ba1dfecf426fb759ea5699a767c83262aa12446d0f6393241ff2289"
},
"downloads": -1,
"filename": "llama_index_tools_graphql-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "bb0f06d757919fe751974a73a7f6980d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 2431,
"upload_time": "2024-11-17T23:07:17",
"upload_time_iso_8601": "2024-11-17T23:07:17.949946Z",
"url": "https://files.pythonhosted.org/packages/35/92/f8936efd33dcf9e438abc270b3dd47b61a2de895d6fedeba1a57b8335cd8/llama_index_tools_graphql-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-17 23:07:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-tools-graphql"
}