@loopstack/ai-module 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.
Files changed (2) hide show
  1. package/README.md +14 -30
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -19,35 +19,28 @@ This module is essential for workflows that need natural language processing, co
19
19
 
20
20
  ## Installation
21
21
 
22
- ### Prerequisites
22
+ You can add this module using the `loopstack` cli or via `npm`.
23
23
 
24
- Create a new Loopstack project if you haven't already:
24
+ ### a) Add Sources via `loopstack add`
25
25
 
26
26
  ```bash
27
- npx create-loopstack-app my-project
28
- cd my-project
27
+ loopstack add @loopstack/ai-module
29
28
  ```
30
29
 
31
- Start Environment
32
-
33
- ```bash
34
- cd my-project
35
- docker compose up -d
36
- ```
30
+ This command copies the source files into your `src` directory.
37
31
 
38
- ### Install the Module
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
39
34
 
40
- #### As Node Dependency via Npm:
35
+ ### b) Install via `npm install` (recommended)
41
36
 
42
37
  ```bash
43
38
  npm install --save @loopstack/ai-module
44
39
  ```
45
40
 
46
- #### OR: Copy Sources via Loopstack CLI
41
+ Use npm install if you want to use and maintain the module as node dependency.
47
42
 
48
- ```bash
49
- loopstack add @loopstack/ai-module
50
- ```
43
+ - Use this, if you do not need to make changes to the code or want to review the source code.
51
44
 
52
45
  ### Configure API Keys
53
46
 
@@ -63,22 +56,13 @@ ANTHROPIC_API_KEY=sk-ant-...
63
56
 
64
57
  ## Setup
65
58
 
66
- ### 1. Import the Module
59
+ ### 1. Manual setup (optional)
67
60
 
68
- Add `AiModule` to your `default.module.ts` (included in the skeleton app) or to your own module:
61
+ > This step is automatically done for you when using the `loopstack add` command.
69
62
 
70
- ```typescript
71
- import { Module } from '@nestjs/common';
72
- import { AiModule } from '@loopstack/ai-module';
73
- import { LoopCoreModule } from '@loopstack/core';
74
- import { DefaultWorkspace } from './default.workspace';
75
-
76
- @Module({
77
- imports: [LoopCoreModule, AiModule],
78
- providers: [DefaultWorkspace],
79
- })
80
- export class DefaultModule {}
81
- ```
63
+ - Add `AiModule` to the imports of `default.module.ts` or any other custom module.
64
+
65
+ 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)
82
66
 
83
67
  ### 2. Use in Your Workflow
84
68
 
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "openai",
11
11
  "tool"
12
12
  ],
13
- "version": "0.18.0",
13
+ "version": "0.18.1",
14
14
  "license": "Apache-2.0",
15
15
  "author": {
16
16
  "name": "Jakob Klippel",
@@ -36,7 +36,7 @@
36
36
  "@ai-sdk/provider-utils": "^4.0.9",
37
37
  "@loopstack/common": "^0.18.0",
38
38
  "@loopstack/core": "^0.18.0",
39
- "@loopstack/core-ui-module": "^0.18.0",
39
+ "@loopstack/core-ui-module": "^0.18.1",
40
40
  "@nestjs/common": "^11.1.12",
41
41
  "@nestjs/config": "^4.0.2",
42
42
  "@nestjs/core": "^11.1.12",