pytool-directory
Python package to create the LangChain tool from the Tool Directory For LangChain.
Can create LangChain tool from definition in the Tool Directory.
Installation
pip install pytool-directory
Usage
- Search tools for your destination from Tool Directory For LangChain.
- Load tools from the name of integration.
from tool_directory import ToolLoader
tools = ToolLoader('openweather').get_tools(parameters={'appid': 'YOUR_APP_ID_FOR_OPENWEATHER'})
- Ask question to LLM with tools.
llm = ChatOpenAI(temperature=0, model_name='gpt-4')
agent = initialize_agent(tools, llm, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)
answer = agent('Please tell me about the temperature in tokyo.')
Examples
langchain_with_tools.py
Use a tool for the OpenWeather API to get the weather information on specified location.
This example execute following conversation via ChatGPT.
User: Please tell me about the temperature in tokyo.
Bot: The current temperature in Tokyo is 29.54°C, but it feels like 32.72°C. The minimum and maximum temperatures today are 27.74°C and 30.45°C respectively. The humidity is 64%.
Contribution
- Fork and clone repository.
- Install development dependencies.
pip install '.[dev]'
- Install pre-commit hook for linter and formatter.
pre-commit install
- Commit your changes and send pull request.
Metadata
Release files for pytool-directory 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytool_directory-0.0.4.tar.gz | 6.1 kB | Without provenance | Details for pytool_directory-0.0.4.tar.gz |
Release files / pytool_directory-0.0.4.tar.gz
| Download URL | pytool_directory-0.0.4.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2fcbb7ad2d35a01f013d5588fbeb8e39ca81ee5d28e3581e5607ee116fe1c18
|
|
BLAKE2b-256 checksum How to use checksums |
90e58c7a6fdd5b97e287a731aad658e52bb5f8e5e4317b552033df2b381ad835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for pytool-directory 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.