Hyperdock for Langchain Community 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 extending
BaseToolinterface of langchain.
How to use it?
- To use tools from
langchain-community, install langchain-community first.
$ pip install langchain-community # or maybe uv add langchain-community
- Some tool might require additional dependencies. For example, slack tools of langchain-community requires
slack-sdk. Check the requirements of the tool, and install them as well. - Make a dock with the tools you want to use. For example, let's say you want to use
DuckDuckGoSearchRuntool.
from hyperdock_langchain import dock as langchain_dock, LangchainToolRequest
from langchain_community.tools import DuckDuckGoSearchRun
# ...
dock = langchain_dock(
LangchainToolRequest(tool_type=DuckDuckGoSearchRun), # you should pass the tool type, not a tool instance.
# ...
)
- You might want to use hyperpocket's auth feature while using the langchain tools. In that case, you can define
authproperty for theLangchainToolRequest. - The auth property must be possible to serialized as
hyperpocket.tool.ToolAuth.
from hyperdock_langchain import dock as langchain_dock, LangchainToolRequest
from langchain_community.tools import SlackGetMessage
# ...
dock = langchain_dock(
LangchainToolRequest(tool_type=SlackGetMessage, auth={"auth_provider": "slack"}),
# ...
)
- If auth is provided, this dock recognize the credentials generated and set them as a proper environment variable.
- After you make your dock, call from_dock from your pocket instantiation. For example, Let's say you're using hyperpocket for langchain. You can do:
from hyperpocket.tool import from_dock
from hyperpocket_langchain import PocketLangchain
from hyperdock_langchain import dock as langchain_dock, LangchainToolRequest
dock = langchain_dock(
#...
)
# ...
def agent():
# ...
# initialize the pocket
pocket = PocketLangchain(
tools=[
*from_dock(dock),
]
)
Metadata
Release files for hyperdock-langchain 0.5.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hyperdock_langchain-0.5.7.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hyperdock_langchain-0.5.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / hyperdock_langchain-0.5.7.tar.gz
| Download URL | hyperdock_langchain-0.5.7.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60e376d98791b6d86b20c8257851d1cc5a736386f1344a0b73fdc5f26c939d0c
|
|
BLAKE2b-256 checksum How to use checksums |
84c180f369cf375ab4716be2421ad899efca77993ba53e577d6d84a94093c256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Release files / hyperdock_langchain-0.5.7-py3-none-any.whl
| Download URL | hyperdock_langchain-0.5.7-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7413ed4cd3328fd20069b9e2a5ab459dc10e51ce5b88d5f30875dbade8419c8f
|
|
BLAKE2b-256 checksum How to use checksums |
ead705e70c46c42887d1fac6f2d1a0e67b1b69de419b3af7a2cc1f325e013054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|