ChatFlock

🤔 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

2-Participant Chat

AI-Directed Multi-Participant Chat

End-to-End Examples

🚀 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

  • Code Execution Tools: Facilitate the execution of direct code snippets within the chat, with support for both local and Docker environments.