@kudoai/ai-personas 1.0.0 → 1.2.0
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 +40 -9
- package/dist/ai-personas.json +4759 -4669
- package/dist/ai-personas.min.json +1 -0
- package/dist/index.js +1 -1
- package/docs/README.md +40 -9
- package/docs/licenses/LICENSE-CODE.md +1 -1
- package/package.json +17 -3
package/README.md
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
# > ai-personas
|
|
4
4
|
|
|
5
|
-
<a href="https://
|
|
6
|
-
<img height=31 src="https://img.shields.io/
|
|
5
|
+
<a href="https://npm-compare.com/@kudoai/ai-personas/#timeRange=ALL">
|
|
6
|
+
<img height=31 src="https://img.shields.io/npm/dm/@kudoai/ai-personas?logo=npm&color=af68ff&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
7
|
+
<a href="https://github.com/KudoAI/ai-personas/releases/tag/node.js-v1.2.0">
|
|
8
|
+
<img height=31 src="https://img.shields.io/badge/Latest_Build-1.2.0-32fcee.svg?logo=icinga&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
7
9
|
<a href="#%EF%B8%8F-license">
|
|
8
10
|
<img height=31 src="https://img.shields.io/badge/License-CC0--1.0/MIT-f99b27.svg?logo=internetarchive&logoColor=white&labelColor=464646&style=for-the-badge"></a>
|
|
9
11
|
<a href="https://www.codefactor.io/repository/github/KudoAI/ai-personas">
|
|
@@ -13,7 +15,9 @@
|
|
|
13
15
|
|
|
14
16
|
> ### _1,000+ AI personas for LLMs and agents._
|
|
15
17
|
|
|
16
|
-
It's just a [JSON file](https://cdn.jsdelivr.net/gh/KudoAI/ai-personas@node.js-v1.
|
|
18
|
+
It's just a [JSON file](https://cdn.jsdelivr.net/gh/KudoAI/ai-personas@node.js-v1.2.0/data/ai-personas.json), so you can use it in any environment.
|
|
19
|
+
|
|
20
|
+
<a href="#"><img style="height:10px ; width:100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@7da7074/assets/images/separators/aqua-gradient.png"></a>
|
|
17
21
|
|
|
18
22
|
## ⚡ Installation
|
|
19
23
|
|
|
@@ -23,9 +27,11 @@ From your project root:
|
|
|
23
27
|
npm install @kudoai/ai-personas
|
|
24
28
|
```
|
|
25
29
|
|
|
30
|
+
<hr>
|
|
31
|
+
|
|
26
32
|
## 🔌 Usage
|
|
27
33
|
|
|
28
|
-
#### ES Modules (ESM):
|
|
34
|
+
#### <img height=13 width="auto" src="https://cdn.jsdelivr.net/gh/KudoAI/ai-personas@7a49125/assets/images/icons/module-systems/esm/icon32.png"> ES Modules (ESM):
|
|
29
35
|
|
|
30
36
|
```js
|
|
31
37
|
import personas from '@kudoai/ai-personas'
|
|
@@ -34,7 +40,7 @@ console.log(personas['Linux Terminal'].prompt)
|
|
|
34
40
|
// => I want you to act as a linux terminal. I will type commands and you will...
|
|
35
41
|
```
|
|
36
42
|
|
|
37
|
-
#### CommonJS (CJS):
|
|
43
|
+
#### <img height=13 width="auto" src="https://cdn.jsdelivr.net/gh/KudoAI/ai-personas@7a49125/assets/images/icons/module-systems/cjs/icon32.png"> CommonJS (CJS):
|
|
38
44
|
|
|
39
45
|
```js
|
|
40
46
|
const personas = require('@kudoai/ai-personas')
|
|
@@ -43,6 +49,8 @@ console.log(personas['Linux Terminal'].prompt)
|
|
|
43
49
|
// => I want you to act as a linux terminal. I will type commands and you will...
|
|
44
50
|
```
|
|
45
51
|
|
|
52
|
+
<hr>
|
|
53
|
+
|
|
46
54
|
## 💻 Examples
|
|
47
55
|
|
|
48
56
|
#### Find personas by keyword:
|
|
@@ -58,6 +66,8 @@ console.log(findPersonas('coach'))
|
|
|
58
66
|
// => ['Interview Preparation Coach', 'Life Coach', ...]
|
|
59
67
|
```
|
|
60
68
|
|
|
69
|
+
#
|
|
70
|
+
|
|
61
71
|
#### Get prompt for a persona:
|
|
62
72
|
|
|
63
73
|
```js
|
|
@@ -67,6 +77,8 @@ console.log(getPrompt('Food Critic'))
|
|
|
67
77
|
// => I want you to act as a food critic. I will tell you about a restaurant...
|
|
68
78
|
```
|
|
69
79
|
|
|
80
|
+
#
|
|
81
|
+
|
|
70
82
|
#### Get random personas:
|
|
71
83
|
|
|
72
84
|
```js
|
|
@@ -83,6 +95,8 @@ console.log(randomPersona(10))
|
|
|
83
95
|
// => e.g. ['Internet Trend & Slang Intelligence', 'Tic-Tac-Toe Game', ...]
|
|
84
96
|
```
|
|
85
97
|
|
|
98
|
+
#
|
|
99
|
+
|
|
86
100
|
#### Get random prompt:
|
|
87
101
|
|
|
88
102
|
```js
|
|
@@ -106,6 +120,8 @@ Your task is to:
|
|
|
106
120
|
**/
|
|
107
121
|
```
|
|
108
122
|
|
|
123
|
+
#
|
|
124
|
+
|
|
109
125
|
#### Fill variables in template prompts:
|
|
110
126
|
|
|
111
127
|
```js
|
|
@@ -122,6 +138,8 @@ Your task is to:
|
|
|
122
138
|
**/
|
|
123
139
|
```
|
|
124
140
|
|
|
141
|
+
#
|
|
142
|
+
|
|
125
143
|
#### Combine prompts:
|
|
126
144
|
|
|
127
145
|
```js
|
|
@@ -145,17 +163,21 @@ Prompt B: I want you to act as a DAX terminal...
|
|
|
145
163
|
**/
|
|
146
164
|
```
|
|
147
165
|
|
|
166
|
+
#
|
|
167
|
+
|
|
148
168
|
#### Build system prompt:
|
|
149
169
|
|
|
150
170
|
```js
|
|
151
171
|
const systemPrompt = ai_personas['Study Planner'].prompt
|
|
152
172
|
|
|
153
173
|
const messages = [
|
|
154
|
-
{
|
|
155
|
-
{
|
|
174
|
+
{ role: 'system', content: systemPrompt },
|
|
175
|
+
{ role: 'user', content: 'Create a weekly study plan for calculus' }
|
|
156
176
|
]
|
|
157
177
|
```
|
|
158
178
|
|
|
179
|
+
<hr>
|
|
180
|
+
|
|
159
181
|
## 🏛️ License
|
|
160
182
|
|
|
161
183
|
<table>
|
|
@@ -171,7 +193,16 @@ const messages = [
|
|
|
171
193
|
</tr>
|
|
172
194
|
</table>
|
|
173
195
|
|
|
174
|
-
|
|
196
|
+
<hr>
|
|
197
|
+
|
|
198
|
+
## 📦 Related
|
|
199
|
+
|
|
200
|
+
🤖 [**ai-personas (Python)**](https://github.com/KudoAI/ai-personas/tree/main/python/#readme)
|
|
201
|
+
|
|
202
|
+
<a href="#"><img style="height:10px ; width:100%" src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@7da7074/assets/images/separators/aqua-gradient.png"></a>
|
|
175
203
|
|
|
176
|
-
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/
|
|
204
|
+
<picture><source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/adamlui/js-utils@3ff8817/assets/images/icons/home/white/icon32x27.png"><img height=13 src="https://cdn.jsdelivr.net/gh/adamlui/js-utils@3ff8817/assets/images/icons/home/dark-gray/icon32x27.png"></picture> <a href=https://github.com/adamlui/js-utils/#readme>**More JavaScript utilities**</a> /
|
|
205
|
+
<a href="https://github.com/KudoAI/ai-personas/discussions">Discuss</a> /
|
|
206
|
+
<a href="https://github.com/KudoAI/ai-personas/issues">Report bug</a> /
|
|
207
|
+
<a href="mailto:security@tidelift.com">Report vulnerability</a> /
|
|
177
208
|
<a href="#top">Back to top ↑</a>
|