Skip to main content

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 BaseToolSpec from 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 DuckDuckGoSearchRun tool.
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 auth property for the LlamaIndexToolRequest.

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperdock_llamaindex-0.3.6.tar.gz (95.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperdock_llamaindex-0.3.6-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file hyperdock_llamaindex-0.3.6.tar.gz.

File metadata

  • Download URL: hyperdock_llamaindex-0.3.6.tar.gz
  • Upload date:
  • Size: 95.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for hyperdock_llamaindex-0.3.6.tar.gz
Algorithm Hash digest
SHA256 a46535e9c05ebd6a32ce0643520b3dabab2eee0af53506529c87fb9c338c11d2
MD5 09634f9d02a41d835f35f65427223293
BLAKE2b-256 f7dfba48e84150a0878f8cb1a0d2d518679b52c974c0f5725850c720f11bdaa4

See more details on using hashes here.

File details

Details for the file hyperdock_llamaindex-0.3.6-py3-none-any.whl.

File metadata

File hashes

Hashes for hyperdock_llamaindex-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8fbb91e63bca9c5495a46624ce14ea543034df968edd1f1625371a49d36e0f
MD5 d50bdfd6dbb8a5fc04cffb6492630d3e
BLAKE2b-256 8768634d7054835286b2802e65b1e930735362460bc3925007f9c7c19b684f4b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page