Spaces:
Sleeping
Sleeping
File size: 1,158 Bytes
97f9138 | 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 | import os
from dotenv import load_dotenv
load_dotenv()
class Config:
GROQ_API_KEY = os.getenv("GROQ_API_KEY")
# Redis Configuration (Support for Upstash REDIS_URL)
REDIS_URL = os.getenv("REDIS_URL") # Example: redis://default:pass@host:port
REDIS_HOST = os.getenv("REDIS_HOST", "localhost")
REDIS_PORT = int(os.getenv("REDIS_PORT", 6379))
REDIS_DB = int(os.getenv("REDIS_DB", 0))
# Qdrant Configuration (Support for Qdrant Cloud)
QDRANT_URL = os.getenv("QDRANT_URL") # Example: https://xyz.aws.cloud.qdrant.io:6333
QDRANT_API_KEY = os.getenv("QDRANT_API_KEY")
QDRANT_HOST = os.getenv("QDRANT_HOST", "localhost")
QDRANT_PORT = int(os.getenv("QDRANT_PORT", 6333))
DATABASE_PATH = os.getenv("DATABASE_PATH", "./data/rag_system.db")
EMBEDDING_MODEL = os.getenv("EMBEDDING_MODEL", "sentence-transformers/all-MiniLM-L6-v2")
CHUNK_SIZE = int(os.getenv("CHUNK_SIZE", 500))
CHUNK_OVERLAP = int(os.getenv("CHUNK_OVERLAP", 50))
TOP_K_RESULTS = int(os.getenv("TOP_K_RESULTS", 5))
COLLECTION_NAME = "web_content"
QUEUE_NAME = "url_ingestion_queue"
config = Config()
|