@aigne/example-workflow-orchestrator 1.5.0 → 1.7.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.
Files changed (3) hide show
  1. package/README.md +8 -6
  2. package/index.ts +3 -12
  3. package/package.json +6 -6
package/README.md CHANGED
@@ -40,15 +40,17 @@ class style_enforcer processing
40
40
  ## Prerequisites
41
41
 
42
42
  - [Node.js](https://nodejs.org) and npm installed on your machine
43
- - [OpenAI API key](https://platform.openai.com/api-keys) used to interact with OpenAI API
44
- - [Pnpm](https://pnpm.io) [Optional] if you want to run the example from source code
43
+ - An [OpenAI API key](https://platform.openai.com/api-keys) for interacting with OpenAI's services
44
+ - Optional dependencies (if running the example from source code):
45
+ - [Bun](https://bun.sh) for running unit tests & examples
46
+ - [Pnpm](https://pnpm.io) for package management
45
47
 
46
- ## Try without Installation
48
+ ## Quick Start (No Installation Required)
47
49
 
48
50
  ```bash
49
- export OPENAI_API_KEY=YOUR_OPENAI_API_KEY # setup your OpenAI API key
51
+ export OPENAI_API_KEY=YOUR_OPENAI_API_KEY # Set your OpenAI API key
50
52
 
51
- npx -y @aigne/example-workflow-orchestrator # run the example
53
+ npx -y @aigne/example-workflow-orchestrator # Run the example
52
54
  ```
53
55
 
54
56
  ## Installation
@@ -72,7 +74,7 @@ pnpm install
72
74
  Setup your OpenAI API key in the `.env.local` file:
73
75
 
74
76
  ```bash
75
- OPENAI_API_KEY="" # setup your OpenAI API key here
77
+ OPENAI_API_KEY="" # Set your OpenAI API key here
76
78
  ```
77
79
 
78
80
  When running Puppeteer inside a Docker container, set the following environment variable:
package/index.ts CHANGED
@@ -1,20 +1,11 @@
1
- #!/usr/bin/env npx -y bun
1
+ #!/usr/bin/env bunwrapper
2
2
 
3
- import assert from "node:assert";
4
3
  import { OrchestratorAgent } from "@aigne/agent-library/orchestrator/index.js";
5
4
  import { runChatLoopInTerminal } from "@aigne/cli/utils/run-chat-loop.js";
6
5
  import { AIAgent, ExecutionEngine, MCPAgent } from "@aigne/core";
7
- import { OpenAIChatModel } from "@aigne/core/models/openai-chat-model.js";
6
+ import { loadModel } from "@aigne/core/loader/index.js";
8
7
 
9
- const { OPENAI_API_KEY } = process.env;
10
- assert(OPENAI_API_KEY, "Please set the OPENAI_API_KEY environment variable");
11
-
12
- const model = new OpenAIChatModel({
13
- apiKey: OPENAI_API_KEY,
14
- modelOptions: {
15
- parallelToolCalls: false, // puppeteer can only run one task at a time
16
- },
17
- });
8
+ const model = await loadModel(null, { parallelToolCalls: false });
18
9
 
19
10
  const puppeteer = await MCPAgent.from({
20
11
  command: "npx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/example-workflow-orchestrator",
3
- "version": "1.5.0",
3
+ "version": "1.7.1",
4
4
  "description": "A demonstration of using AIGNE Framework to build a orchestrator 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-orchestrator",
@@ -16,14 +16,14 @@
16
16
  "README.md"
17
17
  ],
18
18
  "dependencies": {
19
- "openai": "^4.93.0",
19
+ "openai": "^4.94.0",
20
20
  "zod": "^3.24.2",
21
- "@aigne/agent-library": "^1.5.0",
22
- "@aigne/cli": "^1.2.0",
23
- "@aigne/core": "^1.7.0"
21
+ "@aigne/agent-library": "^1.6.0",
22
+ "@aigne/cli": "^1.5.1",
23
+ "@aigne/core": "^1.10.0"
24
24
  },
25
25
  "scripts": {
26
- "start": "npx -y bun run index.ts",
26
+ "start": "bun run index.ts",
27
27
  "lint": "tsc --noEmit"
28
28
  }
29
29
  }