From c8fe5e6d6f969b79e2ef04f55b00c9d711276e0c Mon Sep 17 00:00:00 2001 From: Zhaojie Date: Mon, 2 Feb 2026 09:28:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0README=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ce07d7d..94fff50 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,9 @@ data_analysis_agent/ │ ├── fallback_openai_client.py # 支持故障转移的OpenAI客户端 │ ├── extract_code.py # 代码提取工具 │ ├── format_execution_result.py # 执行结果格式化 -│ └── create_session_dir.py # 会话目录管理 +│ ├── create_session_dir.py # 会话目录管理 +│ ├── data_loader.py # 数据加载与画像生成 +│ └── script_generator.py # 可复用脚本生成器 ├── 📄 data_analysis_agent.py # 主智能体类 ├── 📄 prompts.py # 系统提示词模板 ├── 📄 main.py # 使用示例 @@ -266,12 +268,15 @@ stateDiagram-v2 ```python @dataclass class LLMConfig: - provider: str = "openai" + provider: str = os.environ.get("LLM_PROVIDER", "openai") api_key: str = os.environ.get("OPENAI_API_KEY", "") base_url: str = os.environ.get("OPENAI_BASE_URL", "https://api.openai.com/v1") model: str = os.environ.get("OPENAI_MODEL", "gpt-4") - max_tokens: int = 4000 - temperature: float = 0.1 + temperature: float = 0.5 + max_tokens: int = 8192 + + # 支持 gemini 等其他 provider 配置 + # ... ``` ### 执行器配置 @@ -281,7 +286,9 @@ class LLMConfig: ALLOWED_IMPORTS = { 'pandas', 'numpy', 'matplotlib', 'duckdb', 'scipy', 'sklearn', 'plotly', 'requests', - 'os', 'json', 'datetime', 're', 'pathlib' + 'os', 'json', 'datetime', 're', 'pathlib', + 'seaborn', 'statsmodels', 'networkx', 'jieba', + 'wordcloud', 'PIL', 'sqlite3', 'yaml' } ```