| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
# 🤖 Simple AI Chatbot using LangChain + OpenRouter (Python)
This is a basic Python project that shows how to use **LangChain** with **OpenRouter** to create a simple AI assistant.
The AI answers questions in **easy, simple words**, making it perfect for beginners learning AI integration
---
## ✅ Features
- Uses **LangChain** for AI interaction
- Uses **OpenRouter API** (free model supported)
- Takes a question and prints the AI reply in the terminal
- Beginner-friendly and easy to understand
---
## 🧑💻 Requirements
Make sure you have:
- Python **3.9+** installed
- An **OpenRouter API Key**
---
## 📦 Install Required Libraries
Run this command in your terminal:
```bash
pip install langchain langchain-openai python-dotenvOPENROUTER_API_KEY=your_api_key_here⚠️ Never share your API key publicly.
Run the following command in your terminal:
python createagent.pyYou will see the AI response printed in the terminal.
user_question = "What is artificial intelligence in simple terms?"Artificial intelligence is when computers are taught to think and learn like humans to do tasks such as answering questions, recognizing images, or making decisions.
langchain-tutorials/
│
└──.env
└── python_langchian_example/
│
├── createagent.py
└── README.md
This project is free to use for learning and educational purposes.
| Back | FazBrowse Home | New Git URL |