ai-parrot


Nameai-parrot JSON
Version 0.3.12 PyPI version JSON
download
home_pagehttps://github.com/phenobarbital/ai-parrot
SummaryLive Chatbots based on Langchain chatbots and Agents Integrated into Navigator Framework or used into aiohttp applications.
upload_time2024-09-14 00:40:00
maintainerNone
docs_urlNone
authorJesus Lara
requires_python>=3.9.20
licenseMIT
keywords asyncio asyncpg aioredis aiomcache langchain chatbot agents
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AI Parrot: Python package for creating Chatbots
This is an open-source Python package for creating Chatbots based on Langchain and Navigator.
This README provides instructions for installation, development, testing, and releasing Parrot.

## Installation

**Creating a virtual environment:**

This is recommended for development and isolation from system-wide libraries.
Run the following command in your terminal:

Debian-based systems installation:
   ```
   sudo apt install gcc python3.11-venv python3.11-full python3.11-dev libmemcached-dev zlib1g-dev build-essential libffi-dev unixodbc unixodbc-dev libsqliteodbc libev4 libev-dev
   ```

   For Qdrant installation:
   ```
   docker pull qdrant/qdrant
   docker run -d -p 6333:6333 -p 6334:6334 --name qdrant -v $(pwd)/qdrant_storage:/qdrant/storage:z qdrant/qdrant
   ```

For VertexAI, creates a folder on "env" called "google" and copy the JSON credentials file into it.

   ```bash
   make venv
   ```

   This will create a virtual environment named `.venv`. To activate it, run:

   ```bash
   source .venv/bin/activate  # Linux/macOS
   ```

   Once activated, install Parrot within the virtual environment:

   ```bash
   make install
   ```
   The output will remind you to activate the virtual environment before development.

   **Optional** (for developers):
   ```bash
   pip install -e .
   ```

## Start http server
```bash
python run.py
```

## Development Setup

This section explains how to set up your development environment:

1. **Install development requirements:**

   ```bash
   make setup
   ```

   This installs development dependencies like linters and test runners mentioned in the `docs/requirements-dev.txt` file.

2. **Install Parrot in editable mode:**

   This allows you to make changes to the code and test them without reinstalling:

   ```bash
   make dev
   ```

   This uses `flit` to install Parrot in editable mode.


### Usage (Replace with actual usage instructions)

*Once you have set up your development environment, you can start using Parrot.*

#### Test with Code ChatBOT
* Set environment variables for:
 [google]
   GOOGLE_API_KEY=apikey
   GOOGLE_CREDENTIALS_FILE=.../credentials.json
   VERTEX_PROJECT_ID=vertex-project
   VERTEX_REGION=region

* Run the chatbot:
    ```bash
    python examples/test_agent.py
    ```

### Testing

To run the test suite:

```bash
make test
```

This will run tests using `coverage` to report on code coverage.


### Code Formatting

To format the code with black:

```bash
make format
```


### Linting

To lint the code for style and potential errors:

```bash
make lint
```

This uses `pylint` and `black` to check for issues.


### Releasing a New Version

This section outlines the steps for releasing a new version of Parrot:

1. **Ensure everything is clean and tested:**

   ```bash
   make release
   ```

   This runs `lint`, `test`, and `clean` tasks before proceeding.

2. **Publish the package:**

   ```bash
   make release
   ```

   This uses `flit` to publish the package to a repository like PyPI. You'll need to have publishing credentials configured for `flit`.


### Cleaning Up

To remove the virtual environment:

```bash
make distclean
```


### Contributing

We welcome contributions to Parrot! Please refer to the CONTRIBUTING.md file for guidelines on how to contribute.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/phenobarbital/ai-parrot",
    "name": "ai-parrot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.20",
    "maintainer_email": null,
    "keywords": "asyncio, asyncpg, aioredis, aiomcache, langchain, chatbot, agents",
    "author": "Jesus Lara",
    "author_email": "jesuslara@phenobarbital.info",
    "download_url": null,
    "platform": "POSIX",
    "description": "# AI Parrot: Python package for creating Chatbots\nThis is an open-source Python package for creating Chatbots based on Langchain and Navigator.\nThis README provides instructions for installation, development, testing, and releasing Parrot.\n\n## Installation\n\n**Creating a virtual environment:**\n\nThis is recommended for development and isolation from system-wide libraries.\nRun the following command in your terminal:\n\nDebian-based systems installation:\n   ```\n   sudo apt install gcc python3.11-venv python3.11-full python3.11-dev libmemcached-dev zlib1g-dev build-essential libffi-dev unixodbc unixodbc-dev libsqliteodbc libev4 libev-dev\n   ```\n\n   For Qdrant installation:\n   ```\n   docker pull qdrant/qdrant\n   docker run -d -p 6333:6333 -p 6334:6334 --name qdrant -v $(pwd)/qdrant_storage:/qdrant/storage:z qdrant/qdrant\n   ```\n\nFor VertexAI, creates a folder on \"env\" called \"google\" and copy the JSON credentials file into it.\n\n   ```bash\n   make venv\n   ```\n\n   This will create a virtual environment named `.venv`. To activate it, run:\n\n   ```bash\n   source .venv/bin/activate  # Linux/macOS\n   ```\n\n   Once activated, install Parrot within the virtual environment:\n\n   ```bash\n   make install\n   ```\n   The output will remind you to activate the virtual environment before development.\n\n   **Optional** (for developers):\n   ```bash\n   pip install -e .\n   ```\n\n## Start http server\n```bash\npython run.py\n```\n\n## Development Setup\n\nThis section explains how to set up your development environment:\n\n1. **Install development requirements:**\n\n   ```bash\n   make setup\n   ```\n\n   This installs development dependencies like linters and test runners mentioned in the `docs/requirements-dev.txt` file.\n\n2. **Install Parrot in editable mode:**\n\n   This allows you to make changes to the code and test them without reinstalling:\n\n   ```bash\n   make dev\n   ```\n\n   This uses `flit` to install Parrot in editable mode.\n\n\n### Usage (Replace with actual usage instructions)\n\n*Once you have set up your development environment, you can start using Parrot.*\n\n#### Test with Code ChatBOT\n* Set environment variables for:\n [google]\n   GOOGLE_API_KEY=apikey\n   GOOGLE_CREDENTIALS_FILE=.../credentials.json\n   VERTEX_PROJECT_ID=vertex-project\n   VERTEX_REGION=region\n\n* Run the chatbot:\n    ```bash\n    python examples/test_agent.py\n    ```\n\n### Testing\n\nTo run the test suite:\n\n```bash\nmake test\n```\n\nThis will run tests using `coverage` to report on code coverage.\n\n\n### Code Formatting\n\nTo format the code with black:\n\n```bash\nmake format\n```\n\n\n### Linting\n\nTo lint the code for style and potential errors:\n\n```bash\nmake lint\n```\n\nThis uses `pylint` and `black` to check for issues.\n\n\n### Releasing a New Version\n\nThis section outlines the steps for releasing a new version of Parrot:\n\n1. **Ensure everything is clean and tested:**\n\n   ```bash\n   make release\n   ```\n\n   This runs `lint`, `test`, and `clean` tasks before proceeding.\n\n2. **Publish the package:**\n\n   ```bash\n   make release\n   ```\n\n   This uses `flit` to publish the package to a repository like PyPI. You'll need to have publishing credentials configured for `flit`.\n\n\n### Cleaning Up\n\nTo remove the virtual environment:\n\n```bash\nmake distclean\n```\n\n\n### Contributing\n\nWe welcome contributions to Parrot! Please refer to the CONTRIBUTING.md file for guidelines on how to contribute.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Live Chatbots based on Langchain chatbots and Agents     Integrated into Navigator Framework or used into aiohttp applications.",
    "version": "0.3.12",
    "project_urls": {
        "Documentation": "https://github.com/phenobarbital/ai-parrot/",
        "Funding": "https://paypal.me/phenobarbital",
        "Homepage": "https://github.com/phenobarbital/ai-parrot",
        "Say Thanks!": "https://saythanks.io/to/phenobarbital",
        "Source": "https://github.com/phenobarbital/ai-parrot",
        "Tracker": "https://github.com/phenobarbital/ai-parrot/issues"
    },
    "split_keywords": [
        "asyncio",
        " asyncpg",
        " aioredis",
        " aiomcache",
        " langchain",
        " chatbot",
        " agents"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8be7595dcf031f6bec711383a3e7007ba97c188a6cbdceb918c49082bd5a8be4",
                "md5": "d49c3f08f0aa399db06d2aac7d337091",
                "sha256": "14bd3dfd26019bc263a2b7a83151cf70c745cb85c9135ff42a573f63b2cb12d2"
            },
            "downloads": -1,
            "filename": "ai_parrot-0.3.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "d49c3f08f0aa399db06d2aac7d337091",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.9.20",
            "size": 758516,
            "upload_time": "2024-09-14T00:40:00",
            "upload_time_iso_8601": "2024-09-14T00:40:00.337747Z",
            "url": "https://files.pythonhosted.org/packages/8b/e7/595dcf031f6bec711383a3e7007ba97c188a6cbdceb918c49082bd5a8be4/ai_parrot-0.3.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4480c7be8410f71181148e1b7c46b972759723405510a5b32f4506d5c6515cf",
                "md5": "5b1b0a9017b2541875819629725df4d9",
                "sha256": "cd0a510c5dba99f2f559c707320f974d51b25f06ebd3fceeb4d43983ce453c64"
            },
            "downloads": -1,
            "filename": "ai_parrot-0.3.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "5b1b0a9017b2541875819629725df4d9",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.9.20",
            "size": 798894,
            "upload_time": "2024-09-14T00:40:02",
            "upload_time_iso_8601": "2024-09-14T00:40:02.965660Z",
            "url": "https://files.pythonhosted.org/packages/b4/48/0c7be8410f71181148e1b7c46b972759723405510a5b32f4506d5c6515cf/ai_parrot-0.3.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5e75238aedaf7430a5d78790123841823dbb4bbc1fbdcef9896790270f3a76d",
                "md5": "89a2de145f550c26fad7edcada9302f0",
                "sha256": "d34f016f2b148bf0438e9664b4e81a9afdb5a9d91f7bfac0c7372cf231265456"
            },
            "downloads": -1,
            "filename": "ai_parrot-0.3.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "89a2de145f550c26fad7edcada9302f0",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.9.20",
            "size": 865104,
            "upload_time": "2024-09-14T00:40:05",
            "upload_time_iso_8601": "2024-09-14T00:40:05.035952Z",
            "url": "https://files.pythonhosted.org/packages/a5/e7/5238aedaf7430a5d78790123841823dbb4bbc1fbdcef9896790270f3a76d/ai_parrot-0.3.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1baa36e5756c024f61672152ea4369d3d16e905a31e58d08d5c07f0f98f6b896",
                "md5": "ff75d69181aa3d5255b2923dd87b1f98",
                "sha256": "1e3dd7e4ab9979d39cde215fbb3c180e388cd69119e4851684f98b4e3d6ec913"
            },
            "downloads": -1,
            "filename": "ai_parrot-0.3.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "ff75d69181aa3d5255b2923dd87b1f98",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.9.20",
            "size": 763224,
            "upload_time": "2024-09-14T00:40:06",
            "upload_time_iso_8601": "2024-09-14T00:40:06.420735Z",
            "url": "https://files.pythonhosted.org/packages/1b/aa/36e5756c024f61672152ea4369d3d16e905a31e58d08d5c07f0f98f6b896/ai_parrot-0.3.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-14 00:40:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "phenobarbital",
    "github_project": "ai-parrot",
    "github_not_found": true,
    "lcname": "ai-parrot"
}
        
Elapsed time: 0.74564s