Name | llama-index-tools-requests JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | llama-index tools requests integration |
upload_time | 2024-08-22 07:39:00 |
maintainer | ajhofmann |
docs_url | None |
author | Your Name |
requires_python | <4.0,>=3.8.1 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Requests Tool
This tool provides the agent the ability to make HTTP requests. It can be combined with the OpenAPIToolSpec to interface with an OpenAPI server.
For security reasons, you must specify the hostname for the headers that you wish to provide. See [here for an example](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/openapi_and_requests.ipynb)
## Usage
This tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/openapi_and_requests.ipynb)
Here's an example usage of the RequestsToolSpec.
```python
from llama_index.tools.requests import RequestsToolSpec
from llama_index.agent.openai import OpenAIAgent
domain_headers = {
"api.openai.com": {
"Authorization": "Bearer sk-your-key",
"Content-Type": "application/json",
}
}
tool_spec = RequestsToolSpec(domain_headers=domain_headers)
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
agent.chat("")
```
`get_request`: Performs a get request against the URL
`post_request`: Performs a post request against the URL
`patch_request`: Performs a patch request against the URL
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-requests",
"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/d2/e4/7c14cb318b8b9498e1fabe8a63a8464afd20c7e12695a6a5242f30eea43d/llama_index_tools_requests-0.2.0.tar.gz",
"platform": null,
"description": "# Requests Tool\n\nThis tool provides the agent the ability to make HTTP requests. It can be combined with the OpenAPIToolSpec to interface with an OpenAPI server.\n\nFor security reasons, you must specify the hostname for the headers that you wish to provide. See [here for an example](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/openapi_and_requests.ipynb)\n\n## Usage\n\nThis tool has more extensive example usage documented in a Jupyter notebook [here](https://github.com/emptycrown/llama-hub/tree/main/llama_hub/tools/notebooks/openapi_and_requests.ipynb)\n\nHere's an example usage of the RequestsToolSpec.\n\n```python\nfrom llama_index.tools.requests import RequestsToolSpec\nfrom llama_index.agent.openai import OpenAIAgent\n\ndomain_headers = {\n \"api.openai.com\": {\n \"Authorization\": \"Bearer sk-your-key\",\n \"Content-Type\": \"application/json\",\n }\n}\n\ntool_spec = RequestsToolSpec(domain_headers=domain_headers)\n\nagent = OpenAIAgent.from_tools(tool_spec.to_tool_list())\n\nagent.chat(\"\")\n```\n\n`get_request`: Performs a get request against the URL\n`post_request`: Performs a post request against the URL\n`patch_request`: Performs a patch request against the URL\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 requests integration",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "79c6456294a15845cd83df672779d769456497fc5a278de361e85467e94dc8a6",
"md5": "31d8bf382db7bf854fe27941fca1ec88",
"sha256": "a45c1c8d748f7e2501eebfaa6fa48d04447f17bc1544e0b4ec9af61cbfa2ada0"
},
"downloads": -1,
"filename": "llama_index_tools_requests-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "31d8bf382db7bf854fe27941fca1ec88",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8.1",
"size": 2797,
"upload_time": "2024-08-22T07:38:58",
"upload_time_iso_8601": "2024-08-22T07:38:58.968570Z",
"url": "https://files.pythonhosted.org/packages/79/c6/456294a15845cd83df672779d769456497fc5a278de361e85467e94dc8a6/llama_index_tools_requests-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d2e47c14cb318b8b9498e1fabe8a63a8464afd20c7e12695a6a5242f30eea43d",
"md5": "26fb3921c7f905e007e872b7a3e21b01",
"sha256": "cd5b6c2c6ca90f158be9dd890ad04b99227192b4a3595325084daa265a3af8c2"
},
"downloads": -1,
"filename": "llama_index_tools_requests-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "26fb3921c7f905e007e872b7a3e21b01",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8.1",
"size": 2523,
"upload_time": "2024-08-22T07:39:00",
"upload_time_iso_8601": "2024-08-22T07:39:00.256552Z",
"url": "https://files.pythonhosted.org/packages/d2/e4/7c14cb318b8b9498e1fabe8a63a8464afd20c7e12695a6a5242f30eea43d/llama_index_tools_requests-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-22 07:39:00",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "llama-index-tools-requests"
}