Commit Graph

143 Commits

Author SHA1 Message Date
Cohee
2afac5aeb1 Filter null messages in array and context line appearing unprompted 2023-08-15 15:08:42 +03:00
Cohee
706be4390d Add new Claude instant model 2023-08-15 14:57:11 +03:00
maver
2bb8fa5ea1 Update quick edit textareas when prompt manager re-renders 2023-08-15 01:20:42 +02:00
Cohee
238b667262 Merge branch 'staging' of https://github.com/SillyLossy/TavernAI into staging 2023-08-14 22:19:17 +03:00
Cohee
3850e6b50a Replace object stores for Chroma and token cache 2023-08-14 22:19:14 +03:00
maver
033dc45ab9 Move quick edit ui identifiers into configuration 2023-08-14 20:29:01 +02:00
maver
9543f54f8c Fix user jb/main not replacing original placeholder in character main/jb 2023-08-14 20:28:54 +02:00
Cohee
edcce96a6e IndexedDB open sometime hangs forever 2023-08-14 19:40:31 +03:00
Cohee
d395d3d8e6 Add peek proxy password btn 2023-08-14 12:01:06 +03:00
Cohee
6da3453efc Fix example dialogue syntax 2023-08-14 11:52:58 +03:00
Cohee
e6bf870c55 Persist token cache to indexedDb 2023-08-13 22:45:27 +03:00
maver
0f897158b9 Create a deep clone of the preset before applying
Prevents non-primitives from causing overlapping references
2023-08-12 19:40:01 +02:00
maver
f5aa7f7970 Remove obsolete prompt manager settings object 2023-08-12 18:52:52 +02:00
maver
03b8bb64fa Prevent new example chat message being added for no reason 2023-08-12 18:40:39 +02:00
maver
a9fa42524d Fix prompts object reference being shared
By deepcloning a copy
2023-08-12 18:40:39 +02:00
maver
f2c4645207 Use chatcompletion log function for token budget 2023-08-12 18:40:39 +02:00
maver
19e5502555 Remove obsolete assignment 2023-08-12 18:40:39 +02:00
maver
b1254fa2ab Copy migrated preset into loaded presets
Since this only is populated once during page load
2023-08-12 18:40:39 +02:00
maver
5a92f72703 Add flag to preset saving, allowing to prevent triggering the UI 2023-08-12 18:40:39 +02:00
maver
46c7e63fad Remove obsolete debugging output 2023-08-12 18:40:39 +02:00
maver
cdfe3a6841 Fix user messages not being added when populating example dialogue 2023-08-12 18:40:39 +02:00
maver
a8ee723853 Always add impersonate prompt last 2023-08-12 18:40:39 +02:00
Cohee
dd89009ecd Use tokenizer-specific token cache 2023-08-12 18:40:39 +02:00
maver
2805a684a8 Emit events on changing chatcompletion source or model 2023-08-12 18:40:39 +02:00
maver
d82ea66664 Refactor addItem method of MessageCollection 2023-08-12 18:40:39 +02:00
maver
4100ae9e0b Do not insert authors note into main
Since it is already present in the chat history
2023-08-12 18:40:39 +02:00
maver
d2ee6e9a12 Append quietPrompt last 2023-08-12 18:40:39 +02:00
Cohee
463f01d2a6 #870 Fix Claude in prompt manager 2023-08-12 18:40:39 +02:00
Cohee
29552ecfcf Sanitize completion names. Only send names in msg texts if names in completion is disabled 2023-08-12 18:40:39 +02:00
maver
1b7a1cbc4a Add quick edit drawer and fields for main and jailbreak 2023-08-12 18:40:39 +02:00
maver
38bfcf5324 Remove advanced options toggle 2023-08-12 18:40:39 +02:00
maver
222fd3429d Center globe icon 2023-08-12 18:40:39 +02:00
maver
bc4befeb22 Rename prompt lists to prompt order
Includes renaming of configuration, no functional changes
2023-08-12 18:40:39 +02:00
maver
63d224d8af Refactor and simplify setup method for prompt manager. 2023-08-12 18:40:39 +02:00
maver
ad6575887a Remove obsolete function getGroupMembers 2023-08-12 18:40:39 +02:00
maver
b58ce0370d Refactor token counting after completion. Simplify code. 2023-08-12 18:40:39 +02:00
maver
57fd04b974 Refactor token counting after completion. Simplify code. 2023-08-12 18:40:39 +02:00
maver
dfd49813af Refactor naming scheme for default promptmanager defaults 2023-08-12 18:40:39 +02:00
maver
9d6cf017d2 Move main and jailbreak override from manager into openai script.
Makes the code clearer and easier to understand
2023-08-12 18:40:39 +02:00
maver
075c0c29f0 Refactor prepareOpenAiMessages, move prompt preparation in its own function 2023-08-12 18:40:39 +02:00
maver
7ea6e89b05 Add reset prompt support for enhance definitions 2023-08-12 18:40:39 +02:00
maver
b2acc9eb0f Refactor documentation and make code more readable
No functional changes
2023-08-12 18:40:39 +02:00
maver
19ee831d82 Prevent prompt manager initialization more than once 2023-08-12 18:40:39 +02:00
maver
76154fd8ee Fix authors note position not being considered 2023-08-12 18:40:39 +02:00
maver
41aae57f05 Do not send empty scenario and personality prompts 2023-08-12 18:40:39 +02:00
maver
6a52d6febd Fix invalid character name error not being handled 2023-08-12 18:40:39 +02:00
maver
4dd94a4a62 Do not generate group responses on dry run 2023-08-12 18:40:39 +02:00
maver
a706ecd48c Add charIfNotGroup placeholder to default main prompt 2023-08-12 18:40:39 +02:00
maver
cf305c0395 Do not attempt a dryrun if no character has been selected 2023-08-12 18:40:39 +02:00
maver
82a11316bc Add continue nudge to editable utility prompts 2023-08-12 18:40:39 +02:00