from pathlib import Path from typing import Dict from pydantic import BaseModel current_path = Path(__file__).parent prompt_path = current_path / "prompts" business_path = current_path.parent.parent / "examples" class EnvironmentConfig(BaseModel): """环境配置""" base_url: str = "http://127.0.0.1:8000" # API 基础 URL api_token: str | Dict[str, str] = "test" # 测试用户名 auth_type: str = "bearer" # 认证类型 generation_id: str = "" # 任务生成ID,由 TaskOrchestrator 提供 class AgentConfig(BaseModel): """代理配置""" agent_type: str = "llm" # 智能体类型:epsilon_greedy 或 llm epsilon: float = 0.1 # ε-贪婪策略中的探索概率 learning_rate: float = 0.1 # 学习率 discount_factor: float = 0.9 # 折扣因子 # LLM 相关配置 llm_model: str = "gpt-4o-2024-08-06" # LLM 模型名称 llm_temperature: float = 0.0 # LLM 采样温度 llm_max_tokens: int = 100 # LLM 最大输出 token 数