chinoai


Namechinoai JSON
Version 0.1.0 PyPI version JSON
download
home_page
SummaryChino is a terminal based chatbot based on ChatGPT.
upload_time2024-02-12 18:09:53
maintainer
docs_urlNone
author
requires_python>=3.11
licenseMIT License Copyright (c) 2024 Sam Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords chatbot terminal openai rag bumpver
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Chino 🌸

<div>
  <p>
  Chino is a terminal-based chatbot. Powered by OpenAI. Uses RAG to generate
  </p>
  <a href="https://kuma.fosscu.org/status/LinkLiberate" target="_blank"><img src="https://badgen.net/badge/status/Under Development/red?icon=lgtm" alt=""></a>

  ![Version](https://img.shields.io/badge/Version-0.1.0-brightgreen.svg)
  ![Code Coverage](https://img.shields.io/codecov/c/github/SAMAD101/Chino)
  ![License](https://img.shields.io/badge/License-MIT-blue.svg)
  ![GitHub Issues](https://img.shields.io/github/issues/SAMAD101/Chino)
  ![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SAMAD101/Chino)
  ![Release Date](https://img.shields.io/github/release-date/SAMAD101/Chino)
  ![Commits](https://img.shields.io/github/commit-activity/m/SAMAD101/Chino)
  ![Last Commit](https://img.shields.io/github/last-commit/SAMAD101/Chino)
  ![Contributors](https://img.shields.io/github/contributors/SAMAD101/Chino)
  ![Repo Size](https://img.shields.io/github/repo-size/SAMAD101/Chino)
  ![Code Size](https://img.shields.io/github/languages/code-size/SAMAD101/Chino)
  ![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)

</div>

<p align="center">
  <img width="320" height="320" src="artwork/chino_logo_1.png" alt="Material Bread logo" style="margin-right:20px;">
</p>

<hr>

## 🤔 Pre-requisites

- `python3`
- `pdm`

## 🐍 Python Version Support

This project is designed to be compatible with specific versions of Python for optimal performance and stability.

### Supported Python Version

- **Python 3.11.7**

> ❗️ For the best experience and performance, it is recommended to use the version mentioned above.

Before diving into the project, ensure that you have the correct Python version installed. To check the version of Python you currently have, execute the following command in your terminal:

```bash
python --version
```

### 🐍 Installing Python 3.11.7 with `pyenv`

**Protip:** Managing multiple Python versions is a breeze with [pyenv](https://github.com/pyenv/pyenv). It allows you to seamlessly switch between different Python versions without the need to reinstall them.

If you haven't installed `pyenv` yet, follow their [official guide](https://github.com/pyenv/pyenv) to set it up.

Once you have `pyenv` ready, install the recommended Python version by running:

```bash
pyenv install 3.11.7
```

> When you navigate to this project's directory in the future, `pyenv` will automatically select the recommended Python version, thanks to the `.python-version` file in the project root.

## Installation 🛠️
> Coming soon!


# 📦 Setup

## Local setup 🛠️ with Docker 🐳

> Coming soon!

<!--
- **Installing and running**:
  Before you begin, ensure you have docker installed. If not, refer to the [official documentation](https://docs.docker.com/engine/install/) to install docker.
  ```bash
  docker pull samad101/Chino
  docker run -d -p 8080:8080 --name pastepyprod samad101
  ```
  -->

<!--
- **Using docker-compose**:
  You can also use docker-compose to run the project locally by running the following command:
  <br>
  - **Clone the repository**:
  Get the project source code from GitHub:

  ```bash
  git clone https://github.com/SAMAD101/Chino.git
  ```

  - **Navigate to the Project Directory**:

  ```bash
  cd Chino
  ```

  - **Run the project using docker-compose**:

  ```bash
  docker-compose up
  ```
-->

## Local setup 🛠️ without Docker 🐳

### Setting Up the Project with PDM

[PDM (Python Development Master)](https://pdm.fming.dev/latest/) is utilized for dependency management in this project. To set up and run the project:

- **Installing PDM**:
  Before you begin, ensure you have PDM installed. If not, refer to the [official documentation](https://pdm.fming.dev/latest/) to install PDM.

- **Clone the Repository**:
  Get the project source code from GitHub:

  ```bash
  git clone https://github.com/SAMAD101/Chino.git
  ```

- **Navigate to the Project Directory**:

  ```bash
  cd Chino
  ```

- **Install Dependencies**:
  Use PDM to install the project's dependencies:
  ```bash
  pdm install
  ```
  To install dev dependencies:
  ```bash
  pdm install -G dev
  ```

- **Start the Project**:
  Use PDM to run the project:
  ```bash
  pdm run start
  ```

> Other commands are in `pyproject.toml` [tool.pdm.scripts]

## ⚠️ Note:

You will need an OpenAI API key to make it work. Get your API key from OpenAI website and set it as an environment variable:
```bash
export OPENAI_API_KEY="<your_api_key>"
```

## Usage 📖

For using the Retrieval Augmented Generation (RAG) features, follow these steps:

1. You will need to put your documents in the `data/` directory in the root of the project.
    Create `data/` directory in the root of the project if it doesn't exist.
    ```bash
    mkdir data
    ```

2. Create a directory in the root of the project called `chroma/`.
    This directory will contain the OpenAI embeddings (embedding vectors) for the documents.

3. Process the documents and create the embeddings using the following command:
    ```bash
    pdm run process
    ```

### Using Query mode:

Once your documents are processed. You can use the query mode to give prompts for the documents [RAG].

```bash
pdm run -q
```
or, you can use `\q:` before your prompt to use it in query mode.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "chinoai",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": "",
    "keywords": "chatbot,terminal,openai,rag,bumpver",
    "author": "",
    "author_email": "Sam <asamadans@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/dd/91/508c1f666a5b169ed93e7a60816879296730a49a14aa2792f46588633121/chinoai-0.1.0.tar.gz",
    "platform": null,
    "description": "# Chino \ud83c\udf38\n\n<div>\n  <p>\n  Chino is a terminal-based chatbot. Powered by OpenAI. Uses RAG to generate\n  </p>\n  <a href=\"https://kuma.fosscu.org/status/LinkLiberate\" target=\"_blank\"><img src=\"https://badgen.net/badge/status/Under Development/red?icon=lgtm\" alt=\"\"></a>\n\n  ![Version](https://img.shields.io/badge/Version-0.1.0-brightgreen.svg)\n  ![Code Coverage](https://img.shields.io/codecov/c/github/SAMAD101/Chino)\n  ![License](https://img.shields.io/badge/License-MIT-blue.svg)\n  ![GitHub Issues](https://img.shields.io/github/issues/SAMAD101/Chino)\n  ![GitHub Pull Requests](https://img.shields.io/github/issues-pr/SAMAD101/Chino)\n  ![Release Date](https://img.shields.io/github/release-date/SAMAD101/Chino)\n  ![Commits](https://img.shields.io/github/commit-activity/m/SAMAD101/Chino)\n  ![Last Commit](https://img.shields.io/github/last-commit/SAMAD101/Chino)\n  ![Contributors](https://img.shields.io/github/contributors/SAMAD101/Chino)\n  ![Repo Size](https://img.shields.io/github/repo-size/SAMAD101/Chino)\n  ![Code Size](https://img.shields.io/github/languages/code-size/SAMAD101/Chino)\n  ![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)\n\n</div>\n\n<p align=\"center\">\n  <img width=\"320\" height=\"320\" src=\"artwork/chino_logo_1.png\" alt=\"Material Bread logo\" style=\"margin-right:20px;\">\n</p>\n\n<hr>\n\n## \ud83e\udd14 Pre-requisites\n\n- `python3`\n- `pdm`\n\n## \ud83d\udc0d Python Version Support\n\nThis project is designed to be compatible with specific versions of Python for optimal performance and stability.\n\n### Supported Python Version\n\n- **Python 3.11.7**\n\n> \u2757\ufe0f For the best experience and performance, it is recommended to use the version mentioned above.\n\nBefore diving into the project, ensure that you have the correct Python version installed. To check the version of Python you currently have, execute the following command in your terminal:\n\n```bash\npython --version\n```\n\n### \ud83d\udc0d Installing Python 3.11.7 with `pyenv`\n\n**Protip:** Managing multiple Python versions is a breeze with [pyenv](https://github.com/pyenv/pyenv). It allows you to seamlessly switch between different Python versions without the need to reinstall them.\n\nIf you haven't installed `pyenv` yet, follow their [official guide](https://github.com/pyenv/pyenv) to set it up.\n\nOnce you have `pyenv` ready, install the recommended Python version by running:\n\n```bash\npyenv install 3.11.7\n```\n\n> When you navigate to this project's directory in the future, `pyenv` will automatically select the recommended Python version, thanks to the `.python-version` file in the project root.\n\n## Installation \ud83d\udee0\ufe0f\n> Coming soon!\n\n\n# \ud83d\udce6 Setup\n\n## Local setup \ud83d\udee0\ufe0f with Docker \ud83d\udc33\n\n> Coming soon!\n\n<!--\n- **Installing and running**:\n  Before you begin, ensure you have docker installed. If not, refer to the [official documentation](https://docs.docker.com/engine/install/) to install docker.\n  ```bash\n  docker pull samad101/Chino\n  docker run -d -p 8080:8080 --name pastepyprod samad101\n  ```\n  -->\n\n<!--\n- **Using docker-compose**:\n  You can also use docker-compose to run the project locally by running the following command:\n  <br>\n  - **Clone the repository**:\n  Get the project source code from GitHub:\n\n  ```bash\n  git clone https://github.com/SAMAD101/Chino.git\n  ```\n\n  - **Navigate to the Project Directory**:\n\n  ```bash\n  cd Chino\n  ```\n\n  - **Run the project using docker-compose**:\n\n  ```bash\n  docker-compose up\n  ```\n-->\n\n## Local setup \ud83d\udee0\ufe0f without Docker \ud83d\udc33\n\n### Setting Up the Project with PDM\n\n[PDM (Python Development Master)](https://pdm.fming.dev/latest/) is utilized for dependency management in this project. To set up and run the project:\n\n- **Installing PDM**:\n  Before you begin, ensure you have PDM installed. If not, refer to the [official documentation](https://pdm.fming.dev/latest/) to install PDM.\n\n- **Clone the Repository**:\n  Get the project source code from GitHub:\n\n  ```bash\n  git clone https://github.com/SAMAD101/Chino.git\n  ```\n\n- **Navigate to the Project Directory**:\n\n  ```bash\n  cd Chino\n  ```\n\n- **Install Dependencies**:\n  Use PDM to install the project's dependencies:\n  ```bash\n  pdm install\n  ```\n  To install dev dependencies:\n  ```bash\n  pdm install -G dev\n  ```\n\n- **Start the Project**:\n  Use PDM to run the project:\n  ```bash\n  pdm run start\n  ```\n\n> Other commands are in `pyproject.toml` [tool.pdm.scripts]\n\n## \u26a0\ufe0f Note:\n\nYou will need an OpenAI API key to make it work. Get your API key from OpenAI website and set it as an environment variable:\n```bash\nexport OPENAI_API_KEY=\"<your_api_key>\"\n```\n\n## Usage \ud83d\udcd6\n\nFor using the Retrieval Augmented Generation (RAG) features, follow these steps:\n\n1. You will need to put your documents in the `data/` directory in the root of the project.\n    Create `data/` directory in the root of the project if it doesn't exist.\n    ```bash\n    mkdir data\n    ```\n\n2. Create a directory in the root of the project called `chroma/`.\n    This directory will contain the OpenAI embeddings (embedding vectors) for the documents.\n\n3. Process the documents and create the embeddings using the following command:\n    ```bash\n    pdm run process\n    ```\n\n### Using Query mode:\n\nOnce your documents are processed. You can use the query mode to give prompts for the documents [RAG].\n\n```bash\npdm run -q\n```\nor, you can use `\\q:` before your prompt to use it in query mode.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Sam  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Chino is a terminal based chatbot based on ChatGPT.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/SAMAD101/Chino"
    },
    "split_keywords": [
        "chatbot",
        "terminal",
        "openai",
        "rag",
        "bumpver"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12c5e26b36f7e500f164b7758d8014878640f6350178b9725376a1316fa70aa1",
                "md5": "d69ee0965057e8d2615fe5bf4f1a57f3",
                "sha256": "38e60d4a724f5c17291d5bc8f0aaebe2d3245bdf9071cfc020da38397664bcd0"
            },
            "downloads": -1,
            "filename": "chinoai-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d69ee0965057e8d2615fe5bf4f1a57f3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 8486,
            "upload_time": "2024-02-12T18:09:50",
            "upload_time_iso_8601": "2024-02-12T18:09:50.705857Z",
            "url": "https://files.pythonhosted.org/packages/12/c5/e26b36f7e500f164b7758d8014878640f6350178b9725376a1316fa70aa1/chinoai-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd91508c1f666a5b169ed93e7a60816879296730a49a14aa2792f46588633121",
                "md5": "9195ff48173ebb9c9419d1c5a924868c",
                "sha256": "6b825f4ee3eaf29d8df8a8e5219a0d6b3d75975b51ee5d9a73bab84fa43d33c6"
            },
            "downloads": -1,
            "filename": "chinoai-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9195ff48173ebb9c9419d1c5a924868c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 9879,
            "upload_time": "2024-02-12T18:09:53",
            "upload_time_iso_8601": "2024-02-12T18:09:53.043535Z",
            "url": "https://files.pythonhosted.org/packages/dd/91/508c1f666a5b169ed93e7a60816879296730a49a14aa2792f46588633121/chinoai-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-12 18:09:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SAMAD101",
    "github_project": "Chino",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "chinoai"
}
        
Elapsed time: 0.18169s