Cohee
1b11ddc26a
Add vector storage to WI scanning
2023-12-11 22:47:26 +02:00
Cohee
e713021737
Merge pull request #1511 from valadaptive/more-kobold-cleanups
...
More Kobold cleanups
2023-12-11 20:59:49 +02:00
Cohee
27782b2f83
Fix united version comparison
2023-12-11 20:44:29 +02:00
Cohee
7482a75bbd
Merge pull request #1493 from valadaptive/generate-cleanups
...
Clean up Generate(), part 1
2023-12-11 20:21:32 +02:00
Cohee
d38a4dc6c1
Fix abort group generation
2023-12-11 20:03:31 +02:00
Cohee
0302686a96
Return from Generate if calling circuit breaker
2023-12-11 19:07:33 +02:00
Cohee
e96fb0c1b5
Fix group wrapper not resolving to a valid text
2023-12-11 19:00:42 +02:00
Cohee
0fcf8fd491
Typing indicator fixed
2023-12-11 18:23:00 +02:00
Cohee
17105568f4
Reduce hard coded anim. durations
2023-12-11 16:23:21 +02:00
Cohee
e7c2975ab0
Fix adv.defs overlap with past chats. Close CFG with Escape
2023-12-11 15:39:58 +02:00
Cohee
c6bd3ef255
Fix /sys continue in groups
2023-12-11 15:08:20 +02:00
valadaptive
42d4ffe5e8
Remove Kobold "canUse(...)" functions
...
Replace them all with a versionCompare helper function which we can call
directly with the minimum version constants.
2023-12-10 20:39:21 -05:00
valadaptive
d33cb0d8d1
Clarify getstatus API
...
Instead of "version" and "koboldVersion", have "koboldUnitedVersion" and
"koboldCppVersion", the latter of which is null if we're not connected
to KoboldCpp.
2023-12-10 20:34:11 -05:00
Cohee
7450112e9b
Unbust user continue in group chats
2023-12-11 00:02:49 +02:00
Cohee
05b08f1ce2
Don't await delay promise
2023-12-10 21:51:16 +02:00
Cohee
2e50efc35c
Limit waiting for TTS to init to 1 second on chat change
2023-12-10 21:50:52 +02:00
Cohee
420d186823
Add reduced motion toggle
2023-12-10 20:02:25 +02:00
valadaptive
33f969f097
Have Generate() return a promise
...
Generate(), being async, now returns a promise-within-a-promise.
If called with `let p = await Generate(...)`, it'll wait for generation
to *start*. If you then `await p`, you'll wait for generation to
*finish*. This makes it much easier to tell exactly when generation's
done. generateGroupWrapper has been similarly modified.
2023-12-10 12:30:10 -05:00
Cohee
13e016f3e5
Merge pull request #1508 from LenAnderson/tts-skip-codeblocks-option
...
add TTS option to skip codeblock narration
2023-12-10 19:28:16 +02:00
valadaptive
03884b29ad
Always call resolve in Generate()
...
This lets us get rid of the janky hack in group-chats to tell when a
message is done generating.
2023-12-10 12:26:30 -05:00
valadaptive
f5d2e50f5e
Remove isGenerationAborted
...
Just check the AbortSignal.
2023-12-10 12:24:18 -05:00
Cohee
dbd52a7994
Merge pull request #1482 from valadaptive/sse-stream
...
Refactor server-sent events parsing
2023-12-10 18:32:19 +02:00
LenAnderson
bf88829b03
add option to skip codeblock narration
2023-12-10 16:32:10 +00:00
Cohee
af89cfa870
Code clean-up
2023-12-10 16:48:25 +02:00
Cohee
5054de247b
Merge branch 'staging' into qr-editor-tab-support
2023-12-10 16:36:28 +02:00
Cohee
9acef0fae6
Horde doesn't support API tokenizers
2023-12-10 16:21:06 +02:00
Cohee
f54bf99006
Fix token ids not displaying in "API_CURRENT" mode for TextGen
2023-12-10 16:09:00 +02:00
Cohee
6957d9e7cf
Fix display names of Best match tokenizers
2023-12-10 16:03:25 +02:00
Cohee
6e5eea5dba
Unbreak previously selected API tokenizer in dropdown
2023-12-10 15:56:38 +02:00
Cohee
d5140142fb
Merge branch 'staging' into tokenizers-cleanup
2023-12-10 15:51:15 +02:00
Cohee
5f1683f43a
More input padding and stricter sanitation
2023-12-10 15:07:39 +02:00
valadaptive
0201a0260c
Default event type to 'message' if it's empty
...
Added to the upstream test suite. Matches the spec.
2023-12-10 04:45:10 -05:00
valadaptive
55976e61a3
Fix tokenizer override
...
I searched for all users of tokenizers.API, but missed that the menu
converts the numerical select values directly to enum values. I've used
the special tokenizer value 98 to represent "the tokenizer API for
whichever backend we're currently using".
2023-12-09 23:57:21 -05:00
valadaptive
0fce475a95
Implement random sort with a shuffle
...
Sorting with a random comparator doesn't actually shuffle an array.
Depending on the sorting algorithm used, there will be a bias to the
shuffle (see https://bost.ocks.org/mike/shuffle/compare.html ).
If you open that link in Firefox, the bias will be especially bad.
Instead of implementing "random" character sort using a random sort
comparator, use the shuffle function instead.
2023-12-09 22:52:38 -05:00
valadaptive
014416546c
Add padding once in getTokenCount
...
This means we don't have to pass the "padding" parameter into every
function so they can add the padding themselves--we can do it in just
one place instead.
2023-12-09 20:53:16 -05:00
valadaptive
2f2cd197cc
Clean up tokenizer API code
...
Store the URLs for each tokenizer's action in one place at the top of
the file, instead of in a bunch of switch-cases. The URLs for the
textgen and Kobold APIs don't change and hence don't need to be
function arguments.
2023-12-09 20:48:41 -05:00
valadaptive
09465fbb97
Inline most get(...)TokenizerParams calls
...
For everything except textgenerationwebui, these params are now simple
enough that it doesn't make sense for them to be in a separate function.
2023-12-09 20:35:11 -05:00
valadaptive
30502ac949
Split up Kobold and textgenerationwebui endpoints
...
The endpoint was one big if/else statement that did two entirely
different things depending on the value of main_api. It makes more sense
for those to be two separate endpoints.
2023-12-09 20:26:24 -05:00
valadaptive
7486ab3886
Separate textgen and Kobold tokenization APIs
...
They function differently and have different logic and API parameters,
so it makes sense to count them as two different APIs. Kobold's API
doesn't return tokens, so it can only be used to count them.
There's still a lot of duplicate code which I will clean up in the
following commits.
2023-12-09 20:24:56 -05:00
valadaptive
18177c147d
Separate remote and server tokenization code paths
...
This lets us remove extraneous API params from paths where they aren't
needed.
2023-12-09 20:08:48 -05:00
valadaptive
ddd73a204a
Remove "remote" language from tokenizer functions
...
We'll be making a distinction between tokenizing *on* the server itself,
and tokenizing via the server having the AI service do it. It makes more
sense to use the term "remote" for the latter.
2023-12-09 19:49:22 -05:00
valadaptive
8bad059a62
Rename /tokenize_via_api endpoint
...
No redirect for this since I don't expect any extensions to be calling this directly.
2023-12-09 19:29:24 -05:00
LenAnderson
a3ec8d709d
add support for tab and shift-tab in QR editor
2023-12-09 17:56:36 +00:00
Cohee
2d7811fa46
Merge pull request #1499 from LenAnderson/qr-execute-from-any-preset
...
Allow /run for quick replies from any preset
2023-12-09 19:49:03 +02:00
LenAnderson
d00861d913
allow /run for quick replies from other presets
...
/run otherPresetName.quickReplyLabel
2023-12-09 17:20:15 +00:00
Cohee
e79f6d82da
Merge pull request #1498 from artisticMink/bulkedit-delete-optimization
...
Only refresh character list after all deletions have been processed.
2023-12-09 18:07:44 +02:00
Cohee
b915b89ca9
Fix ESLint
2023-12-09 16:09:10 +02:00
Cohee
ad9130b538
Single doc mode: edit on click
2023-12-09 16:01:43 +02:00
artisticMink
dfd41a110a
Prevent 'no such file or directory' error when mass deleting characters
2023-12-09 14:36:37 +01:00
artisticMink
ba3966e148
Only refresh character list after all deletions have been processed.
2023-12-09 14:31:18 +01:00
valadaptive
d735b12399
Refactor event stream parsing
...
I was really overcomplicating this before; this is simpler and faster.
Passes my existing test suite.
2023-12-08 15:05:57 -05:00
valadaptive
699c369443
Remove ignoreBOM
...
Apparently the ignoreBOM option actually means "include the BOM". I've
added a test for this in my own repository, and will also be submitting
a pull request to MDN to clarify this in their documentation.
2023-12-07 23:15:55 -05:00
Cohee
b0e7b73a32
Fix streaming processor error handler hooks
2023-12-08 02:01:08 +02:00
valadaptive
5569a63595
Remove legacy_streaming setting
...
This was a workaround for older versions of Slaude that implemented SSE
improperly. This was fixed in Slaude 7 months ago, so the workaround can
be removed.
2023-12-07 18:00:36 -05:00
valadaptive
cdcd913805
Don't stream events if the API returned a 4xx code
2023-12-07 18:00:36 -05:00
valadaptive
5540c165cf
Refactor server-sent events parsing
...
Create one server-sent events stream class which implements the entire
spec (different line endings, chunking, etc) and use it in all the
streaming generators.
2023-12-07 18:00:36 -05:00
Cohee
6f610204d6
Merge pull request #1488 from LenAnderson/add-index-argument-to-setvar-/-setglobalvar
...
Add index argument to setvar / setglobalvar
2023-12-08 00:40:14 +02:00
Cohee
2607e787ff
Put comment command on hold
2023-12-08 00:38:13 +02:00
Cohee
e2f886d796
Revert pipe caching
2023-12-08 00:33:27 +02:00
Cohee
7f7ad6f523
Merge branch 'staging' into backgrounds-endpoint
2023-12-07 23:16:33 +02:00
Cohee
404b1562e5
Merge pull request #1491 from valadaptive/stats-endpoint
...
Move stats endpoints into their own module
2023-12-07 23:11:12 +02:00
valadaptive
2367f4f38f
Rename backgrounds API endpoints
2023-12-07 15:17:19 -05:00
LenAnderson
65f2cc1952
add a comment slash commend /#
...
for commenting longer ST scripts
2023-12-07 18:29:28 +00:00
LenAnderson
d52b5fb947
pass prev pipeResult through if result undefined
2023-12-07 18:28:58 +00:00
LenAnderson
5a719d635a
use isArray instead of instanceof
2023-12-07 18:27:11 +00:00
LenAnderson
7bfed3fca1
/addvar on array to push
2023-12-07 18:12:05 +00:00
Cohee
c84b6a5101
Add WI inclusion groups
2023-12-07 20:06:06 +02:00
valadaptive
26ebb417f4
Rename stats API endpoints
2023-12-07 13:00:34 -05:00
Cohee
e804f27368
Convert value to string for echo. Fix return value
2023-12-07 19:37:55 +02:00
LenAnderson
2ee57afe2a
add helpString for index in setvar
2023-12-07 16:51:45 +00:00
LenAnderson
db6f782e0f
add index to /setvar and /setglobalvar
2023-12-07 16:48:24 +00:00
Cohee
b1f68d886c
Fix WI field access for UID = 0
2023-12-07 18:45:34 +02:00
Cohee
72adb4c8aa
Fix window.ai streaming
2023-12-07 17:42:06 +02:00
Cohee
785be22e51
Merge branch 'staging' into st-object-vars
2023-12-07 16:46:02 +02:00
Cohee
e9a49b7997
Merge pull request #1485 from LenAnderson/qr-expand-editor
...
Add expand button to QR textareas
2023-12-07 15:31:01 +02:00
Cohee
b506a17260
Fix expand after drag
2023-12-07 15:29:40 +02:00
LenAnderson
afd32d1f4d
better handling of array / object vars
2023-12-07 12:56:28 +00:00
LenAnderson
0290916035
stop expanding textarea
2023-12-07 12:29:00 +00:00
LenAnderson
a1bfca78b3
add custom titles (tooltips) to QR buttons
2023-12-07 12:20:02 +00:00
LenAnderson
d62ef8badc
add expand button for QR textareas
2023-12-07 12:04:39 +00:00
Cohee
75abc6101a
/input input => /input default
2023-12-07 13:44:49 +02:00
Cohee
0e6802c9d9
Too much lint
2023-12-07 13:35:48 +02:00
Cohee
25db4b6fde
Merge branch 'staging' into feat/slash-commands-missing-args
2023-12-07 13:19:15 +02:00
Cohee
8082144c5a
Merge branch 'staging' into worldinfo-endpoint
2023-12-07 12:58:57 +02:00
Cohee
0138008031
Merge branch 'staging' into groups-endpoint
2023-12-07 12:50:24 +02:00
Cohee
c0fb5a4787
Merge pull request #1473 from valadaptive/chats-endpoint
...
Move chat endpoints into their own module
2023-12-07 12:36:43 +02:00
RossAscends
c51a821b1e
fix zen slider rep pen range value transfer
2023-12-07 11:52:10 +09:00
SrJuggernaut
d6d0371459
add missing args to some slash commands
2023-12-06 19:26:29 -06:00
valadaptive
c746e6a426
Rename worldinfo API endpoints
2023-12-06 20:00:51 -05:00
valadaptive
8027372fc2
Rename group API endpoints
2023-12-06 19:59:58 -05:00
valadaptive
6efe95f4f1
Rename chat API endpoints
2023-12-06 19:58:24 -05:00
Cohee
f575e0d61d
Add {{currentSwipeId}} / {{lastSwipeId}} macros
2023-12-07 02:35:24 +02:00
Cohee
393a15cd81
Run auto-executed STscripts after message rendered
2023-12-07 02:12:49 +02:00
Cohee
24aff67d50
Fix {{original}} macro left out if original is empty
2023-12-07 01:27:55 +02:00
valadaptive
39d771cc4a
Replace path "\" with "/" server-side
2023-12-06 17:22:37 -05:00
Cohee
100dae5fd0
Merge pull request #1444 from valadaptive/characters-endpoint
...
Move character endpoints into their own module
2023-12-06 23:45:14 +02:00
Cohee
5e282ac7b4
lint: infix spacing
2023-12-06 22:08:06 +02:00
LenAnderson
ea7720a7de
add /len slash command
2023-12-06 19:03:20 +00:00
LenAnderson
a5c595d8ae
add list accessors to /getvar and /getglobalvar
2023-12-06 19:03:10 +00:00
Cohee
64496425cc
Save chat before reloading
2023-12-06 17:23:54 +02:00