增加工具使用功能
This commit is contained in:
@@ -13,6 +13,9 @@ class Settings:
|
||||
model: str
|
||||
default_system_prompt: str
|
||||
data_dir: Path
|
||||
max_tool_rounds: int = 5
|
||||
max_tool_calls_per_turn: int = 10
|
||||
tool_timeout_seconds: float = 5.0
|
||||
|
||||
@classmethod
|
||||
def from_env(cls) -> "Settings":
|
||||
@@ -26,4 +29,9 @@ class Settings:
|
||||
"DEFAULT_SYSTEM_PROMPT", "You are a helpful assistant."
|
||||
),
|
||||
data_dir=Path(os.getenv("CHAT_DATA_DIR", "data")),
|
||||
max_tool_rounds=int(os.getenv("MAX_TOOL_ROUNDS", "5")),
|
||||
max_tool_calls_per_turn=int(
|
||||
os.getenv("MAX_TOOL_CALLS_PER_TURN", "10")
|
||||
),
|
||||
tool_timeout_seconds=float(os.getenv("TOOL_TIMEOUT_SECONDS", "5")),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user