pytool-directory


Namepytool-directory JSON
Version 0.0.3 PyPI version JSON
download
home_pageNone
SummaryPython package to create langchain tool from the Tool Directory For LangChain.
upload_time2025-09-04 05:16:35
maintainerNone
docs_urlNone
authorSheile
requires_python>=3.13
licenseMIT
keywords langchain gpt dialogplay
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            pytool-directory
=========================
[![Unittest](https://github.com/dialogplay/pytool-directory/actions/workflows/unittest.yaml/badge.svg)](https://github.com/dialogplay/pytool-directory/actions/workflows/unittest.yaml)

Python package to create the [LangChain](https://github.com/langchain-ai/langchain) tool from the [Tool Directory For LangChain](https://github.com/dialogplay/tool-directory/).

Can create LangChain tool from definition in the Tool Directory.

Installation
-------------------------
```bash
pip install pytool-directory
```

Usage
-------------------------
1. Search tools for your destination from [Tool Directory For LangChain](https://github.com/dialogplay/tool-directory).
2. Load tools from the name of integration.
```python
from tool_directory import ToolLoader
tools = ToolLoader('openweather').get_tools(parameters={'appid': 'YOUR_APP_ID_FOR_OPENWEATHER'})
```
3. Ask question to LLM with tools.
```python
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](https://github.com/dialogplay/pytool-directory/blob/main/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.

```text
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
-------------------------
1. Fork and clone repository.
2. Install development dependencies.
```bash
pip install '.[dev]'
```

3. Install pre-commit hook for linter and formatter.
```bash
pre-commit install
```

4. Commit your changes and send pull request.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytool-directory",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": "langchain, gpt, dialogplay",
    "author": "Sheile",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8e/a7/9d9a2573ab86522c3a313bac9ed0564a615dfd658d574d72b0f26565d181/pytool_directory-0.0.3.tar.gz",
    "platform": null,
    "description": "pytool-directory\n=========================\n[![Unittest](https://github.com/dialogplay/pytool-directory/actions/workflows/unittest.yaml/badge.svg)](https://github.com/dialogplay/pytool-directory/actions/workflows/unittest.yaml)\n\nPython package to create the [LangChain](https://github.com/langchain-ai/langchain) tool from the [Tool Directory For LangChain](https://github.com/dialogplay/tool-directory/).\n\nCan create LangChain tool from definition in the Tool Directory.\n\nInstallation\n-------------------------\n```bash\npip install pytool-directory\n```\n\nUsage\n-------------------------\n1. Search tools for your destination from [Tool Directory For LangChain](https://github.com/dialogplay/tool-directory).\n2. Load tools from the name of integration.\n```python\nfrom tool_directory import ToolLoader\ntools = ToolLoader('openweather').get_tools(parameters={'appid': 'YOUR_APP_ID_FOR_OPENWEATHER'})\n```\n3. Ask question to LLM with tools.\n```python\nllm = ChatOpenAI(temperature=0, model_name='gpt-4')\nagent = initialize_agent(tools, llm, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True)\nanswer = agent('Please tell me about the temperature in tokyo.')\n```\n\nExamples\n-------------------------\n### [langchain_with_tools.py](https://github.com/dialogplay/pytool-directory/blob/main/examples/langchain_with_tools.py)\nUse a tool for the OpenWeather API to get the weather information on specified location.\n\nThis example execute following conversation via ChatGPT.\n\n```text\nUser: Please tell me about the temperature in tokyo.\nBot: The current temperature in Tokyo is 29.54\u00b0C, but it feels like 32.72\u00b0C. The minimum and maximum temperatures today are 27.74\u00b0C and 30.45\u00b0C respectively. The humidity is 64%.\n```\n\nContribution\n-------------------------\n1. Fork and clone repository.\n2. Install development dependencies.\n```bash\npip install '.[dev]'\n```\n\n3. Install pre-commit hook for linter and formatter.\n```bash\npre-commit install\n```\n\n4. Commit your changes and send pull request.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python package to create langchain tool from the Tool Directory For LangChain.",
    "version": "0.0.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/dialogplay/pytool-directory/issues",
        "Homepage": "https://github.com/dialogplay/pytool-directory",
        "Source": "https://github.com/dialogplay/pytool-directory"
    },
    "split_keywords": [
        "langchain",
        " gpt",
        " dialogplay"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8ea79d9a2573ab86522c3a313bac9ed0564a615dfd658d574d72b0f26565d181",
                "md5": "f88180bccb92d45a894e19d381c1e866",
                "sha256": "880b6563ce39ddc7b749c561dbd61b09a10f99eb9ccfe55644d1f48696920774"
            },
            "downloads": -1,
            "filename": "pytool_directory-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "f88180bccb92d45a894e19d381c1e866",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 6107,
            "upload_time": "2025-09-04T05:16:35",
            "upload_time_iso_8601": "2025-09-04T05:16:35.135841Z",
            "url": "https://files.pythonhosted.org/packages/8e/a7/9d9a2573ab86522c3a313bac9ed0564a615dfd658d574d72b0f26565d181/pytool_directory-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-04 05:16:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dialogplay",
    "github_project": "pytool-directory",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytool-directory"
}
        
Elapsed time: 0.48732s