mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-16 03:14:45 +08:00
feat: support to adjust writing style (#290)
* feat: implment backend for adjust report style * feat: add web part * fix test cases * fix: fix typing --------- Co-authored-by: Henry Li <henry1943@163.com>
This commit is contained in:
@@ -8,6 +8,7 @@ from typing import Any, Optional
|
||||
from langchain_core.runnables import RunnableConfig
|
||||
|
||||
from src.rag.retriever import Resource
|
||||
from src.config.report_style import ReportStyle
|
||||
|
||||
|
||||
@dataclass(kw_only=True)
|
||||
@@ -21,6 +22,7 @@ class Configuration:
|
||||
max_step_num: int = 3 # Maximum number of steps in a plan
|
||||
max_search_results: int = 3 # Maximum number of search results
|
||||
mcp_settings: dict = None # MCP settings, including dynamic loaded tools
|
||||
report_style: str = ReportStyle.ACADEMIC.value # Report style
|
||||
|
||||
@classmethod
|
||||
def from_runnable_config(
|
||||
|
||||
8
src/config/report_style.py
Normal file
8
src/config/report_style.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import enum
|
||||
|
||||
|
||||
class ReportStyle(enum.Enum):
|
||||
ACADEMIC = "academic"
|
||||
POPULAR_SCIENCE = "popular_science"
|
||||
NEWS = "news"
|
||||
SOCIAL_MEDIA = "social_media"
|
||||
Reference in New Issue
Block a user