Commit Graph

456 Commits

Author SHA1 Message Date
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
valadaptive d2e1577acb Use Express router for caption endpoint 2023-12-04 12:43:37 -05:00
valadaptive d24c1dde10 Use Express router for assets + "files" endpoints
I've split out the "file/upload" endpoint into its own module, and
renamed it to "files" to be consistent with the existing naming scheme.
2023-12-04 12:40:53 -05:00
Cohee 95ef108e84 Merge branch 'staging' into express-common 2023-12-04 19:09:20 +02:00
Cohee 8bf18891b3 Add data model field for WI entry group 2023-12-04 18:47:35 +02:00
valadaptive 3931f791b2 Move parsers into express-common module
This will allow endpoint modules to import them themselves, instead of
requiring server.js to pass them in.
2023-12-04 10:25:40 -05:00
valadaptive 4919a2e9a2 Move endpoints into their own folder 2023-12-04 10:24:21 -05:00
valadaptive 24546621e3 Move endpoints into their own folder 2023-12-04 10:12:27 -05:00
valadaptive ebde9c2c1f Copy chat_completion_sources enum to server code 2023-12-03 15:04:01 -05:00
valadaptive e33c8bd955 Replace use_[source] with chat_completion_source
Same as the is_[api] replacement--it's easier to have one enum field
than several mutually-exclusive boolean ones
2023-12-03 15:03:39 -05:00
valadaptive a68505e857 Copy textgen-types enum to server code 2023-12-03 15:00:25 -05:00
valadaptive ba54e3dea0 Replaces is_[api] params with api_type param
These were 5 mutually-exclusive booleans, which can be replaced with one
param that takes on 5 values, one for each API type.
2023-12-03 14:56:01 -05:00
Cohee 45df576f1c Re-add default presets for content manager 2023-12-03 15:07:21 +02:00
Cohee b09ebb240e Phaseout JSON5 2023-12-03 14:04:43 +02:00
Cohee 64a3564892 lint: Comma dangle 2023-12-02 22:06:57 +02:00
Cohee c63cd87cc0 lint: Require semicolons 2023-12-02 21:11:06 +02:00
valadaptive a37f874e38 Require single quotes 2023-12-02 13:04:51 -05:00
valadaptive 518bb58d5a Enable no-unused-vars lint
This is the big one. Probably needs thorough review to make sure I
didn't accidentally remove any setInterval or fetch calls.
2023-12-02 12:11:19 -05:00
valadaptive 97c49a405b Enable no-extra-boolean-cast lint 2023-12-02 10:32:26 -05:00
valadaptive 0a27275772 Enable no-extra-semi lint 2023-12-02 10:32:26 -05:00
valadaptive 60ac1aa1c7 Enable no-empty lint 2023-12-02 10:32:07 -05:00
valadaptive 8c89f373fa Enable no-irregular-whitespace lint
A couple comments contained non-breaking spaces (I think), which I
replaced with regular spaces.
2023-12-02 10:32:07 -05:00
Cohee bac43a2131 Add CORS proxy placeholder 2023-12-02 16:04:30 +02:00
Cohee 4f05d872f4
Merge pull request #1423 from bdashore3/staging
Fix the CORS proxy again
2023-12-02 16:00:35 +02:00
Cohee a1754c7192
Update server.js 2023-12-02 15:32:09 +02:00
valadaptive 4c4e4caeb7 Pass in Kobold Classic API server url from client 2023-12-02 04:45:20 -05:00
kingbri 641cd614c8 Server: Fix CORS proxy with POST requests and status codes
POST requests always sent an undefined body without the bodyParser
middleware which isn't included with express by default. Add this
as a new dependency and inject it into the express app. This middleware
will also be useful for any other middleware that we might create.

Also properly send status codes and messages to the client so they
can be handled properly.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-12-02 01:43:09 -05:00
Cohee e9ad55aef2 Add seed input field for OpenAI settings #1412 2023-11-30 02:54:52 +02:00
Cohee 19df1f52cd Vector storage file retrieval 2023-11-30 00:01:59 +02:00
Cohee e541c2b186 #1412 Add randomized user ids to OpenAI 2023-11-29 00:11:10 +02:00
kingbri 735c4e7268 Server: Fix CORS proxy with URLs
Using slashes completely stripped the rest of the URL. Fix that.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-11-27 00:17:07 -05:00
Cohee 87108421b3 Add default config values 2023-11-26 13:13:44 +02:00
Cohee a7024a1d34 Migrate to config.yaml 2023-11-25 23:45:33 +02:00
Cohee b24d4f2340 Add opt-in CORS bypass endpoint 2023-11-25 21:56:57 +02:00
RossAscends 0b9555234e sort ChatCompletion presets by name 2023-11-24 17:15:39 +09:00
kingbri e445aeec14 Tabby: Fix model name return on error
Tabby's model API is always /v1/model/list, so return "None" if the
request fails since that means a model is most likely not loaded.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-11-23 00:13:28 -05:00
Cohee df4ed389bf System prompt for Claude 2 2023-11-21 22:11:26 +02:00
Cohee 96b87641ca Add OpenAI Whisper API 2023-11-19 20:30:34 +02:00
Cohee 96caddfd71 Add koboldcpp as Text Completion source 2023-11-19 17:14:53 +02:00
Cohee 53c3fc16c1 Assorted SD fixes 2023-11-19 00:40:21 +02:00
LenAnderson e520a50de2 add autorun command line argument 2023-11-18 00:09:42 +00:00
kingbri 5f8c615981 Server: Fix model info logs
Don't use a formatted string.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-11-17 15:01:13 -05:00
kingbri f7ed574d04 Tabby: Decouple combined conditionals
Done by request.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-11-17 14:51:44 -05:00
kingbri 4cfa267b1b API Tokenizer: Add support for TabbyAPI
Use Tabby's /v1/token endpoints.

Signed-off-by: kingbri <bdashore3@proton.me>
2023-11-17 01:48:03 -05:00
kingbri f31b996cb5 Text Generation: Add TabbyAPI support
TabbyAPI is an exllamav2 only API server that aims to provide a simple
experience for loading and chatting with exl2 models.

SillyTavern currently doesn't have the ability to load and unload models,
so only add the OAI compatible completion endpoints.

The repository can be found here:
https://github.com/theroyallab/tabbyAPI

Signed-off-by: kingbri <bdashore3@proton.me>
2023-11-17 00:37:39 -05:00
Cohee 3fb26d3927 Add lazy loading of sentencepiece tokenizers 2023-11-15 19:39:55 +02:00
Cohee 5b5e42361a Fix chat backups saving with incorrect file extension 2023-11-15 01:06:27 +02:00
Cohee 5fe8f70eb1 #1345 Add API endpoint for web search interaction 2023-11-14 00:16:41 +02:00
Cohee 7afe9e6481 #1343 Add status check bypass 2023-11-12 13:23:46 +02:00
Cohee 4c0b3fb7ae Add null checks for OR pricing 2023-11-12 13:07:57 +02:00
Cohee abe4bb6d54 Add error handling for empty Palm response 2023-11-10 15:55:49 +02:00
Cohee 81fe9aa699 Fix updated tokenization via ooba API 2023-11-09 19:39:08 +02:00
Cohee 3780321ae6 Fix ooba model name displaying as turbo 2023-11-09 19:27:19 +02:00
Cohee 0e89bf90bc Use correct tokenizers for logit bias for Mistral and Llama models over OpenRouter 2023-11-09 01:03:54 +02:00
Cohee 76b8880972 Normalize response statuses 2023-11-08 23:20:55 +02:00
Cohee 480099ee97 Mancer will work in legacy API mode. Remove Soft Prompt mentions. 2023-11-08 18:16:47 +02:00
Cohee 4f1dbaa34b Remove /v1 from the ooba API URLs 2023-11-08 17:09:33 +02:00
Cohee 740f6548a2 Increase timeouts of OAI out of quota requests 2023-11-08 12:07:14 +02:00
Cohee e76c18c104 Legacy ooba API compatibility shim 2023-11-08 10:13:28 +02:00
Cohee 865256f5c0 Fix ooba tokenization via API. Fix requiring streaming URL to generate 2023-11-08 03:38:04 +02:00
Cohee b2629d9718 Refactor status checks and indicators. 2023-11-08 02:52:03 +02:00
Cohee 00a1eaab28 Add timeout for status check 2023-11-08 01:47:31 +02:00
Cohee 2c7b954a8d #1328 New API schema for ooba / mancer / aphrodite 2023-11-08 00:17:13 +02:00
Cohee 2d2ff5230c
Merge pull request #1318 from artisticMink/feature/bulk-edit-enhanced
Feature/bulk edit enhanced
2023-11-07 20:47:06 +02:00
Cohee 1896732f17 Add DALL-E to OpenAI plugin 2023-11-06 21:47:00 +02:00
artisticMink c584da2ea9 Accept both v1 and v2 spec for editcharacterattributes endpoint 2023-11-06 16:13:34 +01:00
artisticMink 42d838a0b3 Refactor TavernCardValidator error property 2023-11-06 16:13:34 +01:00
artisticMink 6eb6527d11 Prototyping 2023-11-06 16:13:34 +01:00
Cohee f10833a516 Add prompt format override for OpenRouter 2023-11-03 00:34:22 +02:00
RossAscends 75c6e74d41 support for min P on Kobold API 2023-11-02 14:53:57 +09:00
Cohee 922007ea25 #1294 Fix selective logic for embedded lorebooks 2023-10-28 12:28:03 +03:00
Cohee 24f406917d Add seed to Kobold APi 2023-10-26 21:22:00 +03:00
Cohee 51d2c9feba Add UI option for group gen strategy 2023-10-25 22:39:31 +03:00
Cohee 5dbe2ebf29 Add chat file backups 2023-10-24 22:09:55 +03:00
Cohee 18fa925855 Use named constant 2023-10-21 23:33:17 +03:00
Cohee ca73a3a7b7 Merge branch 'release' into staging 2023-10-21 15:06:19 +03:00
Cohee 008fcece04 Rewrite to sync readdir, add try-catch, filter out invalid files 2023-10-21 15:04:36 +03:00
Xrystal 1d38109dcf Use JSON instead of json5 2023-10-21 18:56:51 +08:00
Xrystal 6f0f420063 Promisify getallchatsofcharacter 2023-10-21 18:55:52 +08:00
Cohee b167eb9e22 Add raw token ids support to OAI logit bias. Fix token counting for turbo models 2023-10-19 13:37:08 +03:00
Cohee 6a1b230c7e #1226 Add chat-bound lorebooks 2023-10-16 23:03:42 +03:00
Cohee 8a3547ecd0 #1248 Fix a server crash on unexpected models response 2023-10-16 20:25:51 +03:00
majick 89d7a05ea7 Missed a spot 2023-10-14 20:08:45 -10:00
majick a9ebd2f80e Make v2 spec read logspam slightly actionable
The existing logspam doesn't even tell the user what char is failing, which means it's
just going to emit every startup, forever, grinding at the poor user's soul, never
letting them know *which* of their 352 cards is causing the spam... day after day after
day.  Until one day, the poor beleaguered user will emit the world's ugliest PR to at
least find the broken card in an attempt kill it.

Ask me how I know.
2023-10-14 17:41:23 -10:00
50h100a 6e78ec11fb Check for errors on the `stream_end` event 2023-10-10 18:04:28 -04:00
Cohee 15c81749b8 Filter out invalid/broken characters 2023-10-09 19:17:49 +03:00
Cohee 0873d3eaf9 Filter out invalid/broken characters 2023-10-09 19:09:33 +03:00
Cohee d265179f46 Don't crash ST server on invalid streaming URL 2023-10-08 23:42:28 +03:00
Cohee f8b5fe8b1e Add Character note to char.card embeds 2023-10-04 22:13:56 +03:00
Cohee bb47712696 Split oobabooga/mancer sources. Add aphrodite support 2023-09-28 19:10:00 +03:00
Cohee 01f14b461f Fix embedded lorebook depths 2023-09-25 20:11:16 +03:00
Cohee a081f78bd8 (WIP) PaLM API 2023-09-23 20:48:56 +03:00
city-unit cd1a8c9224 Quick and dirty stat re-creator button 2023-09-21 17:34:09 -04:00
kalomaze ad9382a98c
Custom --grammar support [for koboldcpp] (#1161)
* Basic kobold grammar implementation

This is probably jank as all hell, I don't write js, but I think I got it to work.

* No value by default

* Visual cleanup

+ reworded it a bit

* Conditionally enable Grammar based on version flag. Fix layout

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2023-09-21 15:21:59 +03:00
Cohee e3f760a9dd Add assistant postfix to converted ChatML => text completion prompts. 2023-09-20 21:50:14 +03:00
Cohee 11e7ca76e1 Use simpleGit to get app version 2023-09-17 14:27:41 +03:00
Cohee bfdd071001 Move tokenizer endpoint and functions to separate file 2023-09-16 18:48:06 +03:00
Cohee ab9aa28fe4 Move missed endpoints 2023-09-16 18:03:31 +03:00
Cohee 61995bb33f Move preset management into a separate file 2023-09-16 17:36:54 +03:00
Cohee 38b63b07f5 Extract sprite and custom content endpoints to a separate files. Update constants references 2023-09-16 17:28:28 +03:00
Cohee 4e1630c17d Extract endpoints for secrets and assets to separate files 2023-09-16 16:39:07 +03:00
Cohee 6e562bd1ff Extract server endpoints for thumbnails and extensions into separate files 2023-09-16 16:16:48 +03:00
Cohee 6dd09858d4 Don't remove names from the past chat. Fix non-streaming auto-continue.
We took fair criticism from the NovelAI dev.
2023-09-15 23:32:01 +03:00
Cohee eaca6ddaf0 Don't try to resolve unknown tiktoken models 2023-09-15 19:31:17 +03:00
Cohee 599904d589 Move NovelAI endpoints to separate file 2023-09-15 17:54:13 +03:00
Cohee 0f1a0963fd Merge branch 'release' into staging 2023-09-15 15:06:13 +03:00
Cohee 2b3055a84a Webp cards format is no longer supported 2023-09-15 14:56:15 +03:00
Cohee 0cc048cb64 Refactor transformers.js usage 2023-09-14 23:12:33 +03:00
Cohee 9fb4b3425e Costume subfolders 2023-09-14 19:12:54 +03:00
Cohee 52891898d2 Pass max length to Kobold GUI settings 2023-09-14 18:20:12 +03:00
Cohee ece34dc337 Move default files creation to post-install 2023-09-14 14:21:38 +03:00
Cohee 66ec17620f Move Horde and SD endpoints into separate files 2023-09-12 20:45:36 +03:00
Cohee f149fc9aaa Endpoint for local captioning pipeline 2023-09-11 04:47:14 +03:00
Cohee 74d627f674 Set default DNS resolution order to IPv4 first 2023-09-10 19:03:18 +03:00
Cohee 599261dc31 Set default DNS resolution order to IPv4 first 2023-09-10 19:02:58 +03:00
Cohee 4fdc533bd7 Change net workaround for node 20 2023-09-10 18:23:50 +03:00
Cohee d17ac770e6 Change net workaround for node 20 2023-09-10 18:22:39 +03:00
Cohee ec23356c99 Move translation endpoints into a separate file 2023-09-10 16:41:36 +03:00
Cohee 98cc969d18 Merge branch 'staging' into vectors 2023-09-10 16:06:15 +03:00
Cohee d81c94de0b Fix sort by date 2023-09-10 14:30:29 +03:00
Cohee e2e32da4e6 Unrestrict console logs display limit 2023-09-10 04:12:14 +03:00
Cohee 0480acebcd #1059 Mancer model selector 2023-09-10 04:08:32 +03:00
Cohee b605b940eb Replace transformers.js with patched version 2023-09-09 16:29:11 +03:00
Cohee 967a084aad (WIP) Local emotion classification pipeline 2023-09-09 15:14:16 +03:00
Cohee 42fd317188 Merge branch 'staging' into vectors 2023-09-08 16:41:26 +03:00
Cohee a5acc7872d Add OpenAI vector source. 2023-09-08 13:57:27 +03:00