@aigne/example-workflow-group-chat 1.8.1 → 1.9.0
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 +3 -3
- package/package.json +6 -6
- /package/{LICENSE → LICENSE.md} +0 -0
package/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import assert from "node:assert";
|
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import {
|
|
6
6
|
AIAgent,
|
|
7
|
+
AIAgentToolChoice,
|
|
7
8
|
AIGNE,
|
|
8
9
|
FunctionAgent,
|
|
9
10
|
PromptTemplate,
|
|
@@ -57,7 +58,7 @@ const generateImage = FunctionAgent.from({
|
|
|
57
58
|
worn_and_carried: z.string(),
|
|
58
59
|
scenario: z.string(),
|
|
59
60
|
}),
|
|
60
|
-
|
|
61
|
+
process: (input) => {
|
|
61
62
|
return { ...input, url: `https://example.com/${randomUUID()}.jpg` };
|
|
62
63
|
},
|
|
63
64
|
});
|
|
@@ -71,7 +72,7 @@ const illustrator = AIAgent.from({
|
|
|
71
72
|
You are an Illustrator. You use the generate_image tool to create images given user's requirement.
|
|
72
73
|
Make sure the images have consistent characters and style.`,
|
|
73
74
|
skills: [generateImage],
|
|
74
|
-
toolChoice:
|
|
75
|
+
toolChoice: AIAgentToolChoice.auto,
|
|
75
76
|
outputSchema: z.object({
|
|
76
77
|
images: z
|
|
77
78
|
.array(
|
|
@@ -90,7 +91,6 @@ const user = UserAgent.from({
|
|
|
90
91
|
name: "user",
|
|
91
92
|
description: "User for providing final approval",
|
|
92
93
|
publishTopic: DEFAULT_TOPIC,
|
|
93
|
-
memory: { subscribeTopic: DEFAULT_TOPIC },
|
|
94
94
|
async process() {
|
|
95
95
|
const { question } = await inquirer.prompt([
|
|
96
96
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-workflow-group-chat",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
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",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"README.md"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"openai": "^4.
|
|
20
|
-
"zod": "^3.24.
|
|
21
|
-
"@aigne/
|
|
22
|
-
"@aigne/
|
|
19
|
+
"openai": "^4.97.0",
|
|
20
|
+
"zod": "^3.24.4",
|
|
21
|
+
"@aigne/cli": "^1.9.0",
|
|
22
|
+
"@aigne/core": "^1.14.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@aigne/test-utils": "^0.
|
|
25
|
+
"@aigne/test-utils": "^0.2.0"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"start": "bun run index.ts",
|
/package/{LICENSE → LICENSE.md}
RENAMED
|
File without changes
|