Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Ask AI β€” LLM Query Tool

A simple Node.js project that lets you ask any question to an AI model powered by Groq and LLaMA 3.3 70B.


πŸ“ Project Structure

ask-ai/
β”‚
β”œβ”€β”€ src/
β”‚   └── askAI.js        # Core AI function using Groq SDK
β”œβ”€β”€ index.js            # Entry point β€” run your question here
β”œβ”€β”€ .env                # Your API key (never push this!)
β”œβ”€β”€ .gitignore          # Ignores node_modules and .env
β”œβ”€β”€ package.json
└── README.md

πŸš€ Getting Started

1. Clone the repo

git clone https://github.com/your-username/ask-ai.git
cd ask-ai

2. Install dependencies

npm install

3. Setup environment variables

Create a .env file in the root folder:

API_KEY=your_groq_api_key_here

Get your free API key from πŸ‘‰ https://console.groq.com

4. Run the project

Ask a single question

node src/askAI.js

Chat with memory

node src/chatWithMemory.js

---

## πŸ’‘ How It Works

1. `index.js` defines a question and calls the `askAI()` function
2. `askAI.js` sends the question to **Groq API** using the **LLaMA 3.3 70B** model
3. The AI response is returned and printed in the terminal

---

## 🧠 Model Used

| Property | Value |
|----------|-------|
| Provider | [Groq](https://groq.com) |
| Model | `llama-3.3-70b-versatile` |
| Speed | Ultra-fast inference |
| Cost | Free tier available |

---

## πŸ“¦ Dependencies

| Package | Purpose |
|---------|---------|
| `groq-sdk` | Groq API client |
| `dotenv` | Load environment variables |


---

## πŸ“Έ Sample Output
```bash
Answer to 'What is the weather in New York?': 
I don't have real-time data, but I can tell you that New York 
typically experiences cold winters and hot summers...

About

πŸ€– Learning LLMs with hands-on projects β€” AI chat, memory, agents and more

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages