Skip to content

tagaertner/chat_ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple AI Chatbot

A simple command-line chatbot that uses the Together AI API to have conversations using the Mixtral-8x7B language model.

Features

  • Interactive command-line chat interface
  • Powered by Mixtral-8x7B-Instruct model via Together AI
  • Simple setup with environment variables
  • Easy exit commands

Prerequisites

  • Python 3.7 or higher
  • Together AI API key (get one at together.ai)

Installation

  1. Clone or download this project

  2. Install required packages:

    pip install requests python-dotenv together
  3. Set up your API key:

    Create a .env file in the project directory and add your Together AI API key:

    TOGETHER_API_KEY=your_api_key_here
    

Usage

Run the chatbot:

python main.py

Once started:

  • Type your messages and press Enter to chat with the AI
  • Type bye, goodbye, exit, or quit to end the conversation

Example

Welcome to the simple chatbot!
YOU: Hello, how are you?
Chatbot: Hello! I'm doing well, thank you for asking. How can I help you today?
YOU: What's the weather like?
Chatbot: I don't have access to real-time weather data, but I'd be happy to help you with other questions or tasks!
YOU: bye
Chatbot: Goodbye!

Project Structure

chatbot/
├── main.py          # Main chatbot script
├── .env             # API key (create this file)
├── requirements.txt # Dependencies (optional)
└── README.md        # This file

Troubleshooting

ModuleNotFoundError: Make sure you've installed all required packages with pip

API Error: Check that your Together AI API key is correct in the .env file

No response: Verify you have an active internet connection and valid API credits

Dependencies

  • requests - For making HTTP requests to the API
  • python-dotenv - For loading environment variables
  • together - Together AI Python SDK

License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages