LawChatbot / lawchatbot /config.py
NLPGenius's picture
Initial commit for LawChatbot Panel
f114412
raw
history blame contribute delete
484 Bytes
from pydantic_settings import BaseSettings
import os
class AppConfig(BaseSettings):
weaviate_url: str
weaviate_api_key: str
openai_api_key: str
weaviate_class: str
text_key: str
metadata_attributes: list[str]
semantic_k: int = 10
bm25_k: int = 5
alpha: float = 0.5
class Config:
env_file = ".env"
def load_config() -> AppConfig:
"""
Loads configuration from environment variables or .env file.
"""
return AppConfig()