File size: 761 Bytes
68051dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from functools import lru_cache

from pydantic import BaseModel


class AssetsSettings(BaseModel):
    audio: str = "./assets/audio/AUDIO.wav"
    image: str = "./assets/image/"
    video: str = "./assets/video/VIDEO.mp4"


class HostSettings(BaseModel):
    voice_generator: str = "http://localhost:8001/"
    video_generator: str = "http://localhost:8002/"


class Settings(BaseModel):
    app_name: str = "Chatacter"
    assets: AssetsSettings = AssetsSettings()
    character: str = str()
    host: HostSettings = HostSettings()
    vector_database_name: str = "chatacter"


@lru_cache
def load_settings() -> Settings:
    return Settings()


if __name__ == "__main__":
    settings: Settings = load_settings()
    print(settings.model_dump_json(indent=4))