@aigne/example-workflow-sequential 1.1.0-beta.11 → 1.1.0-beta.13
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/README.md +30 -2
- package/index.ts +9 -0
- package/package.json +2 -2
- package/usages.ts +9 -0
package/README.md
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
# Workflow
|
|
1
|
+
# Workflow Sequential Demo
|
|
2
2
|
|
|
3
3
|
This is a demonstration of using [AIGNE Framework](https://github.com/AIGNE-io/aigne-framework) to build a sequential workflow.
|
|
4
4
|
|
|
5
|
+
```mermaid
|
|
6
|
+
flowchart LR
|
|
7
|
+
in(In)
|
|
8
|
+
out(Out)
|
|
9
|
+
conceptExtractor(Concept Extractor)
|
|
10
|
+
writer(Writer)
|
|
11
|
+
formatProof(Format Proof)
|
|
12
|
+
|
|
13
|
+
in --> conceptExtractor --> writer --> formatProof --> out
|
|
14
|
+
|
|
15
|
+
classDef inputOutput fill:#f9f0ed,stroke:#debbae,stroke-width:2px,color:#b35b39,font-weight:bolder;
|
|
16
|
+
classDef processing fill:#F0F4EB,stroke:#C2D7A7,stroke-width:2px,color:#6B8F3C,font-weight:bolder;
|
|
17
|
+
|
|
18
|
+
class in inputOutput
|
|
19
|
+
class out inputOutput
|
|
20
|
+
class conceptExtractor processing
|
|
21
|
+
class writer processing
|
|
22
|
+
class formatProof processing
|
|
23
|
+
```
|
|
24
|
+
|
|
5
25
|
## Prerequisites
|
|
6
26
|
|
|
7
27
|
- [Node.js](https://nodejs.org) and npm installed on your machine
|
|
@@ -79,6 +99,9 @@ You are a marketing copywriter. Given a block of text describing features, audie
|
|
|
79
99
|
compose a compelling marketing copy (like a newsletter section) that highlights these points.
|
|
80
100
|
Output should be short (around 150 words), output just the copy as a single text block.
|
|
81
101
|
|
|
102
|
+
Product description:
|
|
103
|
+
{{product}}
|
|
104
|
+
|
|
82
105
|
Below is the info about the product:
|
|
83
106
|
{{concept}}`,
|
|
84
107
|
outputKey: "draft",
|
|
@@ -89,6 +112,12 @@ const formatProof = AIAgent.from({
|
|
|
89
112
|
You are an editor. Given the draft copy, correct grammar, improve clarity, ensure consistent tone,
|
|
90
113
|
give format and make it polished. Output the final improved copy as a single text block.
|
|
91
114
|
|
|
115
|
+
Product description:
|
|
116
|
+
{{product}}
|
|
117
|
+
|
|
118
|
+
Below is the info about the product:
|
|
119
|
+
{{concept}}
|
|
120
|
+
|
|
92
121
|
Draft copy:
|
|
93
122
|
{{draft}}`,
|
|
94
123
|
outputKey: "content",
|
|
@@ -111,7 +140,6 @@ console.log(result);
|
|
|
111
140
|
// draft: "Unlock the power of creation with AIGNE, the revolutionary No-code Generative AI Apps Engine! Whether you're a small business looking to streamline operations, an entrepreneur ...",
|
|
112
141
|
// content: "Unlock the power of creation with AIGNE, the revolutionary No-Code Generative AI Apps Engine! Whether you are a small business aiming to streamline operations, an entrepreneur ...",
|
|
113
142
|
// }
|
|
114
|
-
|
|
115
143
|
```
|
|
116
144
|
|
|
117
145
|
## License
|
package/index.ts
CHANGED
|
@@ -28,6 +28,9 @@ You are a marketing copywriter. Given a block of text describing features, audie
|
|
|
28
28
|
compose a compelling marketing copy (like a newsletter section) that highlights these points.
|
|
29
29
|
Output should be short (around 150 words), output just the copy as a single text block.
|
|
30
30
|
|
|
31
|
+
Product description:
|
|
32
|
+
{{product}}
|
|
33
|
+
|
|
31
34
|
Below is the info about the product:
|
|
32
35
|
{{concept}}`,
|
|
33
36
|
outputKey: "draft",
|
|
@@ -38,6 +41,12 @@ const formatProof = AIAgent.from({
|
|
|
38
41
|
You are an editor. Given the draft copy, correct grammar, improve clarity, ensure consistent tone,
|
|
39
42
|
give format and make it polished. Output the final improved copy as a single text block.
|
|
40
43
|
|
|
44
|
+
Product description:
|
|
45
|
+
{{product}}
|
|
46
|
+
|
|
47
|
+
Below is the info about the product:
|
|
48
|
+
{{concept}}
|
|
49
|
+
|
|
41
50
|
Draft copy:
|
|
42
51
|
{{draft}}`,
|
|
43
52
|
outputKey: "content",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-workflow-sequential",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.13",
|
|
4
4
|
"description": "A demonstration of using AIGNE Framework to build a sequential 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-sequential",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"zod": "^3.24.2",
|
|
20
|
-
"@aigne/core-next": "^1.1.0-beta.
|
|
20
|
+
"@aigne/core-next": "^1.1.0-beta.13"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"start": "npx -y bun run index.ts"
|
package/usages.ts
CHANGED
|
@@ -26,6 +26,9 @@ You are a marketing copywriter. Given a block of text describing features, audie
|
|
|
26
26
|
compose a compelling marketing copy (like a newsletter section) that highlights these points.
|
|
27
27
|
Output should be short (around 150 words), output just the copy as a single text block.
|
|
28
28
|
|
|
29
|
+
Product description:
|
|
30
|
+
{{product}}
|
|
31
|
+
|
|
29
32
|
Below is the info about the product:
|
|
30
33
|
{{concept}}`,
|
|
31
34
|
outputKey: "draft",
|
|
@@ -36,6 +39,12 @@ const formatProof = AIAgent.from({
|
|
|
36
39
|
You are an editor. Given the draft copy, correct grammar, improve clarity, ensure consistent tone,
|
|
37
40
|
give format and make it polished. Output the final improved copy as a single text block.
|
|
38
41
|
|
|
42
|
+
Product description:
|
|
43
|
+
{{product}}
|
|
44
|
+
|
|
45
|
+
Below is the info about the product:
|
|
46
|
+
{{concept}}
|
|
47
|
+
|
|
39
48
|
Draft copy:
|
|
40
49
|
{{draft}}`,
|
|
41
50
|
outputKey: "content",
|