Commit Graph
131 Commits
Author SHA1 Message Date
Cohee 9d36b19ef9 Update validation for query messages and max entries 2026-01-16 23:11:07 +02:00
adventchilde / aethelandCohee 8926cdc5ce Adding Slash Commands for Vector Storage Extension (#5008)
* Add vector slash commands

* Updated vector-threshold command per feedback. Want to validate it is correct before fixing other commands.

* Added slash commands for several vector storage settings.

* Added slash commands for vector storage, updated w/dev feedback

* Fix min value of entries

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-16 22:59:24 +02:00
8372e7bf9d "gradually replacing property access with a dot operator" (#4965)
* "gradually replacing property access with a dot operator"
https://github.com/SillyTavern/SillyTavern/pull/4963#discussion_r2663003561

(?<=\w|\])\['([a-zA-Z]\w+)'\]
My regex found 593 matches across 47 files.
Also, two typos.

* Fixed chat[0].chat_metadata type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664275854

* Fixed `swipedElementsDiv[0]?.getAnimations().filter((a) => a.animationName` type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664274593

* Fixed config.MESSAGE_SANITIZE and config.MESSAGE_ALLOW_SYSTEM_UI type errors.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664266271

* Fixed group.date_last_chat type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664295652

* Reverted SlashCommandParser dot property access.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664310931

* LLM fixed canUseNegativeLookbehind.result; type error.
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664314288

* Reverted chat-completions.js bodyParams and headers dot property access.

https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664317848
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664320088
https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664324438

* Reverted openai.js data dot property access.

https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664326244

* Reverted tests/frontend/MacroEnvBuilder.e2e.js env.dynamicMacros dot property access.

https://github.com/SillyTavern/SillyTavern/pull/4965#discussion_r2664330990

* Partially reverted `window` dot property access.

* Reverted result.json() and settings dot property access.

* Reverted google.js headers dot property access.

* Fixed regex: `(?<=\w|\])\['([a-zA-Z]\w*)'\]`

* Swapped window to globalThis with dot property access.

* LLM fixed canUseNegativeLookbehind type.

* Refactor property access

* Consistency

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-01-08 23:58:21 +02:00
Cohee f26a672811 Omit content type in POST request if no body 2025-12-07 23:26:47 +02:00
BenandCohee 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
Cohee 845bd8c999 OpenRouter: Add as vector storage provider (#4736)
* OpenRouter: Add as vector storage provider

* Better array filtering
2025-11-03 21:53:17 +02:00
de7c113346 Multiple attachments (#4719)
* Multiple file uploads

* mes_img_wrapper

* mes_video_wrapper

* Named export instead of function wrapper

* Update public/scripts/chats.js

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

* Fix optional chaining for message extra

* Preserve existing files with paste

* Improve swipe message extras clean-up

* Clean-up: Add chat_backgrounds to known images

* Add ensureMessageMediaIsArray to getContext

* Fix compatibility warning

* Update to media array

* Move de-dupe check logic

* Fix comment

* Fix clean-up logic

* Improve typing

* `feat/multi-file` Added a toggle between the old gallery and new image list. (#4722)

* Added "Toggle Gallery" button.
Added `getContainerInfo`.

* Refactor

* Change checkbox toggle to select

* Ensure media_display is set correctly only if any image_swipes were migrated

* Rename function

* Support Date in parseTimestamp

* Add type to main chat array

* Add media display reload prompt

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>

* Use a single wrapper block for media

* Fix type annotation

* Fix video display in list mode

* Refactor saveImageToMessage to include title in media object

* Use named constants in migrateMediaToArray

* Update img control styles

* Fix error container state

* Refactor onImageSwiped

* Remove redundant event handler

* Refactor expandMessageMedia

* Use shared function for display handling, fix notice logic

* Enhance ChatMessage and ChatMessageExtra types

* Refactor media display reload logic

* Improve styling for media containers

* Adjust spacing in file form styles

* Fix scroll handling in appendMediaToMessage

* Reduce flicker in appendMediaToMessage

* Extract scrollOnMediaLoad func

* Improve scroll behavior in gallery display

* Improve delegation for click events

* Add file d&d handler to #form_sheld

* Improve scroll adjust for slow connections

* Adjust debounce timeout

* Add messageMedia enum provider

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: DeclineThyself <FallenHaze@tutamail.com>
Co-authored-by: user <user@exmaple.com>
2025-11-02 20:10:43 +02:00
f0ceba43e9 feat: [Electron Hub] Support Vector Storage, Better searching for image engine (#4540)
* feat: [Electron Hub] Add Vector Storage, Better searching for image model list

* feat: [Electron Hub] Add quality parameter for Image Engine

* fixed ESLint

* Update public/scripts/extensions/vectors/index.js

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

* small tweaks

* Use default getOpenAIVector

* Refactor and clean-up code

* Move endpoint filtering logic to backend

---------

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-10-21 23:38:12 +03:00
Cohee 780633e05a text-embedding-005 2025-10-08 21:24:55 +03:00
Cohee 82d9fa79e8 Add vectorization via Vertex AI (#4311)
* Add vectorization via Vertex AI

* Enable batching for Google vectors

* Add batch embeddings for Vertex

* Split embed methods for Vertex/AI Studio
2025-07-25 23:59:30 +03:00
Cohee 1a92157643 Refactor generateRaw/generateQuietPrompt calls (#4277)
* generateQuietPrompt: Update to object arguments

* generateRaw: Update to object arguments

* Fix jsdoc

* Fix lint

* Unwrap JSON schema options

* Remove default args from gen call
2025-07-15 23:11:31 +03:00
Cohee 579ef1e86c Refactor API key management in extensions 2025-06-26 21:24:51 +03:00
Cohee 441dffc0da Vectors: Allow chunk overlap when forced chunking on delimiter 2025-06-15 01:48:17 +03:00
Cohee 7659dfb85c Remove reasoning from raw builder summaries 2025-05-13 00:59:27 +03:00
Cohee a122109e0c Add new model option 'embed-v4.0' to Cohere vectorization settings
Closes #3951
2025-05-04 12:26:44 +03:00
Cohee 05daddb60c Fix KoboldCpp saved vectors retrieval 2025-04-27 23:18:39 +03:00
pl752 07fb92b37d Added vector secondary url placeholder example 2025-04-16 17:39:29 +05:00
pl752 f8bccb472f Adjusted naming and validation 2025-04-16 17:34:58 +05:00
pl752 bfe50403af Forgot semicolons 2025-04-16 16:45:01 +05:00
pl752 5cf3198da1 Added option to use secondary API URL in vector extension 2025-04-16 16:04:33 +05:00
Cohee 78bda9954d Increase maximum injection depth and WI order (#3800) 2025-04-13 21:31:57 +03:00
Cohee 70fe5b6e01 Add Gemini embedding model for vector storage 2025-04-01 21:42:26 +03:00
Cohee 80e821d12d Add support for KoboldCpp embeddings in Vector Storage (#3795)
* Add support for KoboldCpp embeddings in vector processing

* Add validation for KoboldCpp embeddings to handle empty data

* Improve toast handling
2025-04-01 21:21:29 +03:00
Cohee 1cb9287684 Vectors WebLLM (#3631)
* Add WebLLM support for vectorization

* Load models when WebLLM extension installed

* Consistency updated

* Move checkWebLlm to initEngine

* Refactor vector request handling to use getAdditionalArgs

* Add error handling for unsupported WebLLM extension

* Add prefix to error causes
2025-03-09 00:51:44 +02:00
Cohee 58bbfc0d4e Add types for global translation function 2025-02-19 22:18:09 +02:00
Cohee 058c86f3c1 Vectors: Don't use headers for source-specific fields in requests 2025-02-16 23:59:00 +02:00
Cohee f83dccda39 Mark 'Extras' option as deprecated in built-in extensions 2025-02-08 21:56:54 +02:00
Eradev 1f9fa74786 Rewritten minLogLevel feature 2025-01-15 10:02:32 -05:00
zerofata 89c984830b rename resultSize to count 2025-01-12 07:20:36 +13:00
zerofata fc5debc660 replaced returnChunks with return arg to use existing helper functions 2025-01-11 17:42:19 +13:00
zerofata 7f5ce54b1f Add returnChunks and resultSize args to /db-search 2025-01-11 11:32:05 +13:00
Cohee 77bee453ab Vectors: Add only custom boundary chunking 2025-01-03 20:44:25 +02:00
Cohee 02900520c9 chore: Add index property to HashedMessage 2025-01-03 03:09:16 +02:00
Cohee eff4da42c5 Vector storage: skip for quiet prompts 2025-01-03 03:04:45 +02:00
Cohee 2f5f9a437d Allow running generate interceptors on quiet prompts 2025-01-03 01:10:14 +02:00
Cohee 378dfd3626 Vectors: escape file names 2024-11-18 15:24:26 +00:00
Cohee aaed09f606 Data Bank: display file ingestion progress 2024-11-18 15:18:45 +00:00
Cohee ba0d6bfa26 Vectors: fix force_chunk_delimiter value init 2024-10-16 07:53:53 +00:00
Cohee 69283f511f Optimize summarization on query 2024-10-15 23:27:18 +03:00
Cohee e3de69a235 Add hash for getQueryText 2024-10-15 23:17:27 +03:00
Cohee 65d3c2729a Fix typo in variable name 2024-10-15 23:14:59 +03:00
QuantumEntangledAndy bb7e7b645d Add client side cacheing of vector summaries 2024-10-15 10:34:03 +07:00
Cohee 1278b5c309 Fix character attachment content saving into settings.json 2024-10-03 22:13:37 +03:00
Cohee df3d7a048e Deprecate unscoped vectors 2024-09-24 21:51:10 +03:00
Cohee b2eab37a89 Adjust default extension prompts, remove square brackets 2024-09-22 12:58:46 +03:00
Coheeandceruleandeep 9ef3385255 Implement collection scopes for vector models (#2846)
* Implement collection scopes for vector models

* Update makersuite-vectors.js to use Gemini API text-embedding-004 model

* Add model scope for Google vectors

* Fix purge log

* Refactor header setting

* Fix typo

* Only display UI warning if scopes disabled

* Remove i18n attribute

---------

Co-authored-by: ceruleandeep <83318388+ceruleandeep@users.noreply.github.com>
2024-09-16 09:29:39 +03:00
Cohee 06e3d5f8de Rename MakerSuite => AI Studio 2024-08-21 21:00:17 +03:00
Cohee c88edaa4ed Vector Storage: Fix query summarizing for WI and files 2024-08-16 20:49:14 +03:00
Cohee 53c24174e7 Merge branch 'staging' into webgpu-summary 2024-08-13 20:54:46 +03:00
Cohee d0b368f29c Vector Storage: change NomicAI key input 2024-08-13 20:50:41 +03:00