Commit Graph

110 Commits

Author SHA1 Message Date
Cohee 4d1619ba47 Chore: enable brace-style eslint check (#5159)
* eslint: enable brace-style check

* Fix jsdoc and color

* fix: correct CSS color syntax in CreateZenSliders function
2026-02-15 01:46:32 +02:00
Cohee 7e410b4aa8 Retry API tokenization on reconnecting to backend
Fixes #5004
2026-01-14 02:16:56 +02:00
Ben 55a07d445d Chutes integration (#4844)
* Chutes integration

* Fix eslint

* Fix key saving

* Fix logo coloration

* Fix tool checks

* Unhide image inlining controls

* Fix order of options

* Fix type use in TTS extension script

* Add Chutes as a vector storage source

* Change log levels to debug

* Fix streamed reasoning parsing

* Skip remote models update

* TTS: Fix API key highlight

* Sort image models A-Z

* TTS: Fixes

* Remove unused SD endpoint

* Skip setting context size if models list is not yet loaded

* remove chutes quota / balance

* Fix: streamed tool calling

* Hide reasoning effort control

* Add image request debug log

* Fix: scroll down on media load in extensions

* Unhide some samplers

* Bring back reasoning effort

* This code will never execute

* Reformat else if cases

* Add stop strings to request

* Remove conditional from reasoning_effort body param

* Preserve original pricing fields

* Unhide logit bias setting

* Pass repetition penalty and logit bias to backend

* Swap llama tokenizer for llama3

* Pass min_p, remove supported_sampling_parameters checks

* Enable logprobs

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-12-01 00:17:49 +02:00
Ngo Dinh Gia Bao 07a4007363 feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Se… (#4528)
* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* Update public/scripts/extensions/tts/electronhub.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update public/scripts/openai.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update public/scripts/openai.js

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* feat: [Electron Hub] Added Text-to-Speech, Prompt cost, Sort/Group/Search for model list

* feat: [Electron Hub] Show model capabilities

* Support logit_bias

* Small tweaks

* Added tokenizer selection logic

* Added tokenizer selection logic

* Fixed ESLint

* Small tweaks

* Split localization tags

* Fix formatting

* Refactor icons, add tool icon

* Support newer oai model tokenizers

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-16 22:22:27 +03:00
nfuller286 1147507d06 feat: Add Azure OpenAI chat completions provider (#4456)
* feat: Add Azure OpenAI chat completions provider

This commit introduces comprehensive support for integrating Azure OpenAI as a new chat completion source within SillyTavern. The implementation specifically navigates Azure's reliance on deployment names, differing from standard model selection.

Includes:

- **New Feat / UI:** Dedicated settings in `public/index.html` for Azure parameters (Base URL, Deployment Name, API Version, API Key) and a new `public/img/azure_openai.svg` icon.
- **Frontend Logic (`public/scripts/openai.js`):** Manages Azure OpenAI settings and dynamic URL generation. The 'Connect' button triggers a `GET /models` endpoint call solely for API configuration validation (key, URL, version). Upon successful validation, a subsequent `POST` request is made to the AI, and the active model is extracted from its response payload, then populated for UI display (no direct user model selection).
- **Backend Logic (`src/endpoints/backends/chat-completions.js`):** Implements `sendAzureOpenAIRequest` to proxy requests, handling Azure’s unique authentication and URL structures. Enhanced the `/status` endpoint for Azure-specific validation.
- **Secret Management:** Secure handling of Azure OpenAI API keys in `public/scripts/secrets.js` and `src/endpoints/secrets.js`.
- **Autoconnect:** `public/scripts/RossAscends-mods.js` modified to enable automatic connection for Azure OpenAI if an API key is present.

Impact:
- Users can now connect to and utilize Azure OpenAI services.
- Requires new configuration details in the UI.
- Enhances API routing and validation with Azure-specific behavior.
- Navigates model handling: model name is *derived dynamically* from AI response, not directly selected, aligning with internal SillyTavern structure.

* fixed the html issues, openai.ujs and secrets.js

	modified:   public/index.html#
    modified:   public/scripts/openai.js
	modified:   public/scripts/secrets.js

* Extends Azure OpenAI with advanced capabilities

Enables advanced features such as function calling, image inlining, and model reasoning in the UI for Azure OpenAI.

Refactors the backend to support structured output (JSON mode), native thinking, and reasoning effort for compatible Azure OpenAI models. Adds support for logprobs, multiple responses (`n`), and seed, aligning with standard OpenAI behavior.

Improves request handling with a retry mechanism for rate limits and more robust error reporting. Ensures correct parameter handling for model-specific features and conflicts, such as when native thinking is enabled. Optimizes the Azure OpenAI status probe for efficiency.
	modified:   public/index.html
	modified:   public/scripts/openai.js
	modified:   src/endpoints/backends/chat-completions.js

* PR fixes
Simplification
Removed reasoning logic from backend
	modified:   src/endpoints/backends/chat-completions.js

	modified:   src/endpoints/backends/chat-completions.js

* Fix PR comments
Removed the front end compiled url UI element and related.
Misc simplifications
	modified:   public/index.html
	modified:   public/scripts/openai.js
	modified:   src/endpoints/backends/chat-completions.js

* Fixed accidental api temporary disabled
	modified:   public/index.html

* Don't transfer status code verbatim

* Fix formatting

* Enable tool calling

* Fix logo coloration

* Move model arrays to shared constants

* Fix capitalization

* Remove obsolete comment

* Improve response schema parameter format

* Fix tokenizer model selection

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-09-10 11:44:30 +03:00
Cohee 086f873f2f Deprecate 01.ai chat completion source (#4327) 2025-07-28 21:29:01 +03:00
Cohee d641cbecc4 Remove Scale Spellbook from CC sources (#4293) 2025-07-24 22:02:45 +03:00
Cohee 7429726eb1 Remove Window AI from CC sources (#4294) 2025-07-22 19:45:54 +03:00
Cohee e0469b4808 Move Kobold Classic settings into related module (#4234)
* Move Kobold Classic settings into related module

* Update public/scripts/kai-settings.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-05 21:00:06 +03:00
NijikaMyWaifu 157315cd68 Add Vertex AI express mode support (#3977)
* Add Vertex AI express mode support
Split Google AI Studio and Vertex AI

* Add support for Vertex AI, including updating default models and related settings, modifying frontend HTML to include Vertex AI options, and adjusting request processing logic in the backend API.

* Log API name in the console

* Merge sysprompt toggles back

* Use Gemma tokenizers for Vertex and LearnLM

* AI Studio parity updates

* Add link to express mode doc. Also technically it's not a form

* Split title

* Use array includes

* Add support for Google Vertex AI in image captioning feature

* Specify caption API name, add to compression list

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-05-22 20:10:53 +03:00
equal-l2 2a31f6af2d Remove Block Entropy references
Block Entropy shut down their service at the end of 2024.
2025-03-28 00:47:30 +09:00
bmen25124 fdcff7a7f0 Fixd "model.id" check 2025-03-13 22:25:20 +03:00
bmen25124 a77f4045f8 Added command-a-03-2025 and command-a tokenizer 2025-03-13 21:16:08 +03:00
Cohee 9b631ed048 Support Qwen tokenizer fro Groq 2025-02-22 14:29:04 +02:00
Cohee 6e5db5c41a Perplexity: Add new models 2025-02-21 23:03:49 +02:00
Cohee 15a3cfcb8a Perplexity: Add reasoning model, remove deprecated models 2025-01-29 20:57:38 +02:00
Cohee fc4fecf0fd Add model hash to TC API tokenizer cache key 2025-01-02 23:49:22 +02:00
Cohee 40b05bb6b1 Add best match tokenizer logic for DeepSeek and Nemo 2025-01-02 23:22:53 +02:00
Succubyss 97dc041777 Revert MANUAL_SELECTION
This partially reverts commit c89804677a (keeps the turbo-0301 removal).
2024-12-31 11:18:43 -06:00
Cohee 4c7d160d41 DeepSeek
Closes #3233
2024-12-29 20:38:13 +02:00
Succubyss c89804677a tokenizers.js: add MANUAL_SELECTION (& removes turbo-0301 lines) 2024-12-24 16:45:35 -06:00
Cohee 77841dbc21 Add types for SillyTavern.getContext 2024-12-06 16:41:26 +02:00
Cohee 1c4e87b25b unvendor: Replace localforage 2024-10-16 23:37:54 +03:00
Cohee 24884b3206 TextGenWebUI: remove legacy API mode 2024-10-15 00:32:56 +03:00
Cohee 182756fcb2 Erato (#2896)
* Erato
erato
2024-09-24 03:10:31 +03:00
Cohee 93bf87b035 Shut tokenization errors if not using ooba
Closes #2849
2024-09-22 17:44:19 +03:00
Cohee 8c5b02d2ea Silently redirect tokenization to the next matching tokenizer 2024-09-22 17:25:56 +03:00
Cohee a782dcec33 Add Mistral Nemo downloadable tokenizer 2024-09-19 00:10:22 +03:00
Cohee 0207794a2b Fix Qwen and Command tokenizers not used for logit bias 2024-09-17 13:01:19 +00:00
Cohee 2478e17164 Remove legacy API for Aphrodite 2024-09-15 08:05:53 +03:00
Cohee 81251b073a Implement downloadable tokenizers
Closes #2574, #2754
2024-09-06 16:28:34 +00:00
Cohee 5fc16a2474 New AI21 Jamba + tokenizer 2024-08-26 12:07:36 +03:00
AlpinDale 62fed2ff6a fix: pass model parameter for aphrodite tokenizer 2024-08-24 22:43:20 +00:00
Wolfsblvt b68969ee3b Small update to enum display + consistency 2024-08-19 20:18:44 +02:00
Eugén Cowie 62818055af Get available tokenizers from UI 2024-08-19 15:51:11 +01:00
Eugén Cowie 5f92b8a09e Add slash command to set tokenizer 2024-08-19 00:39:15 +01:00
Cohee e707def7dd Add tokenizer for Gemma/Gemini 2024-08-16 00:00:43 +03:00
Edward Kim b9857eb315 Added block entropy endpoints for chat and image 2024-08-08 00:08:03 -04:00
Cohee 6bdbe7299f Merge branch 'staging' into vllm-tc 2024-07-06 11:18:38 +03:00
Cohee cf56bfb6a9 Add 01.AI as a chat completion source 2024-06-28 00:51:09 +03:00
sasha0552 6c87dfe10d Add a token counting endpoint for vLLM 2024-06-26 13:34:02 +00:00
daiaji 66454bb711 Add reverse proxy support to Google MakerSuite to allow some Google MakerSuite URLs to no longer be hardcoded with domain names. (#2307)
* Add reverse proxy support to Google MakerSuite.

* Remove hardcoded URLs for some Google MakerSuite API calls.

* Don't send real key to alt.endpoint

* Fix for image captioning

* Fix key validation

* +fix key check for mistral

* Fix caption key validation

* Fix tokenization endpoint use

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2024-05-24 21:38:29 +03:00
Cohee 181b5aff97 Add Groq as chat completion source 2024-05-05 18:53:12 +03:00
Cohee 7bfd666321 Add llama 3 tokenizer 2024-05-03 23:59:39 +03:00
Cohee 2a2a63c52c Add Perplexity as Chat Completion source 2024-04-20 00:09:38 +03:00
Cohee 1c4bad35b2 #2085 Implement async token counting 2024-04-13 21:05:31 +03:00
Cohee 2cdfda9d69 Actually use getCurrentDreamGenModelTokenizer 2024-03-08 08:40:03 +02:00
Cohee f962ad5c02 Add OpenRouter as a text completion source 2024-02-25 22:47:07 +02:00
Cohee 10d78f9a25 Aphrodite tokenizer 2024-02-02 01:09:03 +02:00
khanon 60044c18a4 Implement Token Probabilities UI using logprobs 2024-01-25 18:34:46 -06:00