foliko 2.0.25 → 2.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/core/ai/index.js +1 -1
- package/src/agent/chat.js +3 -3
- package/src/agent/sub.js +1 -1
- package/src/agent/tool-loop.js +1 -1
package/package.json
CHANGED
package/plugins/core/ai/index.js
CHANGED
|
@@ -22,7 +22,7 @@ class AIPlugin extends Plugin {
|
|
|
22
22
|
model: config.model || 'deepseek-chat',
|
|
23
23
|
apiKey: config.apiKey,
|
|
24
24
|
baseURL: config.baseURL,
|
|
25
|
-
maxSteps: config.maxSteps ||
|
|
25
|
+
maxSteps: config.maxSteps || 1000,
|
|
26
26
|
maxOutputTokens: config.maxOutputTokens || parseInt(process.env.MAX_OUTPUT_TOKENS) || 8192,
|
|
27
27
|
}
|
|
28
28
|
|
package/src/agent/chat.js
CHANGED
|
@@ -74,7 +74,7 @@ class AgentChatHandler extends EventEmitter {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
this._systemPrompt = config.systemPrompt || 'You are a helpful assistant.';
|
|
77
|
-
this._maxSteps = config.maxSteps ||
|
|
77
|
+
this._maxSteps = config.maxSteps || 1000;
|
|
78
78
|
|
|
79
79
|
// 委托给新模块
|
|
80
80
|
// ChatSession: 会话、消息、队列
|
|
@@ -737,7 +737,7 @@ class AgentChatHandler extends EventEmitter {
|
|
|
737
737
|
const tools = this._getToolMap();
|
|
738
738
|
const toolLoop = new ToolLoop({
|
|
739
739
|
tools,
|
|
740
|
-
maxSteps: this._maxSteps ||
|
|
740
|
+
maxSteps: this._maxSteps || 1000,
|
|
741
741
|
prepareStep: this._createPrepareStep(),
|
|
742
742
|
repairToolCall: this._repairToolCall.bind(this),
|
|
743
743
|
abortSignal: framework.getAbortSignal?.(),
|
|
@@ -912,7 +912,7 @@ class AgentChatHandler extends EventEmitter {
|
|
|
912
912
|
|
|
913
913
|
const toolLoop = new ToolLoop({
|
|
914
914
|
tools,
|
|
915
|
-
maxSteps: this._maxSteps ||
|
|
915
|
+
maxSteps: this._maxSteps || 1000,
|
|
916
916
|
prepareStep: this._createPrepareStep(),
|
|
917
917
|
repairToolCall: this._repairToolCall.bind(this),
|
|
918
918
|
abortSignal: framework.getAbortSignal?.(),
|
package/src/agent/sub.js
CHANGED
|
@@ -131,7 +131,7 @@ class SubAgent extends BaseAgent {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
async chat(taskOrMessages, options = {}) {
|
|
134
|
-
const maxSteps = options?.maxSteps ||
|
|
134
|
+
const maxSteps = options?.maxSteps || 1000;
|
|
135
135
|
const maxRetries = options?.maxRetries ?? this.maxRetries;
|
|
136
136
|
const retryDelay = options?.retryDelay ?? this.retryDelay;
|
|
137
137
|
const client = this._getOpenAIClient();
|
package/src/agent/tool-loop.js
CHANGED
|
@@ -19,7 +19,7 @@ class ToolLoop extends EventEmitter {
|
|
|
19
19
|
constructor(config = {}) {
|
|
20
20
|
super();
|
|
21
21
|
this.tools = config.tools || {}; // { name => { execute, description } }
|
|
22
|
-
this.maxSteps = config.maxSteps ||
|
|
22
|
+
this.maxSteps = config.maxSteps || 1000;
|
|
23
23
|
this.prepareStep = config.prepareStep || (async () => {});
|
|
24
24
|
this.abortSignal = config.abortSignal || null;
|
|
25
25
|
this._repairFn = config.repairToolCall || null;
|