## 🚀🔗 Leveraging PhiData with Composio
Facilitate the integration of PhiData with Composio to empower LLMs to directly interact with external applications & knowledge base, broadening their capabilities and application scope.
### Objective
- **Automate starring a GitHub repository** using conversational instructions via PhiData Tool Calls.
### Installation and Setup
Ensure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.
```bash
# Install Composio LangChain package
pip install composio-phidata
# Connect your GitHub account
composio-cli add github
# View available applications you can connect with
composio-cli show-apps
```
### Usage Steps
#### 1. Import Base Packages
Prepare your environment by initializing necessary imports from PhiData.
```python
from phi.assistant import Assistant
```
### Step 2: Integrating GitHub Tools with Composio
This step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for LangChain operations.
```python
from composio_phidata import ComposioToolSet, Action
toolset = ComposioToolSet()
composio_tools = toolset.get_actions(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
```
### Step 3: Agent Execution
This step involves configuring and executing the assistant to carry out actions, such as starring a GitHub repository.
```python
my_task = "Star a repo composiohq/composio on GitHub"
# Create a chat completion request to decide on the action
assistant = Assistant(tools=composio_tools, show_tool_calls=True)
assistant.print_response("Can you star ComposioHQ/composio repo?")
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ComposioHQ/composio",
"name": "composio-phidata",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Sawradip",
"author_email": "sawradip@composio.dev",
"download_url": "https://files.pythonhosted.org/packages/a7/b4/eee8c9d2f94a531887a2139ffd85538cc2d0709bf9e96e47f035b563d4f1/composio_phidata-0.5.34.tar.gz",
"platform": null,
"description": "## \ud83d\ude80\ud83d\udd17 Leveraging PhiData with Composio\n\nFacilitate the integration of PhiData with Composio to empower LLMs to directly interact with external applications & knowledge base, broadening their capabilities and application scope.\n\n### Objective\n\n- **Automate starring a GitHub repository** using conversational instructions via PhiData Tool Calls.\n\n### Installation and Setup\n\nEnsure you have the necessary packages installed and connect your GitHub account to allow your agents to utilize GitHub functionalities.\n\n```bash\n# Install Composio LangChain package\npip install composio-phidata\n\n# Connect your GitHub account\ncomposio-cli add github\n\n# View available applications you can connect with\ncomposio-cli show-apps\n```\n\n### Usage Steps\n\n#### 1. Import Base Packages\n\nPrepare your environment by initializing necessary imports from PhiData.\n\n```python\nfrom phi.assistant import Assistant\n```\n\n### Step 2: Integrating GitHub Tools with Composio\n\nThis step involves fetching and integrating GitHub tools provided by Composio, enabling enhanced functionality for LangChain operations.\n```python\nfrom composio_phidata import ComposioToolSet, Action\n\ntoolset = ComposioToolSet()\ncomposio_tools = toolset.get_actions(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])\n```\n\n### Step 3: Agent Execution\n\nThis step involves configuring and executing the assistant to carry out actions, such as starring a GitHub repository.\n\n```python\nmy_task = \"Star a repo composiohq/composio on GitHub\"\n\n# Create a chat completion request to decide on the action\nassistant = Assistant(tools=composio_tools, show_tool_calls=True)\n\nassistant.print_response(\"Can you star ComposioHQ/composio repo?\")\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Use Composio to get an array of tools with your Phidata Plugin.",
"version": "0.5.34",
"project_urls": {
"Homepage": "https://github.com/ComposioHQ/composio"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2bc74a0b863897e62dfe1acd87082f3ef603fec0fafd1d806f0090b0ec288067",
"md5": "e1404fefc4dd31aaec50f94d3d3aed1d",
"sha256": "dff9945a17e9372f5ce129abd2cd6119ec599dbb4f42cb4555eaccb16cedcb3b"
},
"downloads": -1,
"filename": "composio_phidata-0.5.34-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e1404fefc4dd31aaec50f94d3d3aed1d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9",
"size": 3460,
"upload_time": "2024-10-17T15:56:30",
"upload_time_iso_8601": "2024-10-17T15:56:30.243412Z",
"url": "https://files.pythonhosted.org/packages/2b/c7/4a0b863897e62dfe1acd87082f3ef603fec0fafd1d806f0090b0ec288067/composio_phidata-0.5.34-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a7b4eee8c9d2f94a531887a2139ffd85538cc2d0709bf9e96e47f035b563d4f1",
"md5": "195cf968eabdef0da404384b02f8c31c",
"sha256": "e19b32f96ecb2ffab39e1c84037a5fffe449205efb42d7630c1f86eaf1469a7e"
},
"downloads": -1,
"filename": "composio_phidata-0.5.34.tar.gz",
"has_sig": false,
"md5_digest": "195cf968eabdef0da404384b02f8c31c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9",
"size": 3148,
"upload_time": "2024-10-17T15:56:31",
"upload_time_iso_8601": "2024-10-17T15:56:31.520150Z",
"url": "https://files.pythonhosted.org/packages/a7/b4/eee8c9d2f94a531887a2139ffd85538cc2d0709bf9e96e47f035b563d4f1/composio_phidata-0.5.34.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 15:56:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ComposioHQ",
"github_project": "composio",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "composio-phidata"
}