mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-10 01:04:46 +08:00
feat: config max_search_results for search engine (#192)
* feat: implement UI * feat: config max_search_results for search engine via api --------- Co-authored-by: Henry Li <henry1943@163.com>
This commit is contained in:
@@ -61,6 +61,7 @@ async def chat_stream(request: ChatRequest):
|
||||
thread_id,
|
||||
request.max_plan_iterations,
|
||||
request.max_step_num,
|
||||
request.max_search_results,
|
||||
request.auto_accepted_plan,
|
||||
request.interrupt_feedback,
|
||||
request.mcp_settings,
|
||||
@@ -75,6 +76,7 @@ async def _astream_workflow_generator(
|
||||
thread_id: str,
|
||||
max_plan_iterations: int,
|
||||
max_step_num: int,
|
||||
max_search_results: int,
|
||||
auto_accepted_plan: bool,
|
||||
interrupt_feedback: str,
|
||||
mcp_settings: dict,
|
||||
@@ -101,6 +103,7 @@ async def _astream_workflow_generator(
|
||||
"thread_id": thread_id,
|
||||
"max_plan_iterations": max_plan_iterations,
|
||||
"max_step_num": max_step_num,
|
||||
"max_search_results": max_search_results,
|
||||
"mcp_settings": mcp_settings,
|
||||
},
|
||||
stream_mode=["messages", "updates"],
|
||||
|
||||
@@ -38,6 +38,9 @@ class ChatRequest(BaseModel):
|
||||
max_step_num: Optional[int] = Field(
|
||||
3, description="The maximum number of steps in a plan"
|
||||
)
|
||||
max_search_results: Optional[int] = Field(
|
||||
3, description="The maximum number of search results"
|
||||
)
|
||||
auto_accepted_plan: Optional[bool] = Field(
|
||||
False, description="Whether to automatically accept the plan"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user