feat 接入report

This commit is contained in:
zcr
2026-03-04 09:57:38 +08:00
parent 129510363a
commit 62b4505261
3 changed files with 6 additions and 5 deletions

View File

@@ -31,6 +31,8 @@ async def chat_stream(request: ChatRequest):
* `checkpoint_id`: (可选) 历史快照 ID。
* `config_params`: (可选) 对话配置参数
* `require_suggestion`: (可选) 是否需要建议按钮
* `use_report`: (可选) 是否需要使用report功能 true/false
#### 3. 响应流说明 (Data Format)
响应以 `data: ` 开头的 JSON 字符串流形式发送:

View File

@@ -3,7 +3,7 @@ import asyncio
from typing import List
from urllib.parse import urlparse
from pathlib import Path
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode
from langchain_core.tools import tool
# ─────────────── 重要:計算路徑 ───────────────
@@ -40,9 +40,6 @@ async def crawl4ai_batch(urls: List[str]) -> str:
# print(f"🕷️ 正在并行爬取 {len(urls)} 个 URL...")
# print(f"儲存目錄: {SAVE_DIR}")
# Crawl4AI 配置(保持原樣)
from crawl4ai import AsyncWebCrawler, BrowserConfig, CrawlerRunConfig, CacheMode
browser_config = BrowserConfig(
headless=True,
verbose=False,