praisonai 1.0.9 → 1.0.10
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/dist/agent/proxy.d.ts +1 -1
- package/dist/agent/proxy.js +12 -11
- package/package.json +1 -1
package/dist/agent/proxy.d.ts
CHANGED
package/dist/agent/proxy.js
CHANGED
|
@@ -67,22 +67,23 @@ class PraisonAIAgents {
|
|
|
67
67
|
this.taskImpl = null;
|
|
68
68
|
// Auto-detect mode based on tasks type
|
|
69
69
|
if (Array.isArray(config.tasks) && config.tasks.length > 0) {
|
|
70
|
-
|
|
71
|
-
if (
|
|
72
|
-
this.
|
|
70
|
+
// If tasks are strings, use simple mode
|
|
71
|
+
if (typeof config.tasks[0] === 'string') {
|
|
72
|
+
this.simpleImpl = new simple_1.PraisonAIAgents({
|
|
73
73
|
agents: config.agents,
|
|
74
74
|
tasks: config.tasks,
|
|
75
75
|
verbose: config.verbose,
|
|
76
|
-
process: config.process
|
|
77
|
-
manager_llm: config.manager_llm
|
|
76
|
+
process: config.process
|
|
78
77
|
});
|
|
79
78
|
}
|
|
80
79
|
else {
|
|
81
|
-
|
|
80
|
+
// Otherwise, use task mode
|
|
81
|
+
this.taskImpl = new types_1.PraisonAIAgents({
|
|
82
82
|
agents: config.agents,
|
|
83
83
|
tasks: config.tasks,
|
|
84
84
|
verbose: config.verbose,
|
|
85
|
-
process: config.process
|
|
85
|
+
process: config.process,
|
|
86
|
+
manager_llm: config.manager_llm
|
|
86
87
|
});
|
|
87
88
|
}
|
|
88
89
|
}
|
|
@@ -91,12 +92,12 @@ class PraisonAIAgents {
|
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
async start() {
|
|
94
|
-
if (this.
|
|
95
|
-
return this.taskImpl.start();
|
|
96
|
-
}
|
|
97
|
-
else if (this.simpleImpl) {
|
|
95
|
+
if (this.simpleImpl) {
|
|
98
96
|
return this.simpleImpl.start();
|
|
99
97
|
}
|
|
98
|
+
else if (this.taskImpl) {
|
|
99
|
+
return this.taskImpl.start();
|
|
100
|
+
}
|
|
100
101
|
throw new Error('No implementation available');
|
|
101
102
|
}
|
|
102
103
|
async chat() {
|