2024-06-21 16:41:34 +08:00
|
|
|
from pathlib import Path
|
2024-07-10 15:45:43 +08:00
|
|
|
from typing import Union
|
2024-06-28 11:45:23 +08:00
|
|
|
|
2024-06-21 16:41:34 +08:00
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
2024-06-28 11:45:23 +08:00
|
|
|
|
2024-06-21 16:41:34 +08:00
|
|
|
class ModelImplSettings(BaseSettings):
|
|
|
|
|
class Config:
|
2024-06-28 11:45:23 +08:00
|
|
|
env_prefix = "MODEL_IMPL_" # Use MODEL_IMPL_ as prefix for environment variables
|
|
|
|
|
|
2024-07-10 15:45:43 +08:00
|
|
|
file_based_execution_workspace: str = str(
|
|
|
|
|
(Path().cwd() / "git_ignore_folder" / "model_implementation_workspace").absolute(),
|
|
|
|
|
)
|
|
|
|
|
implementation_execution_cache_location: str = str(
|
|
|
|
|
(Path().cwd() / "git_ignore_folder" / "model_implementation_execution_cache").absolute(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
knowledge_base_path: Union[str, None] = None
|
|
|
|
|
new_knowledge_base_path: Union[str, None] = None
|
|
|
|
|
|
|
|
|
|
max_loop: int = 10
|
|
|
|
|
|
|
|
|
|
query_former_trace_limit: int = 5
|
|
|
|
|
query_similar_success_limit: int = 5
|
|
|
|
|
fail_task_trial_limit: int = 20
|
|
|
|
|
|
|
|
|
|
evo_multi_proc_n: int = 1
|
|
|
|
|
|
|
|
|
|
enable_execution_cache: bool = True # whether to enable the execution cache
|
|
|
|
|
|
2024-06-21 16:41:34 +08:00
|
|
|
|
|
|
|
|
MODEL_IMPL_SETTINGS = ModelImplSettings()
|