An integration package connecting Taiga and LangChain
Project description
langchain-taiga
This package provides Taiga tools and a toolkit for use with LangChain. It includes:
create_entity_tool: Creates user stories, tasks and issues in Taiga.search_entities_tool: Searches for user stories, tasks and issues in Taiga.get_entity_by_ref_tool: Gets a user story, task or issue by reference.update_entity_by_ref_tool: Updates a user story, task or issue by reference.add_comment_by_ref_tool: Adds a comment to a user story, task or issue.add_attachment_by_ref_tool: Adds an attachment to a user story, task or issue.
Installation
pip install -U langchain-taiga
Environment Variable
Export your taiga logins:
export TAIGA_URL="https://taiga.xyz.org/"
export TAIGA_API_URL="https://taiga.xyz.org/"
export TAIGA_USERNAME="username"
export TAIGA_PASSWORD="pw"
export OPENAI_API_KEY="OPENAI_API_KEY"
If this environment variable is not set, the tools will raise a ValueError when instantiated.
Usage
Direct Tool Usage
from langchain_taiga.tools.taiga_tools import create_entity_tool, search_entities_tool, get_entity_by_ref_tool, update_entity_by_ref_tool, add_comment_by_ref_tool, add_attachment_by_ref_tool
response = create_entity_tool({"project_slug": "slug",
"entity_type": "us",
"subject": "subject",
"status": "new",
"description": "desc",
"parent_ref": 5,
"assign_to": "user",
"due_date": "2022-01-01",
"tags": ["tag1", "tag2"]})
response = search_entities_tool({"project_slug": "slug", "query": "query", "entity_type": "task"})
response = get_entity_by_ref_tool({"entity_type": "user_story", "project_id": 1, "ref": "1"})
response = update_entity_by_ref_tool({"project_slug": "slug", "entity_ref": 555, "entity_type": "us"})
response = add_comment_by_ref_tool({"project_slug": "slug", "entity_ref": 3, "entity_type": "us",
"comment": "new"})
response = add_attachment_by_ref_tool({"project_slug": "slug", "entity_ref": 3, "entity_type": "us",
"attachment_url": "url", "content_type": "png", "description": "desc"})
Using the Toolkit
You can also use TaigaToolkit to automatically gather both tools:
from langchain_taiga.toolkits import TaigaToolkit
toolkit = TaigaToolkit()
tools = toolkit.get_tools()
Tests
If you have a tests folder (e.g. tests/unit_tests/), you can run them (assuming Pytest) with:
pytest --maxfail=1 --disable-warnings -q
License
Further Documentation
-
For more details, see the docstrings in:
taiga_tools.pytoolkits.pyforTaigaToolkit
-
Official Taiga Developer Docs: https://docs.taiga.io/api.html
-
LangChain GitHub for general LangChain usage and tooling.
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 langchain_taiga-1.0.1.tar.gz.
File metadata
- Download URL: langchain_taiga-1.0.1.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/5.15.0-133-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
559da26630de7a6927ffadb7785a04354b5540c07412397db221a586139801f6
|
|
| MD5 |
e52dd48d3ac29760b46cd5ced6224419
|
|
| BLAKE2b-256 |
a9f18ac33a4b48babf424fbb3ea5177ee891a4a78bf48f9b54c01bd416c04cd4
|
File details
Details for the file langchain_taiga-1.0.1-py3-none-any.whl.
File metadata
- Download URL: langchain_taiga-1.0.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/5.15.0-133-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23dbb683594d4918ef741f6030543fcbf6e7d820e0327ada34d9443f8e0cb91d
|
|
| MD5 |
fe397127c62b09f23bb644fe82dc0d0b
|
|
| BLAKE2b-256 |
d6640f70d4372568e14ee45aebc73194625ae5a6fa5901c62f64daed84ae9dac
|