File size: 484 Bytes
f114412
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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()