/townhall

A Python-based chatbot project built on the autogen and tinygrad foundation, utilizing advanced agents for dynamic conversations and function orchestration, enhancing and expanding traditional chatbot capabilities.

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Townhall Banner

Townhall

🚧 Under heavy development and in transition from a previous personal project. Not ready for production use. 🚧

GitHub contributors GitHub issues GitHub pull requests GitHub forks GitHub stars GitHub watchers GitHub followers GitHub license Security: bandit

Townhall is a cutting-edge chatbot framework crafted in Python and grounded on the robust Autogen foundation. This isn't just another chatbot; Townhall leverages the power of advanced agents to breathe life into conversations and elevate them to a whole new level.

🧱 The Autogen Foundation: The Bedrock of Innovation

At its core, Townhall is built upon the Autogen framework, a pioneering platform for LLMs. Autogen enables the creation of agents that are not only customizable but also conversational. These agents can interact with each other, and seamlessly incorporate human inputs, setting the stage for more dynamic and intelligent dialogues.

Our advanced agents go beyond merely responding to user queries; they orchestrate multiple functions to provide a cohesive and engaging user experience. Think of them as the conductors of a grand symphony, where each instrument is a unique function or feature. They coordinate these functions to create a harmonious and effective dialogue, far outclassing traditional chatbots which often feel like disjointed sets of scripted responses. The advanced agents adapt and learn, making each conversation better than the last. They can switch between various modes, employing a blend of LLMs, human inputs, and specialized tools to deliver a personalized conversational experience.

Table of Contents

  1. Features
  2. Prerequisites
  3. Installation
  4. Usage
  5. Contributing
  6. Testing
  7. Roadmap
  8. Credits
  9. License

πŸ“ Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python 3.10 or higher
  • pip package manager
  • sqlite3

πŸ› οΈ Installation

Docker Compose

git clone --recurse-submodules https://github.com/shoutsid/townhall.git
cd townhall
docker compose up -d
docker compose exec townhall bash
./setup.sh

For Linux

git clone --recurse-submodules https://github.com/shoutsid/townhall.git
cd townhall
./setup.sh

For Mac/Windows

The easiest way to get setup on windows is to start playing is click below to use the Github Codespace. Otherwise this was developed on WSL Ubuntu.

Open in GitHub Codespaces

🌐 Usage

Agents

Each agent can be run independently. To start an product_manager agent for example, run the following commands:

export OPENAI_API_KEY=<your-api-key>
python3 townhall/agents/product_manager.py

LLaMa Integration

To start the Llama module, run the following commands:

pip install -r requirements.txt
cd townhall/models/llama/weights/
bash pull_llama.sh
cd ../../../..
python3 townhall/models/llama/llama.py

GPT-2 Integration

To start the GPT-2 module, run the following commands:

python3 townhall/models/gpt2/gpt2.py

🀝 Contributing

If you would like to contribute to Townhall, please fork the repository and use a feature branch. Pull requests are warmly welcome.

πŸ§ͺ Testing

To run the tests:

pytest

πŸ—ΊοΈ Roadmap

For the detailed roadmap of upcoming features, please visit our Project Board.

πŸ‘ Credits

  • Prompt Contributions: A big thank you to Josh-XT for the various prompts. Check out his repository AGiXT for more details.
  • Autogen Foundation: Townhall is built upon the robust Autogen Framework, a pioneering platform for LLMs by Microsoft.
  • OpenAI Assistant: Special mention to OpenAI Assistant for aiding in the development process.
  • tinygrad: Special thanks to tinygrad for providing the foundational machine learning framework that enhances our project's capabilities.

Developed by @shoutsid.

πŸ“œ License

This project is licensed under the GNU GENERAL PUBLIC LICENSE . See the LICENSE.md file for details.