Commit Graph

716 Commits

Author SHA1 Message Date
DreamGenX 5c410986a4 Add support for DreamGen API.
API docs: https://dreamgen.com/docs/models/opus/v1
API keys: https://dreamgen.com/account/api-keys

I decided to base this on the text-completion API since it's more
flexible with SillyTavern's prompt formating capabilities.

This also means that custom context and instruct settings are required.

Will add documentation in a followup PR.
2024-03-07 12:25:48 +01:00
Cohee 41e053c40d Fix case if message content is a string 2024-03-06 21:40:51 +02:00
khanonnie 0ba6a562cb
removes leftover debug log 2024-03-05 19:17:14 -06:00
khanonnie 8c273906bc
fixes inline images for Claude 3 when Add Character Names is enabled 2024-03-05 18:35:40 -06:00
Cohee 0a5f12ee31
Merge pull request #1897 from valadaptive/ai-horde-dependency
Un-vendor ai_horde
2024-03-05 21:22:16 +02:00
Cohee 4de9176f1a Fix captioning URL: base + '/messages' 2024-03-05 20:08:40 +02:00
based 3e1d44fc29 remove deprecated option + reverse proxy support in claude vision 2024-03-06 02:47:00 +10:00
valadaptive 4470e87ef9 Un-vendor ai_horde 2024-03-05 08:49:24 -05:00
based 94beaaa581 have to put something in here, claude doesn't like empty messages 2024-03-05 09:57:37 +10:00
based b6897af364 vision inlining 2024-03-05 08:41:57 +10:00
based 5f0bbcacf0 oops 2024-03-05 07:10:59 +10:00
based 64d9c9dc5d anthropic captioning 2024-03-05 07:07:38 +10:00
based ce7fbd5ef8 fix 'add character names' 2024-03-05 05:28:19 +10:00
based b8e8b0ac9e merge messages after system prompt handling (oopsie) 2024-03-05 05:01:36 +10:00
based 04bb882e90 implement messages api and selector for nuclaude models 2024-03-05 04:40:19 +10:00
based adba450752 Merge branch 'staging' of https://github.com/Cohee1207/SillyTavern into nuclaude 2024-03-05 03:15:28 +10:00
Cohee 112e8f224c Use alternate method of determining URLs, consolidate logs format 2024-03-03 16:45:26 +02:00
Bronya-Rand 668d1f0fb9 feat: add `importUUID` API to get Pyg/Janny/Chub bots without link 2024-03-03 03:31:39 +00:00
Cohee 59db5abaef Fix comment 2024-03-02 23:18:34 +02:00
Cohee b490978142 Refactor vector models code 2024-03-02 23:16:18 +02:00
Kristan Schlikow adfb9c5097
Implement TogetherAI as vectorization provider 2024-03-01 23:52:49 +01:00
Cohee 29c4334c46 #1859 Set keep_alive for ollama 2024-02-26 21:09:21 +02:00
based 617ae7d02c ??? 2024-02-27 01:42:22 +10:00
Cohee f962ad5c02 Add OpenRouter as a text completion source 2024-02-25 22:47:07 +02:00
Cohee 3441667336 #1853 Add WI/Script link by entry automation id 2024-02-24 17:22:51 +02:00
Cohee dab9bbb514
Merge pull request #1844 from infermaticAI/InfermaticAI
Add InfermaticAI as a text completion source
2024-02-24 14:28:09 +02:00
Cohee 737a0bd3ae Fix purge extras and mistral vectors 2024-02-23 22:37:00 +02:00
Cohee cb536a7611 Save a list of safe to export secret keys 2024-02-23 21:41:54 +02:00
NWilson f82740a238 Change Non-streaming Handler 2024-02-22 15:51:11 -06:00
berbant bc2010a762
Update secrets.js 2024-02-22 23:55:57 +04:00
NWilson f569424f3e Merge branch 'staging' into InfermaticAI 2024-02-22 08:32:10 -06:00
Cohee beb5e470a2 #1069 Fix hoisting of pristine cards in newest sort 2024-02-22 04:48:46 +02:00
Cohee fb6fa54c7f Fix import fetch HTTP method 2024-02-21 19:57:38 +02:00
Cohee 92af4137a9 Use new export endpoint 2024-02-21 11:28:59 +02:00
Cohee 711fd0517f Merge branch 'staging' into pygimport 2024-02-21 11:26:47 +02:00
NWilson 7c12c836f2 Implement Key Filter 2024-02-20 09:40:35 -06:00
NWilson 030806bf1e Merge remote-tracking branch 'origin/staging' into InfermaticAI 2024-02-19 10:14:06 -06:00
NWilson e55d903613 Support more settings 2024-02-19 09:53:26 -06:00
NWilson 90d5fbc182 Fix non streaming 2024-02-19 09:46:56 -06:00
Cohee 3c2113a6e7 Add ability to preserve file names when loading from assets downloader 2024-02-19 00:17:23 +02:00
Cohee 0391179c3c Remove HTTP/2 workaround for pygsite 2024-02-17 17:04:37 +02:00
Cohee c20a9fb5f5 Add HTTP/2 workaround for pygsite import 2024-02-17 03:52:45 +02:00
Cohee 02a2e26e2b Merge branch 'staging' into pygimport 2024-02-17 02:23:18 +02:00
Cohee b072057594 [skip ci] Code format 2024-02-16 20:44:54 +02:00
Cohee c06fe6abfc Add character asset type 2024-02-16 20:42:56 +02:00
Cohee 7fbef32869 Use uuid extraction from Pygsite URL 2024-02-16 20:24:06 +02:00
NWilson c6c73fedad Key Fix 2024-02-16 10:23:26 -06:00
Cohee c8b0030f6e Extract PNG read/write methods 2024-02-16 18:03:56 +02:00
NWilson 8075e4cd1e Changes 2024-02-16 09:07:06 -06:00
NWilson b5887960b6 Merge branch 'release' into InfermaticAI 2024-02-16 08:53:04 -06:00
berbant 187ecc2046
Update chat-completions.js
This fix will let SillyTavern show up in the Activity List and App Showcase List (app rankings) on openrouter.ai with the right name and the correct link. Right now, all the requests from ST on their end look like 'http://127.0.0.1:'.
2024-02-15 16:14:33 +04:00
Cohee 6b669bbc22 #1809 Add gitkeep to user 2024-02-10 21:15:59 +02:00
Cohee 18f84979f2 Use SSE streaming for MakerSuite 2024-02-10 02:43:50 +02:00
Cohee 58c3d3eb7f Use ooba API key in multimodal request 2024-02-07 19:31:38 +02:00
Cohee c3129da879 [skip ci] Lint fix 2024-02-07 19:28:34 +02:00
oobabooga b95cddec1c Remove debug statement 2024-02-06 20:03:52 -08:00
oobabooga 21fb143718 Add API key 2024-02-06 20:00:16 -08:00
anon 634c9aad3b add logsprobs support for custom OpenAI APIs 2024-02-04 23:11:45 +00:00
Cohee bdf7602fab Add SpeechT5 TTS provider 2024-02-04 20:31:20 +02:00
Cohee 7ac6ed267f #1782 OpenAI multiswipe 2024-02-04 03:36:37 +02:00
Cohee 2f3dca2348 Add endpoint for transformers.js TTS 2024-02-02 01:51:02 +02:00
Cohee 10d78f9a25 Aphrodite tokenizer 2024-02-02 01:09:03 +02:00
Cohee 4b845dd442 Add backend for transformers.js whisper 2024-02-02 00:36:40 +02:00
Cohee 695b438c0d Split vector batches into 10s 2024-02-01 11:02:47 +02:00
Cohee 3712752309 Lint fix. Add missing URL handling. 2024-01-31 22:38:50 +02:00
Cohee 6d3a42d0a8
Merge pull request #1770 from berbant/patch-3
Lingva Patch 3
2024-01-31 22:32:27 +02:00
Cohee 5f159e7c6d
Merge pull request #1769 from berbant/patch-2
Lingva Patch 2
2024-01-31 22:32:08 +02:00
Cohee a3de917ca2 Update v1 tags field to get rid of console nag 2024-01-31 21:59:04 +02:00
berbant 623e2b99ce
Update secrets.js
Added new translateProvider: Lingva Translate
2024-01-31 22:50:00 +04:00
berbant 11d3211839
Update translate.js
Added new translateProvider: Lingva Translate
2024-01-31 22:47:14 +04:00
Cohee 5a2dad48f2 LibreTranslate zh-CN aliased 2024-01-31 14:37:26 +02:00
Cohee da7b435b7c
Merge pull request #1751 from kingbased/proxypreset
Reverse proxy presets
2024-01-29 22:09:33 +02:00
based ee7ee9f60a merged mistral proxy support 2024-01-27 06:26:23 +10:00
Cohee a3e3185220 Prettyprint exported character JSONs 2024-01-26 18:46:32 +02:00
Cohee cb32e28b82 Allow multiple stop strings for TogetherAI 2024-01-26 17:40:20 +02:00
Cohee 1647e5ae49
Merge pull request #1734 from khanonnie/alternative-tokens
Implement Token Probabilities UI panel using logprobs
2024-01-26 03:39:25 +02:00
khanon 60044c18a4 Implement Token Probabilities UI using logprobs 2024-01-25 18:34:46 -06:00
Cohee 5185752662
Merge pull request #1746 from Makosful/release
Iterate over textChunks to find character data
2024-01-26 01:22:09 +02:00
Cohee 19c3b3016c Handle edge case when no chara chunk 2024-01-26 01:14:12 +02:00
Vornir Jotunn 84a21fba27 fix: Iterate textChunks to find character data 2024-01-25 21:01:09 +01:00
Cohee aa1d2a7260 Fix promisify warning 2024-01-25 21:37:42 +02:00
Cohee 0ad756c923 Add check for "embeddings" module. 2024-01-24 16:51:57 +02:00
Juha Jeronen 62170afd03 fix presentation 2024-01-24 16:14:42 +02:00
Juha Jeronen 6c8eff0544 Meh once more - use the name suggested in the review. 2024-01-24 16:08:38 +02:00
Juha Jeronen bf3470411d Meh, once more. Maybe better this way? 2024-01-24 16:04:29 +02:00
Juha Jeronen 915c238510 fix it correctly... 2024-01-24 16:03:04 +02:00
Juha Jeronen 91a688ee7f oops, bug 2024-01-24 16:02:51 +02:00
Juha Jeronen 71344720d2 fix as per review 2024-01-24 16:02:08 +02:00
Juha Jeronen 0a07161cf8 support batch mode for Extras backend too 2024-01-24 15:48:14 +02:00
Juha Jeronen a1c7e2918b Merge branch 'staging' into vectordb-with-extras 2024-01-24 15:48:01 +02:00
Juha Jeronen 8b43535352 Initial support for Extras vectorizer, for Vector Storage 2024-01-24 15:16:55 +02:00
NWilson f29f934c6b Progress 2024-01-24 06:59:27 -06:00
Cohee cfdf43a26e #1671 Add batch vectorization 2024-01-24 13:56:13 +02:00
Cohee 8a69f63044 #1727 Add per entry WI setting overrides 2024-01-23 22:44:20 +02:00
Cohee 107fe85543 Add OpenRouter filtered reason display 2024-01-23 00:10:53 +02:00
Cohee e2becdf7a9 Add typedefs for TTS audioJob 2024-01-21 15:19:13 +02:00
Tony Ribeiro 5b201bce7a
Merge branch 'SillyTavern:staging' into staging 2024-01-19 09:26:28 +01:00
Cohee 0b322c0e3d Add repetition penalty control for OpenRouter 2024-01-18 23:55:09 +02:00
Tony Ribeiro baab494ed4
Merge branch 'SillyTavern:staging' into staging 2024-01-16 00:15:13 +01:00
Cohee d592e26e24 Fix conditional access 2024-01-14 19:40:12 +02:00
Cohee f4c7fff8c0 Mistral API got fixed 2024-01-12 18:17:43 +02:00
Cohee 397acbb699 Mistral API being weird, part 2 2024-01-12 17:40:29 +02:00
Cohee e33ac6a78a Add min_p and top_a for OpenRouter 2024-01-12 17:15:13 +02:00
maver a86d3104d6 Add text adventure stop token to NAI 2024-01-11 20:14:32 +01:00
maver 79755c2edf Add horizontal lining to bad words for NAI 2024-01-11 19:51:15 +01:00
Cohee 706acbd514 MistralAI monkey patch 2024-01-11 15:59:00 +02:00
Cohee bc0aee4212 Fix embedded WI being replaced with dummy object when importing a file from someone else's ST instance 2024-01-08 20:15:43 +02:00
Cohee c92b91604b Save flag to character WI 2024-01-07 19:05:35 +02:00
Tony Ribeiro 72d78fbe96 Add VRM import map and assets endpoint. 2024-01-05 07:00:23 +01:00
Cohee 9b24e7dc67
Merge pull request #1596 from DonMoralez/staging
added exclude prefixes, modified sequence checker
2024-01-01 23:33:58 +02:00
Cohee b315778e32 Chunkify NovelAI TTS 2024-01-01 21:31:08 +02:00
Cohee f53d937782 Fix mistral undefined name 2024-01-01 18:31:17 +02:00
based 42aa7fd316 mistral proxy support 2023-12-31 06:21:40 +10:00
based e7b6738fe8 merge 2023-12-31 05:04:37 +10:00
DonMoralez e0a84b0a56 reworked name assignment a bit 2023-12-26 13:45:39 +02:00
DonMoralez 3ac971b145 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-24 13:31:21 +02:00
Cohee a8fb306c12 Add multimodal captioning for ooba 2023-12-24 01:43:29 +02:00
Cohee 88993bd3e8 Add check for server plugin id clash 2023-12-24 00:00:20 +02:00
DonMoralez 18e6a82306 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-23 20:06:55 +02:00
Cohee fd373fb821 Use file URL for import 2023-12-23 19:46:32 +02:00
Cohee ea85cfcbdd Plugin cleanup and validation fixes 2023-12-23 19:03:13 +02:00
Cohee 437a6c1f40 Merge branch 'staging' into plugin-router 2023-12-23 18:39:18 +02:00
Cohee 69509925c4 #1584 Chinese language codes Deepl 2023-12-23 18:37:30 +02:00
DonMoralez 95eacacfec Update prompt-converters.js 2023-12-23 00:37:28 +02:00
DonMoralez 6fb69d5929 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-23 00:25:57 +02:00
DonMoralez 6f163bd09c Modified exclude prefixes 2023-12-23 00:25:48 +02:00
Cohee b7a338e130 Move all Horde requests to server 2023-12-22 22:10:09 +02:00
DonMoralez e95482aea1 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-22 17:12:59 +02:00
DonMoralez ee06a488b0 Add exclude prefixes checkbox, modified sequence checker 2023-12-22 17:04:58 +02:00
LenAnderson f862ffafd2 add option in config.yaml to use png for avatar thumbs 2023-12-22 14:23:50 +00:00
Cohee 9cf6cef0a4 Fix aborting generation on KoboldCpp via Text Completion 2023-12-21 23:14:28 +02:00
Cohee b782a8cc03 Add util for trim v1 2023-12-21 22:40:08 +02:00
Cohee 09fd772a20 #1579 Add ooba character yaml import 2023-12-21 21:46:09 +02:00
Cohee 343c33e331 Stricter Horde prompt sanitation 2023-12-21 20:22:21 +02:00
Cohee ffb711d802 Unify Claude request logging with other API sources 2023-12-21 16:59:43 +02:00
Cohee b5e59c819c Merge branch 'staging' into claude-rework 2023-12-21 16:52:43 +02:00
Cohee e087f29496 Log MistralAI prompts to server console 2023-12-21 16:08:58 +02:00
Cohee 3001db3a47 Add additional parameters for custom endpoints 2023-12-20 23:39:10 +02:00
Cohee ae64c99835 Add custom caption source 2023-12-20 21:05:20 +02:00
Cohee 5734dbd17c Add custom endpoint type 2023-12-20 18:29:03 +02:00
Cohee 4b131067e4 Add local multimodal caption sources 2023-12-20 00:45:45 +02:00
Cohee da1e9cb3b2 Use const where possible 2023-12-19 19:48:42 +02:00
Cohee a78875ca08 Use native color util 2023-12-19 19:47:23 +02:00
Cohee 423c2b70dc Camel case variable name 2023-12-19 19:44:52 +02:00
Cohee 6859e4443e Fix ollama chunk wrapper 2023-12-19 19:17:19 +02:00
Cohee 44318fef22 Fix double logging of non-streamed replies 2023-12-19 16:49:21 +02:00
Cohee 67dd52c21b #1309 Ollama text completion backend 2023-12-19 16:38:11 +02:00
Cohee edd737e8bd #371 Add llama.cpp inference server support 2023-12-18 22:38:28 +02:00
DonMoralez 37807acc60 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-18 22:01:38 +02:00
based cc27bcb076 UNRELATED: this never happened. 2023-12-18 15:01:45 +02:00
Cohee ac70a0a592 Add TogetherAI for image generation 2023-12-18 03:33:05 +02:00
DonMoralez 79ed01f4b0 Update chat-completions.js 2023-12-18 02:44:11 +02:00
DonMoralez 58227b82fc Update prompt-converters.js 2023-12-18 02:32:25 +02:00
DonMoralez 1df9e628bd Merge remote-tracking branch 'upstream/staging' into staging 2023-12-18 02:25:52 +02:00
DonMoralez 50ece13752 Add restore button, def hum message, claude check 2023-12-18 02:25:17 +02:00
Cohee b0d9f14534 Re-add Together as a text completion source 2023-12-17 23:38:03 +02:00
Cohee 180061337e Merge branch 'staging' into anachronous/release 2023-12-17 21:35:49 +02:00
DonMoralez 7835a1360f Merge remote-tracking branch 'upstream/staging' into staging 2023-12-17 19:46:47 +02:00
Cohee c7c1513e91 Add proxy support for multimodal captions. Add caption pre-prompt 2023-12-17 19:41:20 +02:00
valadaptive 0162d54e5b Always use async import()
import() works with CommonJS and ESM modules, so we don't need two
different code paths.
2023-12-17 12:29:54 -05:00
valadaptive 7ae0e05946 Allow plugins to specify "exit" functions 2023-12-17 12:26:34 -05:00
valadaptive 4fcb7b5ea4 Rework plugin loading
Plugins must now provide an `info` export which includes their ID, name,
and a description (I'm flexible on the last two). The ID is used for the
API route--all plugin-registered API routes will be accessed through
`plugins/[plugin ID]`.
2023-12-17 12:21:05 -05:00
DonMoralez 27a25e1298 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-17 13:52:49 +02:00
anachronos 1e88c8922a
Merge branch 'staging' into release 2023-12-17 10:38:04 +01:00
based 5e086321d0 Merge remote-tracking branch 'fork/mistral' into mistral 2023-12-17 11:21:03 +10:00
based 73828062db fix for sys prompts 2023-12-17 11:19:29 +10:00
Cohee 2d8a62d059 Refactor openai vectors 2023-12-17 02:56:47 +02:00
Cohee b1f07eb989 lint: format 2023-12-17 02:49:14 +02:00
Cohee a62122a7d7 Merge branch 'staging' into mistral 2023-12-17 02:41:29 +02:00
Cohee 940f701691 Don't try to load directories as files 2023-12-17 01:23:28 +02:00
Cohee 16795dd5cc Add server plugin loader 2023-12-16 22:21:40 +02:00
Fayiron 0a9f678399 Remove togetherai.js 2023-12-16 17:09:09 +01:00
Fayiron 80e82171c1 Add support for multiple OpenAI compatible endpoints 2023-12-16 17:06:52 +01:00
Fayiron 7b0ecd3e61 more stuff 2023-12-16 15:17:03 +01:00
DonMoralez 125d2997db Add prefixes sequence check for claude 2023-12-16 14:12:06 +02:00
DonMoralez d19cc7ee36 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-16 14:06:25 +02:00
based 60e1d10263 add fallback error for /status 2023-12-16 12:08:34 +10:00
Cohee b569d74552 Configurable auto-mode delay 2023-12-16 02:52:48 +02:00
based f16ac8686e just incase 2023-12-16 09:50:10 +10:00
based 47357da20c comment 2023-12-16 09:45:31 +10:00
based af059a6af6 more last prompt fixes + added an svg 2023-12-16 09:44:47 +10:00
based 65fa333513 last role fix. wtf mistral...jbs le over? 2023-12-16 09:08:05 +10:00
based e8ca2e8c22 Merge branch 'staging' of https://github.com/Cohee1207/SillyTavern into mistral 2023-12-16 08:48:37 +10:00
based 5dd2e8cd88 added mistral vector support (off the back of oai's) 2023-12-16 08:37:39 +10:00
based c517483141 added mistral chat completion 2023-12-16 08:27:40 +10:00
DonMoralez 6b59014892 (Fix) "squash sys. messages" processed empty messages, adding \n 2023-12-16 00:24:48 +02:00
DonMoralez 1f36a3eaae Merge remote-tracking branch 'upstream/staging' into staging 2023-12-16 00:15:16 +02:00
based 583f786d74 finish mistral frontend integration + apikey status check 2023-12-16 07:15:57 +10:00
Cohee 7dfa989e4c Bail early from key iteration 2023-12-15 22:13:02 +02:00
Cohee 9d1b563d48 Add cache for parsed characters 2023-12-15 22:11:48 +02:00
Cohee 63484ef40b #1542 Skip system messages in TXT export 2023-12-15 21:41:16 +02:00
DonMoralez d061c830c2 Update prompt-converters.js 2023-12-15 20:58:03 +02:00
DonMoralez 04f3aa8b66 Update prompt-converters.js 2023-12-15 20:15:48 +02:00
DonMoralez d6e5ceaf93 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-15 20:15:29 +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
DonMoralez 10fb83ee53 Merge remote-tracking branch 'upstream/staging' into staging 2023-12-15 13:12:15 +02:00
DonMoralez d71b5430ad Update prompt-converters.js 2023-12-15 13:10:53 +02:00
valadaptive 0ee19d2ede Set background client-side 2023-12-15 05:45:21 -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
Cohee f93e40b1d3
Merge pull request #1533 from kingbased/gemini
Better Google Makersuite/AI adapter + Gemini Pro & Vision Support & tokenizers
2023-12-14 22:42:30 +02:00
Cohee cde9903fcb Fix Bison models 2023-12-14 22:18:34 +02:00
DonMoralez 2ebc168505 Update prompt-converters.js 2023-12-14 21:36:13 +02:00
Cohee eec28469f8 Fix server crash if multimodal prompt contains no image 2023-12-14 21:21:37 +02:00
DonMoralez 2858e095a8 Update chat-completions.js 2023-12-14 21:07:52 +02:00
DonMoralez 84a94b37e1 Revert "Update chat-completions.js"
This reverts commit 54dd3799e8.
2023-12-14 20:55:20 +02:00
DonMoralez 54dd3799e8 Update chat-completions.js 2023-12-14 20:42:08 +02:00
Cohee bb8b8f9386 Fix sending PNG/WEBP to Google captioning 2023-12-14 20:36:31 +02:00
DonMoralez 6f16ccf01f Merge branch 'staging' of https://github.com/DonMoralez/SillyTavern into staging 2023-12-14 20:17:41 +02:00
Cohee d1be9d5347 Fix JSDoc + lint + readability 2023-12-14 20:05:27 +02:00
Cohee 47c71a62f3 Don't rewrite settings if just moving the key 2023-12-14 19:58:27 +02:00
Cohee d4f96020f2 Migrate Palm secret key, fix vector source key access 2023-12-14 19:33:23 +02:00
Cohee 68bb616be3 Merge branch 'staging' into cleanup-sampler-order 2023-12-14 18:32:30 +02:00
based 5071b9a369 webstorm moment 2023-12-15 02:01:42 +10:00
based 60880cfd4d merge 2023-12-15 01:39:12 +10: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 38a34bf1d5 Fix silly argument naming 2023-12-14 17:14:05 +02:00
Cohee 00687a9379 Merge branch 'staging' into separate-altscale-endpoints 2023-12-14 17:12:19 +02:00
Cohee 40e15f5762 Fix conditional access to Palm response body 2023-12-14 16:18:10 +02:00
Cohee 2a5340232d Move prompt converters to a separate module. Camelcase local variables and add missing JSDocs. 2023-12-14 16:00:17 +02:00
Cohee 348253fd98 Fix import path 2023-12-14 15:36:44 +02:00
based 178b07f414 cleaned up a little 2023-12-14 23:18:56 +10:00
based 0b7c1a98cd added google vision caption support 2023-12-14 22:37:53 +10:00
valadaptive 0f25d51a53 Send Kobold sampler order as an array 2023-12-14 02:03:36 -05:00
based 3e82a7d439 tokenizer changes and fixes. + a toggle 2023-12-14 16:31:08 +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
based be396991de finish implementing ui changes for google models 2023-12-14 11:53:26 +10: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 dba66e756a Move chat completions API endpoints to module 2023-12-13 18:53:22 -05:00
Cohee 796659f68c Add proper fetch import 2023-12-14 01:39:34 +02:00
Cohee 0cd92f13b4 Merge branch 'staging' into separate-kobold-endpoints 2023-12-14 01:33:36 +02:00
Cohee cebd6e9e0f Add API token ids from KoboldCpp 2023-12-14 01:28:18 +02:00
DonMoralez fec27820ff (claude)reworked prefix assignment, sysprompt mode, console message display 2023-12-13 21:19:26 +02:00
Cohee 0d0dd5e170 Revert old comment 2023-12-13 02:50:50 +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 35c2f8bf66 Move text completions API endpoints to own module 2023-12-12 16:41:16 -05:00
Cohee 2ca9015a5f Add filters to serpapi/visit 2023-12-12 03:56:36 +02:00
Cohee 299749a4e7 Add prerequisites for websearch extension 2023-12-12 01:08:47 +02:00
Cohee dbd52a7994
Merge pull request #1482 from valadaptive/sse-stream
Refactor server-sent events parsing
2023-12-10 18:32:19 +02:00
Cohee b107ace719 Avoid sending 401 in forwarded responses.
Status code 401 resets the client Basic auth, so we replace it with 400. This can produce an interesting artifact as "400 Unauthorized", but it's not out of spec.

"The reason phrases listed here are only recommendations -- they can be replaced by local equivalents or left out altogether without affecting the protocol."

https://www.rfc-editor.org/rfc/rfc9110.html#name-overview-of-status-codes
2023-12-10 18:00:04 +02: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 04e92efe29 Move API tokenization endpoint into /tokenizers
Requires extracting some more functions out of server.js.
2023-12-09 19:35:49 -05:00
Cohee 44ac2ca4e6 Avoid returning 401 as API response code 2023-12-09 15:11:35 +02:00
valadaptive 055d6c4337 Properly forward status codes from streams 2023-12-07 18:06:17 -05:00
valadaptive c0a7472fe9 Move background file instead of copying+deleting 2023-12-07 15:28:04 -05:00
valadaptive e7dce9b107 Remove response_dw_bg 2023-12-07 15:24:05 -05:00
valadaptive 32c86c1e95 Move backgrounds endpoints into separate file 2023-12-07 15:24:05 -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 bf2b59279b Move worldinfo endpoints into separate file 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 e870c35613 Move chat endpoints into separate file 2023-12-06 19:59:32 -05:00
valadaptive 9c850b0b0c Fix double file extension on uploaded images 2023-12-06 17:29:10 -05:00
valadaptive 66da13b1bb Use withFileTypes instead of stat'ing each file 2023-12-06 17:22:37 -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 795ca2247b Return filename validation messages 2023-12-06 17:22:37 -05:00
valadaptive 41d427f4a8 Move sanitize call inside validation function
Also rename it (again) to validateAssetFileName.
2023-12-06 16:46:52 -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 d0a35deeec Fix OpenAI presets extension 2023-12-06 21:46:08 +02:00
Cohee 60909cef1f Fix server crash on import. Fix possible undefined warning 2023-12-06 01:02:48 +02:00
valadaptive 4faa20bb1f Remove "upload" endpoint from assets API
I accidentally reintroduced this when splitting up the commits, I think
2023-12-05 15:02:30 -05:00
valadaptive c00df4f45b Clean up file name sanitization
- Checking for null bytes is unnecessary because the check for illegal
characters directly below it will catch them.
- We can use the path.extname method to get the file extension more
cleanly. It returns the *last* extension (e.g.
path.extname('file.foo.js') === '.js'), so behavior is preserved.
- Normalizing the path is unnecessary. We don't allow any path
separators in the file name, so it does nothing.
- Stripping '..', path separators, and '$' is unnecessary because of the
earlier illegal character check.
2023-12-05 09:25:45 -05:00
valadaptive a457484c2d Move character endpoints into their 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 aff821aa07 Fix discovery endpoint route 2023-12-04 21:54:03 +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