@reactive-agents/prompts 0.6.3 → 0.7.5
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 +19 -12
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ A template engine with variable interpolation and a built-in library of agent pr
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
bun add @reactive-agents/prompts
|
|
10
|
+
bun add @reactive-agents/prompts
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Features
|
|
@@ -42,7 +42,7 @@ import { ReactiveAgents } from "reactive-agents";
|
|
|
42
42
|
const agent = await ReactiveAgents.create()
|
|
43
43
|
.withName("researcher")
|
|
44
44
|
.withProvider("anthropic")
|
|
45
|
-
.withPrompts()
|
|
45
|
+
.withPrompts() // registers all built-in templates
|
|
46
46
|
.build();
|
|
47
47
|
|
|
48
48
|
// Or register custom templates at build time:
|
|
@@ -50,16 +50,23 @@ const customAgent = await ReactiveAgents.create()
|
|
|
50
50
|
.withName("custom")
|
|
51
51
|
.withProvider("anthropic")
|
|
52
52
|
.withPrompts({
|
|
53
|
-
templates: [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
templates: [
|
|
54
|
+
{
|
|
55
|
+
id: "custom.system",
|
|
56
|
+
name: "Custom System Prompt",
|
|
57
|
+
version: 1,
|
|
58
|
+
template: "You are a {{role}} expert. Answer in {{language}}.",
|
|
59
|
+
variables: [
|
|
60
|
+
{ name: "role", required: true, type: "string" },
|
|
61
|
+
{
|
|
62
|
+
name: "language",
|
|
63
|
+
required: false,
|
|
64
|
+
type: "string",
|
|
65
|
+
defaultValue: "English",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
63
70
|
})
|
|
64
71
|
.build();
|
|
65
72
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactive-agents/prompts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"effect": "^3.10.0",
|
|
15
|
-
"@reactive-agents/core": "0.
|
|
15
|
+
"@reactive-agents/core": "0.7.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"typescript": "^5.7.0",
|