praisonai 1.0.10 → 1.0.11

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.
@@ -9,6 +9,7 @@ export declare class Agent {
9
9
  private taskAgent;
10
10
  constructor(config: ProxyAgentConfig);
11
11
  execute(input: Task | string): Promise<any>;
12
+ start(prompt: string, previousResult?: string): Promise<string>;
12
13
  chat(prompt: string, previousResult?: string): Promise<string>;
13
14
  }
14
15
  export declare class PraisonAIAgents {
@@ -43,6 +43,22 @@ class Agent {
43
43
  }
44
44
  throw new Error('No agent implementation available');
45
45
  }
46
+ async start(prompt, previousResult) {
47
+ if (this.simpleAgent) {
48
+ return this.simpleAgent.start(prompt, previousResult);
49
+ }
50
+ else if (this.taskAgent) {
51
+ // For task agents, we'll use execute but wrap the prompt in a simple task
52
+ const task = new types_2.Task({
53
+ name: 'Start Task',
54
+ description: prompt,
55
+ expected_output: 'A response to the prompt',
56
+ dependencies: []
57
+ });
58
+ return this.taskAgent.execute(task, [previousResult]);
59
+ }
60
+ throw new Error('No agent implementation available');
61
+ }
46
62
  async chat(prompt, previousResult) {
47
63
  if (this.simpleAgent) {
48
64
  return this.simpleAgent.chat(prompt, previousResult);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "praisonai",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "PraisonAI TypeScript AI Agents Framework - Node.js, npm, and Javascript AI Agents Framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -60,7 +60,7 @@
60
60
  "dotenv": "^16.4.1",
61
61
  "fast-xml-parser": "^4.3.4",
62
62
  "openai": "^4.24.7",
63
- "praisonai": "^1.0.8"
63
+ "praisonai": "^1.0.10"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">=14.0.0"