Chat99 is an intelligent AI assistant with advanced memory, multi-model capabilities, and dynamic routing inspired by RouteLLM. My project has now diverged too much to practicilly integrate RouteLLM but check them out https://github.com/lm-sys/RouteLLM (I don't know these guys but just a shoutout).
Chat99 is a pre-curser to the intended end goal of creating Agent99 and an agentic framework that dynamically routes between local/lower-end models for simpler or specific task execution while also assigning model parameters to achieve the best results for each specific task.
Agent99, as a project name, is a loose call back to the 60's comedy show "Get Smart". Get Smart was and probably still is on re-runs every afternoon, and I'd watch it after school. And like many of you... Agent 99 was of particular interest. Although that wasn't part of why I named it that. It was the first thing that popped into my head when I thought, "Agent... Agent... what?"
- Dynamic model selection using RouteLLM
- Advanced memory management for context retention
- Support for multiple AI models (Claude, GPT-4, etc.)
- Calibration tool for optimizing model selection thresholds
- Local model support using Ollama
- memory_manager.py is a temporary solution so that focus can be placed on other project areas.
-
Clone the repository:
git clone https://github.com/GaryOcean428/Agent99.git cd Agent99 -
Install the required dependencies:
pip install -r requirements.txt -
Set up your environment variables by copying the
.env.templatefile to.envand filling in your API keys:cp .env.template .envThen edit the
.envfile with your actual API keys.
-
Run the calibration script to find the optimal threshold for model selection:
python calibrate_threshold.py --sample-queries sample_queries.json --router mf --strong-model-pct 0.5 -
Start the Chat99 assistant:
python main.py --use-dynamic-routing --router mf --threshold <threshold_from_calibration>
To run the project using Docker, follow these steps:
-
Make sure you have Docker and Docker Compose installed on your system.
-
Build and run the Docker container:
docker-compose up --buildThis command will build the Docker image and start the container.
-
Access the application by opening a web browser and navigating to
http://localhost:5000. -
To stop the container, press Ctrl+C in the terminal where docker-compose is running, or run:
docker-compose down
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Chat99 is an intelligent AI assistant with advanced memory, multi-model capabilities, and dynamic routing using AdvancedRouter.
- Dynamic model selection using AdvancedRouter
- Advanced memory management for context retention
- Support for multiple AI models (Claude, Llama, etc.)
- Calibration tool for optimizing model selection thresholds
- Local model support using Ollama
-
Clone the repository:
git clone https://github.com/GaryOcean428/Agent99.git cd Agent99 -
Install the required dependencies:
pip install -r requirements.txt -
Set up your environment variables by copying the
.env.templatefile to.envand filling in your API keys:cp .env.template .envThen edit the
.envfile with your actual API keys.
-
Run the calibration script to find the optimal threshold for model selection:
python calibrate_threshold.py --sample-queries sample_queries.json --strong-model-pct 0.5 -
Start the Chat99 assistant:
python chat99.py -
Interact with the assistant by typing your messages when prompted.
-
To exit the program, you can:
- Type "exit" when prompted for input
- Use the keyboard interrupt (Ctrl + C on most systems, Cmd + C on macOS)
chat99.py: Main script for the chat interfaceadvanced_router.py: Handles dynamic model selectionconfig.py: Configuration settings for the projectmemory_manager.py: Manages conversation context and memorymodels.py: Defines available AI modelscalibrate_threshold.py: Script for calibrating the routing threshold
- Functional chat interface with dynamic model routing
- Support for multiple AI models (Claude 3.5, Llama 3.1 70B, Llama 3.1 8B)
- Basic complexity assessment for query routing
- Calibration script for optimizing routing thresholds
- Enhance complexity assessment with more sophisticated NLP techniques
- Implement dynamic allocation of temperature and top-p parameters
- Develop multi-dimensional routing considering both model and parameter selection
- Integrate user preferences for response style
- Implement adaptive learning for continuous improvement of routing decisions
- Explore multi-model ensemble responses for comprehensive answers
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.