DhiGrowth_FAQ_RAG / config.py
mathanmithun's picture
Upload 39 files
f45a28c verified
Raw History Blame Contribute Delete
864 Bytes
"""
Configuration module for Dhigrowth RAG Chatbot
Loads configuration from environment variables with defaults
"""
import os
from dotenv import load_dotenv
# Load environment variables from .env file if it exists
load_dotenv()
# Model configuration
MODEL_PATH = os.getenv("MODEL_PATH", "./models/Dhi_Qwen2P5_0_5B_Q4_K_M.gguf")
EMBEDDINGS_PATH = os.getenv("EMBEDDINGS_PATH", "./embeddings")
DATA_PATH = os.getenv("DATA_PATH", "./data/dhigrowth_final_rag_ft.jsonl")
EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "all-MiniLM-L6-v2")
MAX_TOKENS = int(os.getenv("MAX_TOKENS", "400"))
TOP_K = int(os.getenv("TOP_K", "3"))
# LLM configuration
N_CTX = int(os.getenv("N_CTX", "4096"))
TEMPERATURE = float(os.getenv("TEMPERATURE", "0.0"))
TOP_P = float(os.getenv("TOP_P", "1.0"))
# Server configuration
PORT = int(os.getenv("PORT", "8001"))