mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-12 10:04:45 +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:
@@ -18,6 +18,7 @@ export async function* chatStream(
|
||||
auto_accepted_plan: boolean;
|
||||
max_plan_iterations: number;
|
||||
max_step_num: number;
|
||||
max_search_results?: number;
|
||||
interrupt_feedback?: string;
|
||||
enable_background_investigation: boolean;
|
||||
mcp_settings?: {
|
||||
@@ -61,12 +62,14 @@ async function* chatReplayStream(
|
||||
auto_accepted_plan: boolean;
|
||||
max_plan_iterations: number;
|
||||
max_step_num: number;
|
||||
max_search_results?: number;
|
||||
interrupt_feedback?: string;
|
||||
} = {
|
||||
thread_id: "__mock__",
|
||||
auto_accepted_plan: false,
|
||||
max_plan_iterations: 3,
|
||||
max_step_num: 1,
|
||||
max_search_results: 3,
|
||||
interrupt_feedback: undefined,
|
||||
},
|
||||
options: { abortSignal?: AbortSignal } = {},
|
||||
@@ -157,6 +160,7 @@ export async function fetchReplayTitle() {
|
||||
auto_accepted_plan: false,
|
||||
max_plan_iterations: 3,
|
||||
max_step_num: 1,
|
||||
max_search_results: 3,
|
||||
},
|
||||
{},
|
||||
);
|
||||
|
||||
@@ -13,6 +13,7 @@ const DEFAULT_SETTINGS: SettingsState = {
|
||||
enableBackgroundInvestigation: false,
|
||||
maxPlanIterations: 1,
|
||||
maxStepNum: 3,
|
||||
maxSearchResults: 3,
|
||||
},
|
||||
mcp: {
|
||||
servers: [],
|
||||
@@ -25,6 +26,7 @@ export type SettingsState = {
|
||||
enableBackgroundInvestigation: boolean;
|
||||
maxPlanIterations: number;
|
||||
maxStepNum: number;
|
||||
maxSearchResults: number;
|
||||
};
|
||||
mcp: {
|
||||
servers: MCPServerMetadata[];
|
||||
|
||||
@@ -104,6 +104,7 @@ export async function sendMessage(
|
||||
settings.enableBackgroundInvestigation ?? true,
|
||||
max_plan_iterations: settings.maxPlanIterations,
|
||||
max_step_num: settings.maxStepNum,
|
||||
max_search_results: settings.maxSearchResults,
|
||||
mcp_settings: settings.mcpSettings,
|
||||
},
|
||||
options,
|
||||
|
||||
Reference in New Issue
Block a user