@aigne/example-workflow-group-chat 1.10.1 → 1.11.1
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/index.ts +5 -4
- package/package.json +6 -5
package/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import assert from "node:assert";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
|
+
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
5
6
|
import {
|
|
6
7
|
AIAgent,
|
|
7
8
|
AIAgentToolChoice,
|
|
@@ -34,7 +35,7 @@ const writer = AIAgent.from({
|
|
|
34
35
|
name: "writer",
|
|
35
36
|
description: "Writer for creating any text content",
|
|
36
37
|
publishTopic: DEFAULT_TOPIC,
|
|
37
|
-
memory: { subscribeTopic: DEFAULT_TOPIC },
|
|
38
|
+
memory: new DefaultMemory({ subscribeTopic: DEFAULT_TOPIC }),
|
|
38
39
|
instructions: "You are a Writer. You produce good work.",
|
|
39
40
|
});
|
|
40
41
|
|
|
@@ -42,7 +43,7 @@ const editor = AIAgent.from({
|
|
|
42
43
|
name: "editor",
|
|
43
44
|
description: "Editor for planning and reviewing the content",
|
|
44
45
|
publishTopic: DEFAULT_TOPIC,
|
|
45
|
-
memory: { subscribeTopic: DEFAULT_TOPIC },
|
|
46
|
+
memory: new DefaultMemory({ subscribeTopic: DEFAULT_TOPIC }),
|
|
46
47
|
instructions: `\
|
|
47
48
|
You are an Editor. Plan and guide the task given by the user.
|
|
48
49
|
Provide critical feedbacks to the draft and illustration produced by Writer and Illustrator.
|
|
@@ -67,7 +68,7 @@ const illustrator = AIAgent.from({
|
|
|
67
68
|
name: "illustrator",
|
|
68
69
|
description: "An illustrator for creating images",
|
|
69
70
|
publishTopic: DEFAULT_TOPIC,
|
|
70
|
-
memory: { subscribeTopic: DEFAULT_TOPIC },
|
|
71
|
+
memory: new DefaultMemory({ subscribeTopic: DEFAULT_TOPIC }),
|
|
71
72
|
instructions: `\
|
|
72
73
|
You are an Illustrator. You use the generate_image tool to create images given user's requirement.
|
|
73
74
|
Make sure the images have consistent characters and style.`,
|
|
@@ -114,7 +115,7 @@ const manager = AIAgent.from({
|
|
|
114
115
|
name: "manager",
|
|
115
116
|
subscribeTopic: DEFAULT_TOPIC,
|
|
116
117
|
publishTopic: (output) => output.role,
|
|
117
|
-
memory: { subscribeTopic: DEFAULT_TOPIC },
|
|
118
|
+
memory: new DefaultMemory({ subscribeTopic: DEFAULT_TOPIC }),
|
|
118
119
|
instructions: PromptTemplate.from(`\
|
|
119
120
|
You are participating in a role-playing game. The available roles are:
|
|
120
121
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-workflow-group-chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "A demonstration of using AIGNE Framework to build a group chat workflow",
|
|
5
5
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
6
6
|
"homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/workflow-group-chat",
|
|
@@ -17,13 +17,14 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"zod": "^3.24.4",
|
|
20
|
-
"@aigne/
|
|
21
|
-
"@aigne/
|
|
22
|
-
"@aigne/openai": "^0.2.
|
|
20
|
+
"@aigne/agent-library": "^1.12.1",
|
|
21
|
+
"@aigne/cli": "^1.11.1",
|
|
22
|
+
"@aigne/openai": "^0.2.2",
|
|
23
|
+
"@aigne/core": "^1.18.1"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@types/bun": "^1.2.9",
|
|
26
|
-
"@aigne/test-utils": "^0.3.
|
|
27
|
+
"@aigne/test-utils": "^0.3.3"
|
|
27
28
|
},
|
|
28
29
|
"scripts": {
|
|
29
30
|
"start": "bun run index.ts",
|