Update config.py
Browse files
config.py
CHANGED
|
@@ -2,13 +2,12 @@ import logging
|
|
| 2 |
from functools import lru_cache
|
| 3 |
from typing import Union, Optional
|
| 4 |
from pydantic_settings import BaseSettings
|
| 5 |
-
from pydantic import SecretStr, PostgresDsn, DirectoryPath, Field, validator
|
| 6 |
|
| 7 |
logger = logging.getLogger(__name__)
|
| 8 |
|
| 9 |
class Settings(BaseSettings):
|
| 10 |
|
| 11 |
-
DATABASE_URL: PostgresDsn = Field(default="postgresql://mwk@localhost:5432/mwk")
|
| 12 |
MAX_THREAD_NAME_LENGTH: int = Field(default=100)
|
| 13 |
|
| 14 |
OPENAI_API_KEY: SecretStr
|
|
@@ -25,6 +24,18 @@ class Settings(BaseSettings):
|
|
| 25 |
MAX_FAILURES: int = Field(default=1)
|
| 26 |
SYSTEM_PROMPT_FILE_NAME: str = Field(default="system_msg_fn")
|
| 27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
@lru_cache()
|
| 29 |
def get_settings() -> Settings:
|
| 30 |
try:
|
|
|
|
| 2 |
from functools import lru_cache
|
| 3 |
from typing import Union, Optional
|
| 4 |
from pydantic_settings import BaseSettings
|
| 5 |
+
from pydantic import SecretStr, PostgresDsn, DirectoryPath, Field, AnyUrl, validator
|
| 6 |
|
| 7 |
logger = logging.getLogger(__name__)
|
| 8 |
|
| 9 |
class Settings(BaseSettings):
|
| 10 |
|
|
|
|
| 11 |
MAX_THREAD_NAME_LENGTH: int = Field(default=100)
|
| 12 |
|
| 13 |
OPENAI_API_KEY: SecretStr
|
|
|
|
| 24 |
MAX_FAILURES: int = Field(default=1)
|
| 25 |
SYSTEM_PROMPT_FILE_NAME: str = Field(default="system_msg_fn")
|
| 26 |
|
| 27 |
+
# A/B Testing database connection configuration
|
| 28 |
+
AB_TESTING_DB_NAME: str
|
| 29 |
+
AB_TESTING_DB_USER: str
|
| 30 |
+
AB_TESTING_DB_PASSWORD: SecretStr
|
| 31 |
+
AB_TESTING_DB_HOST: AnyUrl
|
| 32 |
+
AB_TESTING_DB_PORT: int
|
| 33 |
+
|
| 34 |
+
# A/B Testing environment variables
|
| 35 |
+
AB_TESTING_EXPERIMENT_ID: int
|
| 36 |
+
AB_TESTING_MODEL_1_ID: int
|
| 37 |
+
AB_TESTING_MODEL_2_ID: int
|
| 38 |
+
|
| 39 |
@lru_cache()
|
| 40 |
def get_settings() -> Settings:
|
| 41 |
try:
|