@loopstack/accessing-tool-results-example-workflow 0.18.0 → 0.18.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/README.md +15 -49
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -19,73 +19,39 @@ This example is useful for developers learning to build data-driven workflows th
|
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
You can add this module using the `loopstack` cli or via `npm`.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
### a) Add Sources via `loopstack add` (recommended)
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
28
|
-
cd my-project
|
|
27
|
+
loopstack add @loopstack/accessing-tool-results-example-workflow
|
|
29
28
|
```
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
This command copies the source files into your `src` directory.
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
docker compose up -d
|
|
36
|
-
```
|
|
32
|
+
- It is a great way to explore the code to learn new concepts or add own customizations
|
|
33
|
+
- It will set up the module for you, so you do not need to manually update your application
|
|
37
34
|
|
|
38
|
-
###
|
|
35
|
+
### b) Install via `npm install`
|
|
39
36
|
|
|
40
37
|
```bash
|
|
41
|
-
|
|
38
|
+
npm install --save @loopstack/accessing-tool-results-example-workflow
|
|
42
39
|
```
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
Use npm install if you want to use and maintain the module as node dependency.
|
|
45
42
|
|
|
46
|
-
|
|
43
|
+
- Use this, if you do not need to make changes to the code or want to review the source code.
|
|
47
44
|
|
|
48
45
|
## Setup
|
|
49
46
|
|
|
50
|
-
### 1.
|
|
47
|
+
### 1. Manual setup (optional)
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+
> This step is automatically done for you when using the `loopstack add` command.
|
|
53
50
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
import { LoopCoreModule } from '@loopstack/core';
|
|
57
|
-
import { CoreUiModule } from '@loopstack/core-ui-module';
|
|
58
|
-
import { AccessingToolResultsExampleModule } from './accessing-tool-results-example-workflow';
|
|
59
|
-
import { DefaultWorkspace } from './default.workspace';
|
|
60
|
-
|
|
61
|
-
@Module({
|
|
62
|
-
imports: [LoopCoreModule, CoreUiModule, AccessingToolResultsExampleModule],
|
|
63
|
-
providers: [DefaultWorkspace],
|
|
64
|
-
})
|
|
65
|
-
export class DefaultModule {}
|
|
66
|
-
```
|
|
51
|
+
- Add `AccessingToolResultsExampleModule` to the imports of `default.module.ts` or any other custom module.
|
|
52
|
+
- Inject the `WorkflowToolResultsWorkflow` workflow to your workspace class using the `@Workflow()` decorator.
|
|
67
53
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
Add the workflow to your workspace class using the `@Workflow()` decorator:
|
|
71
|
-
|
|
72
|
-
```typescript
|
|
73
|
-
import { Injectable } from '@nestjs/common';
|
|
74
|
-
import { BlockConfig, Workflow } from '@loopstack/common';
|
|
75
|
-
import { WorkspaceBase } from '@loopstack/core';
|
|
76
|
-
import { WorkflowToolResultsWorkflow } from './accessing-tool-results-example-workflow';
|
|
77
|
-
|
|
78
|
-
@Injectable()
|
|
79
|
-
@BlockConfig({
|
|
80
|
-
config: {
|
|
81
|
-
title: 'My Workspace',
|
|
82
|
-
description: 'A workspace with the tool results example workflow',
|
|
83
|
-
},
|
|
84
|
-
})
|
|
85
|
-
export class MyWorkspace extends WorkspaceBase {
|
|
86
|
-
@Workflow() workflowToolResults: WorkflowToolResultsWorkflow;
|
|
87
|
-
}
|
|
88
|
-
```
|
|
54
|
+
See here for more information about working with [Modules](https://loopstack.ai/docs/building-with-loopstack/creating-a-module) and [Workspaces](https://loopstack.ai/docs/building-with-loopstack/creating-workspaces)
|
|
89
55
|
|
|
90
56
|
## How It Works
|
|
91
57
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@loopstack/accessing-tool-results-example-workflow",
|
|
3
3
|
"displayName": "Loopstack Tool Results Example",
|
|
4
4
|
"description": "A simple workflow showing different methods of how to access tool results in a subsequent workflow step.",
|
|
5
|
-
"version": "0.18.
|
|
5
|
+
"version": "0.18.1",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Jakob Klippel",
|
|
8
8
|
"url": "https://www.linkedin.com/in/jakob-klippel/"
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@loopstack/common": "^0.18.0",
|
|
35
35
|
"@loopstack/core": "^0.18.0",
|
|
36
|
-
"@loopstack/core-ui-module": "^0.18.
|
|
37
|
-
"@loopstack/create-chat-message-tool": "^0.18.
|
|
38
|
-
"@loopstack/create-value-tool": "^0.18.
|
|
36
|
+
"@loopstack/core-ui-module": "^0.18.1",
|
|
37
|
+
"@loopstack/create-chat-message-tool": "^0.18.1",
|
|
38
|
+
"@loopstack/create-value-tool": "^0.18.1",
|
|
39
39
|
"@nestjs/common": "^11.1.12",
|
|
40
40
|
"zod": "^4.3.5"
|
|
41
41
|
},
|