@@ -10,12 +10,18 @@ class OllamaSettings(BaseSettings):
1010 Base settings for Ollama interaction
1111 """
1212
13- base_url : str = Field (description = "The Ollama base url" )
14- timeout_seconds : float
13+ base_url : str = Field (
14+ default = "http://localhost:11434/api/generate" , description = "The Ollama base url"
15+ )
16+ timeout_seconds : float = Field (
17+ default = 30.0 , description = "Timeout for calling Ollama"
18+ )
1519 stream : bool = Field (default = False , description = "Flag to denote chunked streaming." )
16- model : str = Field (description = "Ollama model name." )
20+ model : str = Field (default = "gemma2" , description = "Ollama model name." )
1721
18- model_config = SettingsConfigDict (env_file = ".env" , env_prefix = "OLLAMA_" )
22+ model_config = SettingsConfigDict (
23+ env_file = ".env" , env_prefix = "OLLAMA_" , extra = "allow"
24+ )
1925
2026
2127class DatabaseSettings (BaseSettings ):
@@ -36,16 +42,18 @@ class LoggingSettings(BaseSettings):
3642 Configuration for Loguru logging sinks.
3743 """
3844
39- level : str = Field (description = "The log level" )
45+ level : str = Field (default = "DEBUG" , description = "The log level" )
4046 console : bool = Field (default = True , description = "Show logs in console" )
4147 enable_file : bool = Field (
4248 default = False , description = "Flag to denote persistence of logs"
4349 )
4450 filepath : Optional [Path ] = Field (
4551 default = None , description = "Optional file path for logs"
4652 )
47- rotation : str = Field (description = "Roll log after this size" )
48- retention : str = Field (description = "Keep logs for this amount of time" )
49- compression : str = Field (description = "Compress old logs" )
53+ rotation : str = Field (default = "10 MB" , description = "Roll log after this size" )
54+ retention : str = Field (
55+ default = "7 days" , description = "Keep logs for this amount of time"
56+ )
57+ compression : str = Field (default = "zip" , description = "Compress old logs" )
5058
5159 model_config = SettingsConfigDict (env_file = ".env" , env_prefix = "LOG_" , extra = "allow" )
0 commit comments