LogicGoInfotechSpaces commited on
Commit
3be72e2
·
verified ·
1 Parent(s): c7ee8c4

Update app/core/config.py

Browse files
Files changed (1) hide show
  1. app/core/config.py +27 -0
app/core/config.py CHANGED
@@ -10,6 +10,7 @@ class Settings(BaseSettings):
10
  mongo_uri: str = Field(..., alias="MONGO_URI")
11
  mongo_db: str = Field("wallet_sync", alias="MONGO_DB")
12
  mongo_collection: str = Field("autocategory", alias="MONGO_COLLECTION")
 
13
 
14
  openai_api_key: str = Field(..., alias="OPENAI_API_KEY")
15
  openai_model: str = Field("gpt-4o-mini", alias="OPENAI_MODEL")
@@ -23,3 +24,29 @@ def get_settings() -> Settings:
23
 
24
 
25
  settings = get_settings()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  mongo_uri: str = Field(..., alias="MONGO_URI")
11
  mongo_db: str = Field("wallet_sync", alias="MONGO_DB")
12
  mongo_collection: str = Field("autocategory", alias="MONGO_COLLECTION")
13
+ api_logs_collection: str = Field("api_logs", alias="MONGO_API_LOGS_COLLECTION")
14
 
15
  openai_api_key: str = Field(..., alias="OPENAI_API_KEY")
16
  openai_model: str = Field("gpt-4o-mini", alias="OPENAI_MODEL")
 
24
 
25
 
26
  settings = get_settings()
27
+
28
+ # from functools import lru_cache
29
+
30
+ # from pydantic import Field
31
+ # from pydantic_settings import BaseSettings, SettingsConfigDict
32
+
33
+
34
+ # class Settings(BaseSettings):
35
+ # model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
36
+
37
+ # mongo_uri: str = Field(..., alias="MONGO_URI")
38
+ # mongo_db: str = Field("wallet_sync", alias="MONGO_DB")
39
+ # mongo_collection: str = Field("autocategory", alias="MONGO_COLLECTION")
40
+
41
+ # openai_api_key: str = Field(..., alias="OPENAI_API_KEY")
42
+ # openai_model: str = Field("gpt-4o-mini", alias="OPENAI_MODEL")
43
+
44
+ # category_cache_ttl_seconds: int = Field(300, alias="CATEGORY_CACHE_TTL")
45
+
46
+
47
+ # @lru_cache
48
+ # def get_settings() -> Settings:
49
+ # return Settings()
50
+
51
+
52
+ # settings = get_settings()