Spaces:
Sleeping
Sleeping
| 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() | |