chat-flock


Namechat-flock JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/doodledood/chat-flock
SummaryDriving Dynamic Multi-Participant Chat Interactions for AI and Human Discourse
upload_time2023-11-16 11:36:04
maintainer
docs_urlNone
authorchat-flock
requires_python>=3.8.1,<4.0.0
licenseMIT
keywords chat chatbot openai llm generative-ai langchain
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ChatFlock

<div align="center">

[![Build status](https://github.com/doodledood/chat-flock/workflows/build/badge.svg)](https://github.com/doodledood/chat-flock/actions?query=workflow%3Abuild)
[![Python Version](https://img.shields.io/pypi/pyversions/chat-flock.svg)](https://pypi.org/project/chat-flock/)
[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/doodledood/chat-flock/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](.pre-commit-config.yaml)
[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/doodledood/chat-flock/releases)
[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
![Coverage Report](assets/images/coverage.svg)

Driving Dynamic Multi-Participant Chat Interactions for AI and Human Discourse πŸ€–

</div>

## πŸ“¦ Installation

```bash
pip install -U chat-flock
```

or install with `Poetry`

```bash
poetry add chat-flock
```

## πŸ€” What is this?

ChatFlock is a Python library that revolutionizes the way multi-participant chats are conducted by integrating Large Language Models (LLMs) at its core. Born from first principles design, it not only simplifies orchestrating complex chat scenarios but also introduces an innovative structure that mirrors organizational communication. 

At the heart of ChatFlock is the Conductor, a novel entity that determines the speaking order, enabling seamless coordination among AI and human participants. This orchestration allows for nuanced conversations and decision-making processes that go beyond traditional chat systems.

**NOTE: We are still in a very early and experimental stage of development, so the library might be unstable and the API might change relatively frequently. As soon as we reach a stable version, everything will get properly tested and documented.**

### πŸ“ Usage Examples 

#### 1-Participant Chat
- [Assistant Self-Dialogue](examples/assistant_self_dialog.py)

#### 2-Participant Chat

- [Basic ChatGPT Clone](examples/chatgpt_clone.py)
- [Basic ChatGPT Clone with Tools](examples/chatgpt_clone_with_additional_tools.py)
- [Basic ChatGPT Clone with LangChain Memory](examples/chatgpt_clone_with_langchain_memory.py)
- [Basic ChatGPT Clone with LangChain-Based Retrieval](examples/chatgpt_clone_with_langchain_retrieval.py)

#### AI-Directed Multi-Participant Chat

- [AI-Directed Multi-Participant Chat (Manual Composition)](examples/three_way_ai_conductor.py)
- [AI-Directed Multi-Participant Chat (Automated Composition)](examples/automatic_chat_composition.py)
- [AI-Directed Multi-Participant Hierarchical Chat (Manual Composition)](examples/manual_hierarchical_participant.py)


#### End-to-End Examples
- [BSHR (Brainstorm-Search-Hypothesize-Refine) Loop](examples/bshr_loop.py) - Based on [David Shapiro's](https://github.com/daveshap/BSHR_Loop) idea.

## πŸš€ Features

- **Multi-Participant LLM-Based Chats**: Enable rich, collaborative conversations with AI and human participants.
- **Conductor Orchestration**: A unique system that manages turn-taking and dialogue flow, ensuring smooth chat progression.
- **Composition Generators**: Smart modules that configure AI participants to achieve specific conversational goals.
- **Group-Based Participants (Hierarchical Chats)**: Implement sub-chats that handle complex queries internally before delivering concise responses. Enables hierarchical chat structures which can mimic human-like organizational communication.
- **Extensive LLM Toolkit Support**: Fully compatible with existing LLM ecosystems like LangChain, enhancing their features for a robust chat experience.
- **Web Research Module**: A sophisticated tool that conducts automated web research, leveraging selenium to analyze top search results.
- **BSHR (Brainstorm-Search-Hypothesize-Refine) Loop**: An integrated module that employs the automated research tool in a loop using information literacy techniques for superior research outcomes (based on how humans do research). Credit: [David Shapiro](https://github.com/daveshap/BSHR_Loop)
- **Code Execution Tools**: Facilitate the execution of direct code snippets within the chat, with support for both local and Docker environments.

## 🌟 What's Next?
- **Asynchronous Chat Support**: enable non-real-time conversations, allowing for more flexible interaction timelines.
- **Automated AI Hierarchical Composition**: Automatically configure AI participants in a complex company-like hierarchy to achieve specific conversational goals.
- **OpenAI Assistant Integration**: Compatibility with OpenAI's latest features, expanding the library's AI capabilities.
- **Enhanced Code Execution**: Advanced code execution features, including support for writing to files and more comprehensive execution environments.

## πŸ’ Contributing
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see [here](CONTRIBUTING.md).

## πŸ“ˆ Releases

You can see the list of available releases on the [GitHub Releases](https://github.com/doodledood/chat-flock/releases) page.

We follow [Semantic Versions](https://semver.org/) specification.

We use [`Release Drafter`](https://github.com/marketplace/actions/release-drafter). As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.

### List of labels and corresponding titles

|               **Label**               |  **Title in Releases**  |
| :-----------------------------------: | :---------------------: |
|       `enhancement`, `feature`        |       πŸš€ Features       |
| `bug`, `refactoring`, `bugfix`, `fix` | πŸ”§ Fixes & Refactoring  |
|       `build`, `ci`, `testing`        | πŸ“¦ Build System & CI/CD |
|              `breaking`               |   πŸ’₯ Breaking Changes   |
|            `documentation`            |    πŸ“ Documentation     |
|            `dependencies`             | ⬆️ Dependencies updates |

GitHub creates the `bug`, `enhancement`, and `documentation` labels for you. Dependabot creates the `dependencies` label. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.

#### Building and releasing the package

Building a new version of the application contains steps:

- Bump the version of the package `poetry version <version>`. You can pass the new version explicitly, or a rule such as `major`, `minor`, or `patch`. For more details, refer to the [Semantic Versions](https://semver.org/) standard.
- Make a commit to `GitHub`.
- Create a `GitHub release`.
- And... publish πŸ™‚ `poetry publish --build`

## πŸ›‘ License

[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

This project is licensed under the terms of the `MIT` license. See [LICENSE](LICENSE) for more details.

## πŸ“ƒ Citation

```bibtex
@misc{chat-flock,
  author = {doodledood},
  title = {Driving Dynamic Multi-Participant Chat Interactions for AI and Human Discourse},
  year = {2023},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/doodledood/chat-flock}}
}
```

## ❀️ Package Template Credits [![πŸš€ Your next Python package needs a bleeding-edge project structure.](https://img.shields.io/badge/python--package--template-%F0%9F%9A%80-brightgreen)](https://github.com/TezRomacH/python-package-template)

This project was generated with [`python-package-template`](https://github.com/TezRomacH/python-package-template)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/doodledood/chat-flock",
    "name": "chat-flock",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4.0.0",
    "maintainer_email": "",
    "keywords": "chat,chatbot,openai,llm,generative-ai,langchain",
    "author": "chat-flock",
    "author_email": "hello@chat-flock.com",
    "download_url": "https://files.pythonhosted.org/packages/4d/eb/d03a64e336a914918d1361e6f43c74948b9de5e4dbb710bf324ec44c668d/chat_flock-0.1.1.tar.gz",
    "platform": null,
    "description": "# ChatFlock\n\n<div align=\"center\">\n\n[![Build status](https://github.com/doodledood/chat-flock/workflows/build/badge.svg)](https://github.com/doodledood/chat-flock/actions?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/chat-flock.svg)](https://pypi.org/project/chat-flock/)\n[![Dependencies Status](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)](https://github.com/doodledood/chat-flock/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Security: bandit](https://img.shields.io/badge/security-bandit-green.svg)](https://github.com/PyCQA/bandit)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](.pre-commit-config.yaml)\n[![Semantic Versions](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--versions-e10079.svg)](https://github.com/doodledood/chat-flock/releases)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n![Coverage Report](assets/images/coverage.svg)\n\nDriving Dynamic Multi-Participant Chat Interactions for AI and Human Discourse \ud83e\udd16\n\n</div>\n\n## \ud83d\udce6 Installation\n\n```bash\npip install -U chat-flock\n```\n\nor install with `Poetry`\n\n```bash\npoetry add chat-flock\n```\n\n## \ud83e\udd14 What is this?\n\nChatFlock is a Python library that revolutionizes the way multi-participant chats are conducted by integrating Large Language Models (LLMs) at its core. Born from first principles design, it not only simplifies orchestrating complex chat scenarios but also introduces an innovative structure that mirrors organizational communication. \n\nAt the heart of ChatFlock is the Conductor, a novel entity that determines the speaking order, enabling seamless coordination among AI and human participants. This orchestration allows for nuanced conversations and decision-making processes that go beyond traditional chat systems.\n\n**NOTE: We are still in a very early and experimental stage of development, so the library might be unstable and the API might change relatively frequently. As soon as we reach a stable version, everything will get properly tested and documented.**\n\n### \ud83d\udcdd Usage Examples \n\n#### 1-Participant Chat\n- [Assistant Self-Dialogue](examples/assistant_self_dialog.py)\n\n#### 2-Participant Chat\n\n- [Basic ChatGPT Clone](examples/chatgpt_clone.py)\n- [Basic ChatGPT Clone with Tools](examples/chatgpt_clone_with_additional_tools.py)\n- [Basic ChatGPT Clone with LangChain Memory](examples/chatgpt_clone_with_langchain_memory.py)\n- [Basic ChatGPT Clone with LangChain-Based Retrieval](examples/chatgpt_clone_with_langchain_retrieval.py)\n\n#### AI-Directed Multi-Participant Chat\n\n- [AI-Directed Multi-Participant Chat (Manual Composition)](examples/three_way_ai_conductor.py)\n- [AI-Directed Multi-Participant Chat (Automated Composition)](examples/automatic_chat_composition.py)\n- [AI-Directed Multi-Participant Hierarchical Chat (Manual Composition)](examples/manual_hierarchical_participant.py)\n\n\n#### End-to-End Examples\n- [BSHR (Brainstorm-Search-Hypothesize-Refine) Loop](examples/bshr_loop.py) - Based on [David Shapiro's](https://github.com/daveshap/BSHR_Loop) idea.\n\n## \ud83d\ude80 Features\n\n- **Multi-Participant LLM-Based Chats**: Enable rich, collaborative conversations with AI and human participants.\n- **Conductor Orchestration**: A unique system that manages turn-taking and dialogue flow, ensuring smooth chat progression.\n- **Composition Generators**: Smart modules that configure AI participants to achieve specific conversational goals.\n- **Group-Based Participants (Hierarchical Chats)**: Implement sub-chats that handle complex queries internally before delivering concise responses. Enables hierarchical chat structures which can mimic human-like organizational communication.\n- **Extensive LLM Toolkit Support**: Fully compatible with existing LLM ecosystems like LangChain, enhancing their features for a robust chat experience.\n- **Web Research Module**: A sophisticated tool that conducts automated web research, leveraging selenium to analyze top search results.\n- **BSHR (Brainstorm-Search-Hypothesize-Refine) Loop**: An integrated module that employs the automated research tool in a loop using information literacy techniques for superior research outcomes (based on how humans do research). Credit: [David Shapiro](https://github.com/daveshap/BSHR_Loop)\n- **Code Execution Tools**: Facilitate the execution of direct code snippets within the chat, with support for both local and Docker environments.\n\n## \ud83c\udf1f What's Next?\n- **Asynchronous Chat Support**: enable non-real-time conversations, allowing for more flexible interaction timelines.\n- **Automated AI Hierarchical Composition**: Automatically configure AI participants in a complex company-like hierarchy to achieve specific conversational goals.\n- **OpenAI Assistant Integration**: Compatibility with OpenAI's latest features, expanding the library's AI capabilities.\n- **Enhanced Code Execution**: Advanced code execution features, including support for writing to files and more comprehensive execution environments.\n\n## \ud83d\udc81 Contributing\nAs an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.\n\nFor detailed information on how to contribute, see [here](CONTRIBUTING.md).\n\n## \ud83d\udcc8 Releases\n\nYou can see the list of available releases on the [GitHub Releases](https://github.com/doodledood/chat-flock/releases) page.\n\nWe follow [Semantic Versions](https://semver.org/) specification.\n\nWe use [`Release Drafter`](https://github.com/marketplace/actions/release-drafter). As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you\u2019re ready. With the categories option, you can categorize pull requests in release notes using labels.\n\n### List of labels and corresponding titles\n\n|               **Label**               |  **Title in Releases**  |\n| :-----------------------------------: | :---------------------: |\n|       `enhancement`, `feature`        |       \ud83d\ude80 Features       |\n| `bug`, `refactoring`, `bugfix`, `fix` | \ud83d\udd27 Fixes & Refactoring  |\n|       `build`, `ci`, `testing`        | \ud83d\udce6 Build System & CI/CD |\n|              `breaking`               |   \ud83d\udca5 Breaking Changes   |\n|            `documentation`            |    \ud83d\udcdd Documentation     |\n|            `dependencies`             | \u2b06\ufe0f Dependencies updates |\n\nGitHub creates the `bug`, `enhancement`, and `documentation` labels for you. Dependabot creates the `dependencies` label. Create the remaining labels on the Issues tab of your GitHub repository, when you need them.\n\n#### Building and releasing the package\n\nBuilding a new version of the application contains steps:\n\n- Bump the version of the package `poetry version <version>`. You can pass the new version explicitly, or a rule such as `major`, `minor`, or `patch`. For more details, refer to the [Semantic Versions](https://semver.org/) standard.\n- Make a commit to `GitHub`.\n- Create a `GitHub release`.\n- And... publish \ud83d\ude42 `poetry publish --build`\n\n## \ud83d\udee1 License\n\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\nThis project is licensed under the terms of the `MIT` license. See [LICENSE](LICENSE) for more details.\n\n## \ud83d\udcc3 Citation\n\n```bibtex\n@misc{chat-flock,\n  author = {doodledood},\n  title = {Driving Dynamic Multi-Participant Chat Interactions for AI and Human Discourse},\n  year = {2023},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/doodledood/chat-flock}}\n}\n```\n\n## \u2764\ufe0f Package Template Credits [![\ud83d\ude80 Your next Python package needs a bleeding-edge project structure.](https://img.shields.io/badge/python--package--template-%F0%9F%9A%80-brightgreen)](https://github.com/TezRomacH/python-package-template)\n\nThis project was generated with [`python-package-template`](https://github.com/TezRomacH/python-package-template)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Driving Dynamic Multi-Participant Chat Interactions for AI and Human Discourse",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/doodledood/chat-flock",
        "Repository": "https://github.com/doodledood/chat-flock"
    },
    "split_keywords": [
        "chat",
        "chatbot",
        "openai",
        "llm",
        "generative-ai",
        "langchain"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "327e752ac4ee99cd25cbde5531bb6a1332b1da099f52d4a66443ee00d46e5ae3",
                "md5": "d456bd772f6a2f2a38918ce4cd0cad16",
                "sha256": "3bb43fe4ef3867f63683a2c8377071aa92500cddb9fb8b9d3efe4b53753aded7"
            },
            "downloads": -1,
            "filename": "chat_flock-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d456bd772f6a2f2a38918ce4cd0cad16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 56107,
            "upload_time": "2023-11-16T11:36:02",
            "upload_time_iso_8601": "2023-11-16T11:36:02.848608Z",
            "url": "https://files.pythonhosted.org/packages/32/7e/752ac4ee99cd25cbde5531bb6a1332b1da099f52d4a66443ee00d46e5ae3/chat_flock-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4debd03a64e336a914918d1361e6f43c74948b9de5e4dbb710bf324ec44c668d",
                "md5": "2e561e3463323279cdb4052ab41424b1",
                "sha256": "afd501e47b1fe54479d6c72f8153a254e332f0c6eee313daf43aa1f9c5146aba"
            },
            "downloads": -1,
            "filename": "chat_flock-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2e561e3463323279cdb4052ab41424b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4.0.0",
            "size": 41370,
            "upload_time": "2023-11-16T11:36:04",
            "upload_time_iso_8601": "2023-11-16T11:36:04.586921Z",
            "url": "https://files.pythonhosted.org/packages/4d/eb/d03a64e336a914918d1361e6f43c74948b9de5e4dbb710bf324ec44c668d/chat_flock-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-16 11:36:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "doodledood",
    "github_project": "chat-flock",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "chat-flock"
}
        
Elapsed time: 0.13867s