File size: 864 Bytes
f45a28c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""

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"))