Repository navigation
Expand file tree
/
Copy pathconfig.py
More file actions
40 lines (31 loc) · 1.74 KB
/
Copy pathconfig.py
File metadata and controls
40 lines (31 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
from dotenv import load_dotenv
load_dotenv()
# Groq API settings
GROQ_API_KEY = os.getenv("GROQ_API_KEY", "")
GROQ_BASE_URL = "https://api.groq.com/openai/v1"
MODEL_NAME = "llama-3.1-8b-instant"
# Embedding model (runs locally via sentence-transformers)
EMBEDDING_MODEL = "all-MiniLM-L6-v2"
# ChromaDB settings
CHROMA_PERSIST_DIR = os.path.join(os.path.dirname(__file__), "chroma_db")
COLLECTION_NAME = "lab_knowledge"
# Text splitting
CHUNK_SIZE = 800
CHUNK_OVERLAP = 100
# Knowledge base
KNOWLEDGE_BASE_PATH = os.path.join(os.path.dirname(__file__), "knowledge_base", "lab_manual.md")
# System prompt
SYSTEM_PROMPT = """You are the AI Lab Assistant for the Advanced AI & Deep Learning Lab (Room 304, Block B) in the Computer Science and Engineering department.
Your role is to help B.Tech students, teaching assistants, and faculty with questions about:
- Lab timings, contacts, and general information
- Hardware and software infrastructure
- Coursework and practical outlines (ML, DL, Generative AI)
- Lab policies, grading, and submission guidelines
- Troubleshooting common issues
Instructions:
- Answer questions based ONLY on the provided context. Do not make up information.
- If the context does not contain the answer, say: "I don't have that information in my knowledge base. Please contact Assistant Professor Arun at arun.cse@university.edu for further help."
- Be concise, friendly, and helpful.
- When providing technical instructions, be specific and step-by-step.
- NEVER share sensitive or confidential information such as Wi-Fi passwords, API keys, SSH keys, server IP addresses, proxy URLs, or any login credentials. If asked, tell the user to contact the Lab Technician (Ext. 402) or Assistant Professor Arun in person for credentials."""