mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-10 17:24:45 +08:00
fix(main): Passing the local parameter from the main interactive mode (#791)
This commit is contained in:
@@ -34,6 +34,7 @@ async def run_agent_workflow_async(
|
||||
enable_clarification: bool | None = None,
|
||||
max_clarification_rounds: int | None = None,
|
||||
initial_state: dict | None = None,
|
||||
locale: str | None = None,
|
||||
):
|
||||
"""Run the agent workflow asynchronously with the given user input.
|
||||
|
||||
@@ -46,6 +47,7 @@ async def run_agent_workflow_async(
|
||||
enable_clarification: If None, use default from State class (False); if True/False, override
|
||||
max_clarification_rounds: Maximum number of clarification rounds allowed
|
||||
initial_state: Initial state to use (for recursive calls during clarification)
|
||||
locale: The locale setting (e.g., 'en-US', 'zh-CN')
|
||||
|
||||
Returns:
|
||||
The final state after the workflow completes
|
||||
@@ -75,6 +77,9 @@ async def run_agent_workflow_async(
|
||||
if max_clarification_rounds is not None:
|
||||
initial_state["max_clarification_rounds"] = max_clarification_rounds
|
||||
|
||||
if locale is not None:
|
||||
initial_state["locale"] = locale
|
||||
|
||||
config = {
|
||||
"configurable": {
|
||||
"thread_id": "default",
|
||||
@@ -158,6 +163,7 @@ async def run_agent_workflow_async(
|
||||
enable_clarification=enable_clarification,
|
||||
max_clarification_rounds=max_clarification_rounds,
|
||||
initial_state=current_state,
|
||||
locale=locale,
|
||||
)
|
||||
|
||||
logger.info("Async workflow completed successfully")
|
||||
|
||||
Reference in New Issue
Block a user