Skip to content

Commit

Permalink
feat: add env variable CONTINUE_STEP
Browse files Browse the repository at this point in the history
  • Loading branch information
adolphnov committed Dec 20, 2024
1 parent 8c918ec commit 398cd8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/agent/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,6 @@ export class ExtraUserConfig {
COVER_MESSAGE_ROLE: Record<string, string> = {};
// 最大历史记录长度 默认12 超过时会自动裁剪
MAX_HISTORY_LENGTH = 12;
// 是否生成长文本(受MAX_STEPS限制)
CONTINUE_STEP = false;
}

0 comments on commit 398cd8e

Please sign in to comment.