File size: 806 Bytes
e0a73da
fa99d8f
 
e0a73da
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa99d8f
e0a73da
 
 
fa99d8f
e0a73da
 
 
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
34
import os
from pydantic import AnyHttpUrl, ConfigDict
from pydantic_settings import BaseSettings
from enum import Enum


class ModeEnum(str, Enum):
    development = "development"
    production = "production"
    testing = "testing"


class Settings(BaseSettings):
    PROJECT_NAME: str = "app"
    BACKEND_CORS_ORIGINS: list[str] | list[AnyHttpUrl]
    MODE: ModeEnum = ModeEnum.development
    API_VERSION: str = "v1"
    API_V1_STR: str = f"/api/{API_VERSION}"
    HUGGINGFACEHUB_API_TOKEN: str
    GOOGLE_CSE_ID: str
    GOOGLE_API_KEY: str
    VECTOR_DATABASE_LOCATION: str
    CONVERSATION_COLLECTION_NAME: str
    EMBEDDING_MODEL: str
    SOURCES_CACHE: str
    LOCAL_CACHE: str

    class Config:
        case_sensitive = True
        env_file = os.path.expanduser(".env")


settings = Settings()