|
1 | 1 | # Personas |
2 | 2 |
|
3 | | -TODO: This feature is still under development! |
| 3 | +Clai allows you to configure different personas. Whenever you're calling clai, it's possible to pass a specified persona with `--persona`. This will pass system prompts to ChatGPT. It works similar to "Custom instructions" in ChatGPT. |
4 | 4 |
|
5 | | -A clai setup should allow preconfiguring multiple personas. Each command should support a `--persona` option to allow setting some default prompts to the api. |
6 | | - |
7 | | -An example could look like this: |
| 5 | +The base clai setup comes with the following default personas config: |
8 | 6 |
|
9 | 7 | ```yaml |
10 | 8 | personas: |
11 | | - work: |
12 | | - - Use professional language |
13 | | - - Keep your answer below 100 words |
14 | | - bavarian: |
15 | | - - Use a bavarian accent |
16 | | - |
17 | | -# Starting a session with a preselected persona |
18 | | -$ clai session --persona bavarian |
19 | | -Your prompt: <Your prompt><Enter> |
20 | | -Some bavarian answer. |
| 9 | + default: |
| 10 | + - You are a helpful assistant |
| 11 | + - You answers are formatted in markdown |
| 12 | + ruby: |
| 13 | + - You are a ruby programmer |
| 14 | + - You do not comment your code |
| 15 | +``` |
| 16 | +
|
| 17 | +Compare the outputs when using different personas. |
| 18 | +
|
| 19 | +``` |
| 20 | +$ clai chat "Count to 10" --persona ruby |
| 21 | +Sure, here's how you can count to 10 in Ruby: |
| 22 | + |
| 23 | +(1..10).each do |num| |
| 24 | + puts num |
| 25 | +end |
| 26 | + |
| 27 | +// Without a persona, fallbacks to the "default" persona |
| 28 | +$ clai chat "Count to 10" |
| 29 | + |
| 30 | +1, 2, 3, 4, 5, 6, 7, 8, 9, 10 |
| 31 | + |
| 32 | +// Start a ruby persona session |
| 33 | +$ clai session --persona ruby |
21 | 34 | ``` |
22 | 35 |
|
23 | | -The default setup should have useful personas as a default. |
| 36 | +The persona under the key `default:` is used whenever you're not specifying a explicit persona. |
0 commit comments