Commit Graph

481 Commits

Author SHA1 Message Date
LenAnderson 41a88e165c add deletequickreply request handler 2023-12-22 13:45:37 +00:00
valadaptive 7ae0e05946 Allow plugins to specify "exit" functions 2023-12-17 12:26:34 -05:00
Cohee 16795dd5cc Add server plugin loader 2023-12-16 22:21:40 +02:00
Cohee dd7ac914a6 Rename basic auth middleware 2023-12-15 18:43:00 +02:00
Cohee fad718baa1
Merge pull request #1537 from valadaptive/separate-whitelist-middleware
Move whitelist middleware to its own module
2023-12-15 18:38:37 +02:00
Cohee ef17702f6a Merge branch 'staging' into bg-load-improvements 2023-12-15 17:02:10 +02:00
Cohee 6c16b94f9d
Merge pull request #1540 from valadaptive/refactor-device-check
Refactor mobile device check
2023-12-15 17:01:32 +02:00
valadaptive 0ee19d2ede Set background client-side 2023-12-15 05:45:21 -05:00
Cohee 332ab81524
Merge pull request #1535 from valadaptive/separate-settings-endpoints
Move settings endpoints into their own module
2023-12-15 01:49:29 +02:00
valadaptive 66953ceba3 Move device type detection to client side
We don't need the server to tell us our user agent--we can get it
ourselves through navigator.userAgent and parse it on the frontend.

I've replaced device-detector-js with Bowser because device-detector-js
is really slow, freezing for up to 500ms to parse a single user agent.
2023-12-14 18:43:59 -05:00
valadaptive b0827ca815 Remove /notes endpoint
It's been unused since docs were moved to their own site.
2023-12-14 18:20:39 -05:00
valadaptive 1ed9267174 Move whitelist middleware to its own module 2023-12-14 17:36:41 -05:00
valadaptive d935b2a132 Move settings endpoints to their own module 2023-12-14 16:56:45 -05:00
valadaptive 769cc0a78f Rename settings API endpoints 2023-12-14 16:47:03 -05:00
based 698850b514 Merge remote-tracking branch 'fork/staging' into gemini
# Conflicts:
#	server.js
#	src/endpoints/prompt-converters.js
#	src/endpoints/tokenizers.js
2023-12-15 01:35:17 +10:00
based d5bcd96eef message inlining vision support 2023-12-15 01:28:54 +10:00
Cohee 00687a9379 Merge branch 'staging' into separate-altscale-endpoints 2023-12-14 17:12:19 +02:00
Cohee 907dc610ab Merge branch 'staging' into separate-openai-endpoints 2023-12-14 15:17:03 +02:00
based 0b7c1a98cd added google vision caption support 2023-12-14 22:37:53 +10:00
based ca87f29771 added streaming for google models 2023-12-14 21:03:41 +10:00
based e26159c00d refactor and rework palm request to work with the 'content' format and added an endpoint for googles tokenizer 2023-12-14 15:49:50 +10:00
kingbri 3d8160cf25 Server: Update CORS proxy body limit
The body-parser middleware only accepted 50mb of data, bump this
value to 200mb.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-12-13 21:39:07 -05:00
based 69e24c9686 change palm naming in UI 2023-12-14 11:14:41 +10:00
valadaptive b55ea8df04 Move alt Scale generation to its own module 2023-12-13 18:54:12 -05:00
valadaptive 22e048b5af Rename generate_altscale endpoint 2023-12-13 18:53:46 -05:00
valadaptive dba66e756a Move chat completions API endpoints to module 2023-12-13 18:53:22 -05:00
valadaptive 92bd766bcb Rename chat completions endpoints
OpenAI calls this the "Chat Completions API", in contrast to their
previous "Text Completions API", so that's what I'm naming it; both
because other services besides OpenAI implement it, and to avoid
confusion with the existing /api/openai route used for OpenAI extras.
2023-12-13 18:52:08 -05:00
Cohee c8bc9cf24c Fix route name 2023-12-14 01:37:51 +02:00
Cohee 0cd92f13b4 Merge branch 'staging' into separate-kobold-endpoints 2023-12-14 01:33:36 +02:00
Cohee 52de5869fe Rename file, add missing fetch 2023-12-13 02:22:35 +02:00
valadaptive 2c159ff93f Move Kobold API endpoints to their own module 2023-12-12 16:42:12 -05:00
valadaptive 274605a07c Rename Kobold-related endpoints 2023-12-12 16:42:12 -05:00
valadaptive 35c2f8bf66 Move text completions API endpoints to own module 2023-12-12 16:41:16 -05:00
valadaptive 5b3c96df50 Rename /textgenerationwebui endpoint
I'd like to migrate over to using "textgen" to mean text-generation APIs
in general, so I've renamed the /textgenerationwebui/* endpoints to
/backends/text-completions/*.
2023-12-12 16:40:14 -05:00
valadaptive ce8cc59e4d Remove fetchJSON 2023-12-11 13:32:38 -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
valadaptive 1fbf4394c8 Separate Kobold Horde status function 2023-12-10 20:16:07 -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
valadaptive 04e92efe29 Move API tokenization endpoint into /tokenizers
Requires extracting some more functions out of server.js.
2023-12-09 19:35:49 -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
Cohee a8224c16de Fix order of middleware application
Previously: CSRF => auth => whitelist
Now: auth => whitelist => CSRF
2023-12-09 19:56:26 +02:00
Cohee 44ac2ca4e6 Avoid returning 401 as API response code 2023-12-09 15:11:35 +02:00
Cohee b0e7b73a32 Fix streaming processor error handler hooks 2023-12-08 02:01:08 +02:00
valadaptive 055d6c4337 Properly forward status codes from streams 2023-12-07 18:06:17 -05:00
valadaptive 32c86c1e95 Move backgrounds endpoints into separate file 2023-12-07 15:24:05 -05:00
valadaptive 2367f4f38f Rename backgrounds API endpoints 2023-12-07 15:17:19 -05:00
valadaptive eb1d4aed4d Move stats helpers into stats endpoint 2023-12-07 13:04:54 -05:00
valadaptive afe0dfe913 Move stats endpoints into separate file 2023-12-07 13:00:34 -05:00
valadaptive 26ebb417f4 Rename stats API endpoints 2023-12-07 13:00:34 -05:00
valadaptive d6f5e63d85 Move (re)creation of stats to its own function 2023-12-07 13:00:34 -05:00
valadaptive bf2b59279b Move worldinfo endpoints into separate file 2023-12-06 20:00:51 -05:00
valadaptive c746e6a426 Rename worldinfo API endpoints 2023-12-06 20:00:51 -05:00
valadaptive cf2b074d4b Move group endpoints into separate file 2023-12-06 20:00:31 -05:00
valadaptive 8027372fc2 Rename group API endpoints 2023-12-06 19:59:58 -05:00
valadaptive dcde1bd5ba Redirect deprecated chat endpoints 2023-12-06 19:59:32 -05:00
valadaptive e870c35613 Move chat endpoints into separate file 2023-12-06 19:59:32 -05:00
valadaptive 6efe95f4f1 Rename chat API endpoints 2023-12-06 19:58:24 -05:00
Cohee 1683b76c65 Add awaiter to /recreatestats 2023-12-07 01:06:56 +02:00
Cohee f3ae2e4046
Merge pull request #1477 from valadaptive/bool-simplify-1
Remove boolean equality checks from cliArguments
2023-12-07 00:59:28 +02:00
Cohee cf256a547c Remove unnecessary cast of "enableCorsProxy" 2023-12-07 00:57:23 +02:00
Cohee 6a516bf3eb Require only one autorun argument to be true 2023-12-07 00:55:36 +02:00
valadaptive 9c850b0b0c Fix double file extension on uploaded images 2023-12-06 17:29:10 -05:00
valadaptive 5096e70c11 Move client-relative path logic to helper function 2023-12-06 17:22:37 -05:00
valadaptive 39d771cc4a Replace path "\" with "/" server-side 2023-12-06 17:22:37 -05:00
valadaptive e65d1ad20f Remove boolean equality checks from cliArguments
yargs ensures that the Boolean options will always be booleans, so the
strict equality checks are unnecessary.
2023-12-06 13:29:58 -05:00
valadaptive 7b13c5b37d Redirect deprecated character endpoints 2023-12-06 12:05:01 -05:00
valadaptive a457484c2d Move character endpoints into their own module 2023-12-04 17:35:06 -05:00
valadaptive 17959a60a4 Remove charactersPath and chatsPath
We already have these paths in the DIRECTORIES constant.
2023-12-04 17:35:06 -05:00
valadaptive b689b8bd30 Rename character API endpoints
Precursor to moving the character API into its own module
2023-12-04 17:35:06 -05:00
Cohee 1ade0fda11 Merge branch 'staging' into stable-diffusion-router 2023-12-05 00:25:24 +02:00
Cohee b287d5f3bd Merge branch 'staging' into tokenizers-router 2023-12-05 00:19:44 +02:00
Cohee 21e19674b4 Merge branch 'staging' into vectors-router 2023-12-05 00:15:36 +02:00
Cohee 444f67e930 Merge branch 'staging' into translate-router 2023-12-05 00:11:06 +02:00
Cohee eb273ced59 Merge branch 'staging' into thumbnails-router 2023-12-05 00:08:15 +02:00
Cohee 9d0a0bc139 Merge branch 'staging' into sprites-router 2023-12-05 00:01:03 +02:00
Cohee 2acb7d1ae5 Merge branch 'staging' into serpapi-router 2023-12-04 23:57:23 +02:00
Cohee 1eb6f33e8b Merge branch 'staging' into secrets-router 2023-12-04 23:54:54 +02:00
Cohee 6fc0e485cd Merge branch 'staging' into presets-router 2023-12-04 23:51:08 +02:00
Cohee 32c3c34e4b Merge branch 'staging' into openai-router 2023-12-04 23:45:50 +02:00
Cohee dca470c9e9 Merge branch 'staging' into novelai-router 2023-12-04 22:14:46 +02:00
Cohee 6fd6d4fc4d Merge branch 'staging' into horde-router 2023-12-04 22:07:39 +02:00
Cohee 3085dbe12c Merge branch 'staging' into extensions-router 2023-12-04 21:51:00 +02:00
Cohee d22d0c7cc2 Merge branch 'staging' into content-manager-router 2023-12-04 21:46:25 +02:00
Cohee a2387130f3 Merge branch 'staging' into classify-router 2023-12-04 21:39:39 +02:00
Cohee 1d4ac50fd7 Merge branch 'staging' into caption-router 2023-12-04 21:31:01 +02:00
valadaptive 68049afd84 Use Express router for vectors endpoint 2023-12-04 13:01:52 -05:00
valadaptive 15ba2441ce Use Express router for translate endpoint 2023-12-04 13:00:59 -05:00
valadaptive 4e073250a2 Use Express router for tokenizers endpoint 2023-12-04 13:00:13 -05:00
valadaptive 2d54a67a1f Use Express router for thumbnails endpoint 2023-12-04 12:59:24 -05:00
valadaptive 7f129df7b8 Use Express router for stable diffusion endpoint 2023-12-04 12:58:02 -05:00
valadaptive 173bc5975f Use Express router for sprites endpoint 2023-12-04 12:57:13 -05:00
valadaptive 35ce955b00 Use Express router for serpapi endpoint 2023-12-04 12:56:22 -05:00
valadaptive 091255d451 Use Express router for secrets endpoint 2023-12-04 12:55:13 -05:00
valadaptive ba74288e4a Use Express router for presets endpoint 2023-12-04 12:54:18 -05:00
valadaptive 2d19645c4e Use Express router for openai endpoint 2023-12-04 12:53:17 -05:00
valadaptive e6b549bc48 Use Express router for novelai endpoint 2023-12-04 12:52:27 -05:00
valadaptive 2e990bf336 Use Express router for horde endpoint 2023-12-04 12:51:02 -05:00
valadaptive babe9abbe9 Use Express router for extensions endpoint 2023-12-04 12:48:29 -05:00
valadaptive 4c911d3155 Use Express router for content endpoint 2023-12-04 12:47:38 -05:00
valadaptive 0ad753f317 Use Express router for classify endpoint 2023-12-04 12:45:17 -05:00