Commit Graph

425 Commits

Author SHA1 Message Date
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
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