diff --git a/src/agent/request.ts b/src/agent/request.ts index 079d5c0c..dab18d2a 100644 --- a/src/agent/request.ts +++ b/src/agent/request.ts @@ -200,6 +200,7 @@ export async function requestChatCompletionsV2(params: { model: LanguageModelV1; }), messages: params.messages, maxSteps: params.context.MAX_STEPS, + experimental_continueSteps: params.context.CONTINUE_STEP, maxRetries: params.context.MAX_RETRIES, temperature: (params.activeTools?.length || 0) > 0 ? params.context.FUNCTION_CALL_TEMPERATURE : params.context.CHAT_TEMPERATURE, tools: params.tools, diff --git a/src/config/config.ts b/src/config/config.ts index deff8853..b5fab46a 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -421,4 +421,6 @@ export class ExtraUserConfig { COVER_MESSAGE_ROLE: Record = {}; // 最大历史记录长度 默认12 超过时会自动裁剪 MAX_HISTORY_LENGTH = 12; + // 是否生成长文本(受MAX_STEPS限制) + CONTINUE_STEP = false; }