https://github.com/bm9avan/hcbot
This is an Hitesh Choudhary ai persona but this is created to help users with queries about the 'Chai Docs' documentation
https://github.com/bm9avan/hcbot
aipersona gemini-ai python streamlit
Last synced: about 1 month ago
JSON representation
This is an Hitesh Choudhary ai persona but this is created to help users with queries about the 'Chai Docs' documentation
- Host: GitHub
- URL: https://github.com/bm9avan/hcbot
- Owner: bm9avan
- Created: 2025-06-23T08:36:26.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-23T14:37:41.000Z (about 1 year ago)
- Last Synced: 2025-06-23T15:26:08.355Z (about 1 year ago)
- Topics: aipersona, gemini-ai, python, streamlit
- Language: Python
- Homepage: https://chaiaurdocs.streamlit.app
- Size: 44.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ฌ CHAI DOCS โ Gemini 2.5 Chatbot (by bm9avan)
An elegant chatbot interface powered by Google's Gemini 2.5 Flash model, built using Streamlit. This project includes custom persona injection via a system prompt, real-time chat memory, and an auto-scrolling UI with a sidebar for persona visibility.
---
## ๐ Features
- โจ Gemini 2.5 Flash model integration using `google.genai`
- ๐ง Persona Prompt loaded from JSON
- ๐ช Sticky sidebar showing current system prompt
- ๐ฌ Conversation history with roles (user & assistant)
- โฌ๏ธ Input box pinned at the bottom for continuous chat flow
- ๐ Auto-scrolls to the latest message automatically
- ๐งผ Clean layout with custom CSS for enhanced UX
---
## ๐ Project Structure
```
hcBot/
โโโ main.py # Streamlit app logic
โโโ Persona\_prompt.json # Contains the system persona instruction
โโโ requirements.txt # Python dependencies
โโโ .streamlit/
โโโ secrets.toml # Gemini API key config
```
---
## ๐ Setup & Run
### 1. Clone the repo
```bash
git clone https://github.com/bm9avan/gemini-chatbot.git
cd gemini-chatbot
```
### 2. Create virtual environment
```bash
python3 -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\\Scripts\\activate # Windows
```
### 3. Install dependencies
```bash
pip install -r requirements.txt
```
### 4. Add your Gemini API key
Create a file at `.streamlit/secrets.toml` and add:
```toml
[genai]
api_key = "your-gemini-api-key-here"
```
### 5. Customize Persona Prompt
Edit `Persona_prompt.json`:
```json
{
"system_instruction": "You are a helpful, knowledgeable AI that speaks like a software engineer and explains concepts clearly using analogies."
}
```
---
## โถ Run the App
```bash
streamlit run main.py
```
---
## โ๏ธ Customization
- ๐ก Want to change the assistant tone? Just modify `Persona_prompt.json`.
- ๐ Need markdown/code formatting? You can enhance output rendering using `st.markdown(..., unsafe_allow_html=True)` or with custom syntax highlighting.
---
## ๐ License
MIT โ feel free to fork and remix.
---
## ๐ค Author
Made by [bm9avan](https://github.com/bm9avan) with ๐ using Streamlit + Gemini AI