praisonai 1.0.14 → 1.0.16

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.
@@ -93,7 +93,10 @@ class PraisonAIAgents {
93
93
  const task = this.tasks[i];
94
94
  await logger_1.Logger.debug(`Running agent ${i + 1}: ${agent.name}`);
95
95
  await logger_1.Logger.debug(`Task: ${task}`);
96
- const result = await agent.start(task, previousResult);
96
+ // For first agent, use task directly
97
+ // For subsequent agents, append previous result to their instructions
98
+ const prompt = i === 0 ? task : `${task}\n\nHere is the input: ${previousResult}`;
99
+ const result = await agent.start(prompt, previousResult);
97
100
  results.push(result);
98
101
  previousResult = result;
99
102
  }
@@ -20,7 +20,7 @@ async function getOpenAIClient() {
20
20
  openAIInstance = new openai_1.default({
21
21
  apiKey: process.env.OPENAI_API_KEY
22
22
  });
23
- await logger_1.Logger.success('OpenAI client initialized');
23
+ await logger_1.Logger.debug('OpenAI client initialized');
24
24
  }
25
25
  return openAIInstance;
26
26
  }
@@ -113,7 +113,7 @@ class OpenAIService {
113
113
  fullResponse += token;
114
114
  onToken(token);
115
115
  }
116
- await logger_1.Logger.success('Stream completed successfully');
116
+ await logger_1.Logger.debug('Stream completed successfully');
117
117
  }
118
118
  catch (error) {
119
119
  await logger_1.Logger.error('Error in text stream', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "praisonai",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
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",
@@ -51,7 +51,7 @@
51
51
  "eslint": "^9.19.0",
52
52
  "jest": "^29.7.0",
53
53
  "rimraf": "^5.0.5",
54
- "ts-jest": "^29.1.2",
54
+ "ts-jest": "^29.2.5",
55
55
  "ts-node": "^10.9.2",
56
56
  "ts-node-dev": "^2.0.0",
57
57
  "typescript": "^5.7.3"
@@ -60,7 +60,7 @@
60
60
  "axios": "^1.7.9",
61
61
  "dotenv": "^16.4.7",
62
62
  "fast-xml-parser": "^4.5.1",
63
- "node-fetch": "^3.3.2",
63
+ "node-fetch": "^2.6.9",
64
64
  "openai": "^4.81.0",
65
65
  "praisonai": "^1.0.12"
66
66
  },
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "overrides": {
75
75
  "whatwg-url": "^14.1.0",
76
- "node-fetch": "^3.3.2"
76
+ "node-fetch": "^2.6.9"
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=14.0.0"