Skip to content

Commit

Permalink
Update WI script examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Cohee1207 authored Nov 4, 2024
1 parent 1cd142d commit 1ed4cde
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions For_Contributors/st-script.md
Original file line number Diff line number Diff line change
Expand Up @@ -797,31 +797,31 @@ World Info (also known as Lorebook) is a highly utilitarian tool for dynamically

```stscript
/getchatbook | /setvar key=chatLore |
/findentry file=chatLore field=key Shadowfang |
/getentryfield file=chatLore field=key |
/findentry file={{getvar::chatLore}} field=key Shadowfang |
/getentryfield file={{getvar::chatLore}} field=key |
/echo
```

### Example 2: Create a chat lorebook entry with key and content

```stscript
/getchatbook | /setvar key=chatLore |
/createentry file=chatLore key="Milla" Milla Basset is a friend of Lilac and Carol. She is a hush basset puppy who possesses the power of alchemy. |
/createentry file={{getvar::chatLore}} key="Milla" Milla Basset is a friend of Lilac and Carol. She is a hush basset puppy who possesses the power of alchemy. |
/echo
```

### Example 3: Expand an existing lorebook entry with new information from the chat

```stscript
/getchatbook | /setvar key=chatLore |
/findentry file=chatLore field=key Milla |
/findentry file={{getvar::chatLore}} field=key Milla |
/setvar key=millaUid |
/getentryfield file=chatLore field=content |
/getentryfield file={{getvar::chatLore}} field=content |
/setvar key=millaContent |
/gen lock=on Tell me more about Milla Basset based on the provided conversation history. Incorporate existing information into your reply: {{getvar::millaContent}} |
/setvar key=millaContent |
/echo New content: {{pipe}} |
/setentryfield file=chatLore uid=millaUid field=content {{getvar::millaContent}}
/setentryfield file={{getvar::chatLore}} uid=millaUid field=content {{getvar::millaContent}}
```

## Text manipulation
Expand Down

0 comments on commit 1ed4cde

Please sign in to comment.