Welcome to the AI-Term-Talk, your command-line (CLI)/terminal-based companion powered by advanced AI! This interactive chatbot leverages the cutting-edge GroqCloud
API and the LLaMA3
AI model to provide accurate, context-aware answers to your questions, all from the comfort of your terminal. Whether you're looking for quick information, tech assistance, or just a fun conversation, our AI chatbot is ready to chat!
This project is the first task of the Tublian AI Internship. Through this challenge, I got to learn how to build applications on top of Large Language Models
. Specifically, gain hands-on experience using cloud-based AI services and LLaMa3
, the most popular open-source LLM
.
- Interactive Command-Line Interface: Engage in conversations directly in your terminal.
- Advanced AI Responses: Uses GroqCloud's LLaMA3 AI model for nuanced and contextually accurate replies.
- Seamless Integration: Quick setup with Node.js and easy-to-install dependencies.
- Environment Variable Management: Securely manage API keys and configuration with dotenv.
- Continuous Conversation: Keeps the conversation going until you decide to exit.
demo.mp4
Before you begin, ensure you have the following software installed on your machine:
- Node.js - Make sure to install a version that is compatible with the project.
- npm - Node.js package manager.
- Git - Version control system.
- GroqCloud API Key - Get your GroqCloud API Key.
- groq-sdk: version
0.4.0
- Description: To interact with GroqCloud API.
- dotenv: version
16.4.5
- Description: Loads environment variables from a .env file into process.env.
- chalk: version
5.3.0
- Description: For colorful prompts in the terminal.
-
Clone the repository:
git clone https://github.com/harmeetsingh11/ai-term-talk.git cd ai-term-talk
-
Install the dependencies:
npm install
-
Create a
.env
file in the root directory and add your Groq API key (You can get you Groq API key from here:GROQ_API_KEY= <input your_groq_api_key_here>
-
Run the chatbot:
npm run chatbot
-
Interact with the chatbot by typing your questions in the terminal. To exit, simply type
exit
in the terminal.
Here's a simple example of how to use the chatbot:
$ npm run chatbot
WELCOME TO AI-TERM-TALK (CLI AI CHATBOT)!
Ask your question (or type 'exit' to quit): what is machine learning? (explain in one line)
Thinking...
Machine learning is a subfield of artificial intelligence that enables computers to learn from data without being explicitly programmed, allowing them to recognize patterns, make predictions, and improve their performance over time.
Ask another question (or type 'exit' to quit): exit
GOODBYE!