TARS is a terminal-based chatbot inspired by the character TARS from Interstellar. It leverages modern LLMs, tool integrations, and persistent memory to deliver engaging and context-aware interactions.
- Interactive Chat: Chat with TARS in your terminal, complete with wit and useful responses.
- Tool Integration: Includes search capabilities using APIs (e.g., Tavily).
- Persistent Memory: Maintains context between interactions using a memory module.
- Configurable Personality: Modify the system prompt to fine-tune TARS's personality and behavior.
- Python 3.8 or higher
pip
for installing dependencies- API keys for Tavily and Groq (or other LLM APIs)
-
Clone the repository:
git clone https://github.com/Rikhil-Nell/Terminal-Chatbot.git cd tars-terminal-chatbot
-
Set up a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a .env file in the project root with your API keys:
GROQ_API_KEY=your_groq_api_key TAVILY_API_KEY=your_tavily_api_key
-
Modify the system prompt if desired:
- Update the
prompt.txt
file to define TARS's personality and tone.
- Update the
Run the chatbot using:
python app.py
Once running, you'll see a terminal interface where you can chat with TARS. Enter your messages, and TARS will respond with contextually aware and detailed answers.
core.py: Main logic of the chatbot. app.py: Sets up the terminal interface for inference. prompt.txt: Defines the system prompt for TARS's personality. requirements.txt: List of dependencies. .env: Configuration file for storing API keys (not included in the repository).
- System Prompt: Customize
prompt.txt
to adjust TARS's behavior. - Memory Management: Persistent memory ensures TARS remembers previous interactions. Adjust the memory settings in tars_chatbot.py as needed.
Contributions are welcome! If you'd like to improve TARS or add features, please submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.