File size: 640 Bytes
86b351a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from dotenv import load_dotenv

load_dotenv()
from pydantic_settings import BaseSettings
import logging
from pydantic import SecretStr

logging.basicConfig(
    level=logging.INFO,
    format="%(levelname)s:\t%(asctime)s [%(name)s] %(message)s",
    datefmt="%Y-%m-%d %H:%M:%S %z",
)

class BaseAppSettings(BaseSettings):
    """Base settings class with common configuration."""

    class Config:
        env_file = ".env"
        env_file_encoding = "utf-8"
        extra = "ignore"
    
class AppSettings(BaseAppSettings):
    gemini_api_key: SecretStr
    top_p: float = 0.95
    temperature: float = 0.5
    

settings = AppSettings()