hyperdock-llamaindex
Project description
Hyperdock for LlamaIndex Tools
But seriously, what is a Hyperdock?
- Hyperdock is just a fancy name for a collection of tools. Which are, just python functions returning
str! - In this case, the collection will contain functions that invoke tools which are methods of subclass of
BaseToolSpecfrom llamaindex.
How to use it?
- To use tools from
llama-index, install independent tool package first.
$ pip install llama-index-tools-duckduckgo # or maybe uv add llama-index-tools-duckduckgo
- Make a dock with the tools you want to use. For example, let's say you want to use
DuckDuckGoSearchRuntool.
from hyperdock_llamaindex import LlamaIndexToolRequest, dock as llamaindex_dock
from llama_index.tools.duckduckgo import DuckDuckGoSearchToolSpec
# ...
dock = llamaindex_dock(
LlamaIndexToolRequest(
tool_func=DuckDuckGoSearchToolSpec.duckduckgo_full_search,
tool_args={
"max_results": 10,
},
)
)
-
You might want to use hyperpocket's auth feature while using the llamaindex tools. In that case, you can define
authproperty for theLlamaIndexToolRequest. -
The auth property must be possible to serialized as
hyperpocket.tool.ToolAuth. -
After you make your dock, call from_dock from your pocket instantiation. For example, Let's say you're using hyperpocket for llamaindex. You can do:
from hyperpocket.tool import from_dock
from hyperpocket_llamaindex import PocketLlamaindex
from hyperdock_llamaindex import LlamaIndexToolRequest, dock as llamaindex_dock
dock = llamaindex_dock(
#...
)
# ...
def agent():
# ...
# initialize the pocket
pocket = PocketLlamaindex(
tools=[
*from_dock(dock),
]
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hyperdock_llamaindex-0.3.7.tar.gz.
File metadata
- Download URL: hyperdock_llamaindex-0.3.7.tar.gz
- Upload date:
- Size: 102.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cc720cf22df5777745e7057fda6919e533e8f9ffb6b5c0de53b02bbac87373a
|
|
| MD5 |
dea4666259988884043dcbc654f3fae1
|
|
| BLAKE2b-256 |
68a38d319a8fa5650bfd3b4ce600bbe424501b9bdf3c22d8823ed592005e773e
|
File details
Details for the file hyperdock_llamaindex-0.3.7-py3-none-any.whl.
File metadata
- Download URL: hyperdock_llamaindex-0.3.7-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae7f72022b5182f2c1ebf6e4b072d66ab3ce39906109060540ba124bd81d13d9
|
|
| MD5 |
b55429936f3f4e37bbebee10192b66de
|
|
| BLAKE2b-256 |
4ac27954b8fd04cff1d9cd52ecc173cf14f1ef1b01c6027bdf47120290ca8fdb
|