@lvx74/openrrouter-ai-agent 1.0.1 → 1.0.2
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/src/Agent.js +3 -3
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lvx74/openrrouter-ai-agent",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.2",
|
4
4
|
"description": "A powerful AI agent toolkit compatible with @openai/agents for building conversational AI with tool calling support using OpenRouter",
|
5
5
|
"type": "module",
|
6
6
|
"main": "src/index.js",
|
package/src/Agent.js
CHANGED
@@ -48,7 +48,7 @@ export class Agent extends EventEmitter {
|
|
48
48
|
// Configurazioni aggiuntive
|
49
49
|
this.maxIterations = options.maxIterations || 10
|
50
50
|
this.temperature = options.temperature || 0.7
|
51
|
-
this.debug = options.debug
|
51
|
+
this.debug = options.debug !== undefined ? options.debug : true
|
52
52
|
this.verbose = options.verbose !== undefined ? options.verbose : true // Default attivo per mostrare thoughts
|
53
53
|
}
|
54
54
|
|
@@ -189,14 +189,14 @@ export class Agent extends EventEmitter {
|
|
189
189
|
toolCall.done = true;
|
190
190
|
toolCall.result = result;
|
191
191
|
toolCall.execution_time = Date.now() - startTime;
|
192
|
-
|
192
|
+
|
193
193
|
const toolMessage = {
|
194
194
|
role: 'tool',
|
195
195
|
tool_call_id: toolCall.id,
|
196
196
|
tool_calls: msg.tool_calls,
|
197
197
|
name,
|
198
198
|
content: typeof result === 'string' ? result : JSON.stringify(result)
|
199
|
-
|
199
|
+
|
200
200
|
}
|
201
201
|
this.messages.push(toolMessage)
|
202
202
|
|