Compare commits

..
111 Commits
Author SHA1 Message Date
Cohee 9c9be90821 Merge pull request #4794 from SillyTavern/staging
Staging
2025-11-22 17:27:11 +02:00
ffe17bb870 Fixed layout thrashing when Stream Fade-In and Auto-scroll Chat are enabled. (#4791)
* Scheduling scrollChatToBottom after the animation frame prevents layout thrashing.

https://developer.mozilla.org/en-US/docs/Web/API/Window/requestAnimationFrame#return_value
https://gist.github.com/paulirish/5d52fb081b3570c81e3a#file-what-forces-layout-md

* Make frame request optional

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-22 15:58:23 +02:00
Cohee a668012138 Z.AI: Add endpoint selection (#4789)
* Z.AI: Add endpoint selection
Closes #4778

* Add i18n support for Z.AI endpoint options

* Update message for captioning ext.

* Remove unused imports

* Add api-url autoconnect guard
2025-11-22 00:44:27 +02:00
Cohee c31d92c909 1.14.0 2025-11-21 23:29:20 +02:00
Cohee 9e0a1c7d73 Horde: Try get shared key info
Fixes #4787
2025-11-21 23:12:00 +02:00
Cohee 45931a334f QR: Add handler for group chat creation event 2025-11-21 22:34:42 +02:00
Cohee 9f7677c04b Check for message being edited in beforeunload 2025-11-21 15:47:00 +00:00
Cohee 1a061321fd Handle empty chat directories in /api/characters/chats 2025-11-21 02:45:47 +02:00
Cohee e092088ad9 Add extension in /api/chats/delete if missing 2025-11-21 02:33:41 +02:00
Leandro Jofré e8a75c3329 Feat/Link sampler selection lock to TC API Type (#4782)
* Update - Revert connection profile change TC commands load order

This change was made to prevent preset tied samplers from breaking, such thing doesn't exist anymore.

* Update - Unlink preset renaming logic from sampler selection lock

* Update - Link TC sampler selection lock to API Type

* Fix - Clean comments

* Update - Use localforage selectedSamplers and data selectsampler as main sampler selection storage

* Fix - ESLint errors

* Update - Change lock tooltip with correct description

* Fix - Move and await sampler select localforage initializer to finish

Tried to move it to the most reasonable place possible that allowed to make an await.

* Fix - Make loadTextGenSettings async to load API selected samplers
2025-11-21 01:57:23 +02:00
Cohee 35949cac01 Add dummy signatures to image and empty text parts 2025-11-20 22:18:56 +02:00
Cohee 2d9b0ad0a9 Don't parse inline images from reasoning blocks 2025-11-20 21:46:21 +02:00
Cohee 70e569f0ef google bonanza pro 2025-11-20 21:33:40 +02:00
Cohee 04f844577c Filter recent chats from deleted entities on welcome screen 2025-11-20 20:53:51 +02:00
Cohee 621b27063a Add root chat files to /recent 2025-11-20 20:52:59 +02:00
Cohee b55dd49746 Add server endpoint to call prompt processing on demand 2025-11-20 20:37:26 +02:00
Leandro JofréandCohee 0d9a72becc Add option to keep manually selected samplers on API Type switch (#4692)
* Feat - Save and load manually selected samplers per preset

* Fix - Sync sampler popup with selected sampler state settings

* Fix - Prevent breaking visualization after disabling keep selected samplers

* Fix - ESLint errors in samplerSelect.js

* Fix - ESLint errors in textgen-settings.js

* Docs - Write JSDocs for new methods in textgen-settings.js

* Update - Make the reset button work individually per preset

* Fix - Trailing whitespace at the end of class selector

* Fix - Update tooltip information for force samplers toggle

* Fix - Prevent calling isSamplerManualPriorityEnabled a bajillion times

* Fix - Unbrick switch from manually-forced to non-manually-forced preset

This prevents samplers non controlled by [data-tg-type] from being sent to the shadow realm if they were previously hidden by [data-tg-samplers]. is_preset_switch is just to prevent breaking muscle memmory of users not using force manually selected samplers.

* Fix - Load manually selected samplers on connection profile switch

Changing preset does not update samplers ONLY IF force manually selection is disabled. Changing API before preset would update the samplers, but using the settings of the previous preset, due to preset being changed AFTER the API.

* Fix - Switch API Type controls in the API Connections panel

* Fix - ESLint errors in textgen-settings.js

* Fix - Update sampler selection only with textgenerationwebui as main API selected

* Styles - Change the sampler selection lock button icon to an actual lock.

* Fix - Await for sampler selection reset to finish

* Update - Normalize function name

* Update - Preserve manual sampler selections on preset renaming

* Fix - Properly reset sampler manual selections

* Update - Ensure selection reset displays API specific samplers

* Fix - ESLint errors

* Fix - Avoid modifying non-existent data

* Update - Move manual sampler control methods to samplerSelect.js

* Fix - Break circular file dependency between textgen-settings.js and samplerSelect.js

setting_names was unavailable during page load, throwing an error and preventing ST from loading.

* Update menu layout

* Remove pointless await

* Update param naming to camelCase

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-19 22:56:15 +02:00
Cohee 945d727132 Hide "visibility only" notice for ZAI reasoning toggle 2025-11-19 22:23:19 +02:00
Cohee ef3996cbea Restyle "Image Swipe Behavior" block 2025-11-19 22:14:50 +02:00
QiyuanChenandCohee 5c974bd148 feat: add siliconflow chat provider (#4764)
* feat: add siliconflow chat provider

* fix: remove siliconflow seed handling

* fix: enable SiliconFlow image inlining from shared vision list

* fix: handle SiliconFlow model context limits and sizing

* fix: drop SiliconFlow reasoning effort handling since controls are hidden

* fix: parse SiliconFlow reasoning in streaming and non-streaming

* fix: add missing comma in supported models list

* Remove seed from HTML template

* Combine streamed reasoning parsing blocks

* Update logo image

* Unhide image inlining controls

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-19 22:10:29 +02:00
Cohee 05a963a637 Add metadata flag to api/chats/recent 2025-11-19 20:36:52 +02:00
Cohee 69de212cc3 Add extensionless file name to /chats endpoints 2025-11-19 20:34:12 +02:00
equal-l2 62bcfd3de0 Add Gemini 3 for Vertex AI (#4777) 2025-11-19 17:35:08 +02:00
Cohee 73cedc115d Image swipe is back 🗣️🔥 2025-11-19 09:08:58 +00:00
Cohee 6c43ab64b5 Add metadata flag to api/characters/chats 2025-11-19 00:02:52 +02:00
Cohee 7448094f1b Add /edit-avatar endpoint 2025-11-18 21:46:29 +02:00
Cohee 9d9a8f1dd1 Jeremiah the Third 2025-11-18 20:19:04 +02:00
Cohee dc2624cdf5 Fix npm audit 2025-11-18 19:50:13 +02:00
Cohee af0cdec110 A 500 billion dollar startup can’t filter API payload fields 2025-11-17 20:08:29 +02:00
Cohee 1c4a918e43 gpt-5.1 2025-11-16 23:18:10 +02:00
Cohee b10f680371 Preserve media playback state when running appendMediaToMessage (#4771)
* Preserve media playback state when running appendMediaToMessage

* Better selector specificity

* Fix local variable name

* Move typedef to global.d.ts

* Check for readyState on save/restore

* Only check for currentSrc on restoration callback
2025-11-16 21:56:53 +02:00
Cohee c7040d2be4 Move img.swipe notice block up 2025-11-16 21:26:53 +02:00
SerenaandCohee e7af479427 Feature: allows sorting tags by most used (#4768)
* add sorting tags by most used

* Fix whitespaces

* Code review updates

* Remove commented code

* Fix capitalization in comment

* Apply review suggestion

* Simplify template init

* Reformat

* Add documentation for appendViewTagToList and printViewTagList functions

* Reprint renamed tags regardless of sorting mode

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-16 21:16:15 +02:00
Cohee 1baaa26729 Vertex: Add Vertex AI-specific safety setting (#4770)
Closes #4455
2025-11-16 18:26:03 +02:00
Cohee 306fc3f408 Gemini: Pass non-success response content to frontend 2025-11-16 17:55:53 +02:00
Cohee b99ccc3f0c OpenAI: Add Sora 2 API (#4748)
* OpenAI: Add Sora 2 API

* Add duration control

* Support client generation abort

* Reduce poll log amount

* Simplify selector

* Simplify model-specific control handling
2025-11-16 17:49:21 +02:00
Cohee f8c4795b4a Bump anti-troll tags limit
Closes #4763
2025-11-16 15:57:30 +02:00
Wolfsblvt 19ae4e7cc1 feat: add max-height and scrolling to world entry key input fields (#4769)
- Added 160px max-height to select2 multiple selection, primary key, and secondary key text areas in world entries
- Enabled vertical scrolling with hidden horizontal overflow for better UX with long content
2025-11-16 15:42:07 +02:00
Cohee 3af1622b38 Fix npm audit 2025-11-16 15:30:29 +02:00
Wolfsblvt 81367629fe Feat: Improve multiline input handling in popups (#4756)
* feat: improve multiline input handling in popups

- Added Ctrl+Enter requirement for submission in multiline input popups to prevent accidental sends
- Exported PopupUtils class for external use

* refactor: remove redundant higher/different rows from input popups

- Removed rows: 2 from callGenericPopup calls where default behavior is sufficient
- Increased rows from 2 to 4 in caption extension for better multiline input experience
2025-11-12 21:20:13 +02:00
Wolfsblvt bc06f3e3e0 Refactor: make whitelist validation a bit more robust (#4757)
* refactor: extract IP whitelist validation into helper function

- Added isIPInWhitelist helper with error handling for individual whitelist entry checks
- Replaced inline whitelist matching logic with reusable function calls
- Added JSDoc type annotations and error logging for failed IP matching attempts

* refactor: simplify whitelist validation with upfront filtering

- Moved IP validation to startup time instead of per-request checking
- Extracted validateWhitelist function to filter invalid entries once at initialization
- Simplified isIPInWhitelist by removing redundant error handling after validation

* fix: correct IP whitelist matching to use parsed CIDR notation
2025-11-12 21:13:58 +02:00
Wolfsblvt 6963f5cdd7 chore: add test-results directory to gitignore 2025-11-12 00:12:21 +01:00
Serena a0bff84e4e Fix: Prevent data loss on bulk regex move to scoped scripts (#4760)
* Fix: Prevent data loss in regex bulk move

* prevents moving to scoped scripts with group selected for bulkedit
2025-11-11 15:20:16 +02:00
Cohee dc4e0270e7 Fix OpenRouter embeddings URL
#4736
2025-11-11 13:16:04 +00:00
Wolfsblvt b0dd267b9e feat: enhance HTML escaping to include single quotes (#4755) 2025-11-10 00:33:01 +02:00
Madobe Ichika eb0706d294 Raise max response length to 128k for GPT-5 models (#4753) 2025-11-09 13:30:23 +02:00
Cohee 94b95013bc Add audio/video inlining for OpenRouter (#4751)
* Add OpenRouter inlining support for video and audio

* Refactor modality checks
2025-11-08 17:39:31 +02:00
Cohee 38679897c6 Add captioning for video attachments (#4749)
* Add captioning for video attachments

* Unify error toast titles

* Add MEDIA_SOURCE enum and update media handling to include source information

* Unify attachment handling logic

* Add error handling for auto-captioning failures

* Use string formatting for console error
2025-11-08 02:07:28 +02:00
Cohee 4fcdec47f4 Fix PPP for audio attachments 2025-11-08 01:04:05 +02:00
Cohee 5837f28599 TC: Allow setting null JSON schema (#4746)
* TC: Allow setting empty JSON schema

* Fix check for llamacpp schema

* Handle grammar/schema for Aphrodite

* Conditional include for guided_json

* Update default presets with null value

* Conditional include into payload for grammar/schema
2025-11-07 23:39:52 +02:00
Cohee 09b8d59f4d Moonshot: Load models list from endpoint 2025-11-06 22:51:40 +02:00
105b436a66 fix #3199: firefox using cached images instead of new images. (#4743)
* Fixed: https://github.com/SillyTavern/SillyTavern/issues/3199#issue-2745917391

* Wrap header set in isFirefox

* Only invalidate Firefox caches. Also invalidate thumbnail caches.

* Skip `mime.lookup` on non-Firefox browsers.

* Improve param comments

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-06 20:11:21 +02:00
Cohee ad72fa806e Google: Add Veo models (#4742)
* Google: Add Veo models

* Combine retry into a singe loop

* Improve error logging and reporting

* Add client abort handling for video generation endpoint
2025-11-06 19:58:01 +02:00
StageDog 5a2b325ff7 fix: reorder regex import target popup (#4744) 2025-11-06 10:57:06 +02:00
Cohee a06a033a71 OpenRouter: Fix embeddings endpoint #4736 2025-11-06 08:55:40 +00:00
bmen25124 a728d30c99 Refactor flattenSchema to simplify JSON schema for Google Generative … (#4711)
* Refactor flattenSchema to simplify JSON schema for Google Generative AI API compatibility

* Added unit test and github action

* Add unit tests workflow and update test script in package.json

* Downgrade eslint-plugin-jest to make min node version 18
2025-11-06 00:08:58 +02:00
Cohee 2577e35c0b Audio media attachments (#4741)
* Add audio-player component

* Enhance audio player functionality and styles

- Adjust audio player layout and styles in CSS for better spacing and alignment.
- Add audio element to message template in HTML.
- Implement audio attachment handling in JavaScript, including a new AudioPlayer class.
- Update media attachment structure to include titles for audio files.
- Extend supported media file types in constants.

* Add audio inlining control

* Fix file formats list

* Simplify hints

* Add to prompt

* Add progress title hint

* Add to scrollOnMediaLoad

* Add audio size hint

* Add gallery controls

* Delete removed media attachments from server

* Adjust min width

* No-op when swiping a singular media

* Fix clean-up

* Fix silent deletion logic

* More accurate media prompt estimations

* Round durations with ceiling function

* Adjust rounding logic

* you don't have to say it twice

* Export deleteFileFromServer

* Don't reference module from HTML

* Clean-up styles

* Move formatTime to utils

* Add fa-fw to delete
2025-11-05 00:53:23 +02:00
Cohee 447c271b36 Fix type error in escape key handler 2025-11-03 22:57:44 +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
fathom0324andgoogle-labs-jules[bot] 73c1bc2d03 Prevent Esc from closing editor during composition (#4738)
* fix(IME): Prevent Esc from closing editor during composition

When using a Chinese IME, pressing the Escape key during composition should cancel the composition, not close the message editor.

This commit fixes the issue by adding a check for `!e.isComposing` to the 'keyup' event listener for the Escape key in `public/script.js`. This ensures that the editor is only closed when the Escape key is pressed outside of an IME composition session.

* fix(IME): Change the handler of 'Escape' from 'keyup' to 'keydown'

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-11-03 21:26:17 +02:00
Cohee c04be57f84 Support multiple images in single API response (#4734)
* Support multiple images in single API response

* Fix media wrapper clashing with swipe counter

* Return an empty array, add additional filtering

* Add index to inline image filenames in processImageAttachment
2025-11-03 00:30:36 +02:00
Cohee c14fba8829 Add scroll behavior options for media appending 2025-11-02 23:27:34 +02:00
Cohee a47b371702 Fix scrolling behavior 2025-11-02 23:03:11 +02:00
d1035336a8 Fixed bug in syncMesToSwipe. "" is falsy and a valid message. (#4733)
* Fixed bug in `syncMesToSwipe`.

* Use strict inequality operator

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-11-02 20:16:09 +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
Cohee 60a8b51951 Unblock textarea send during edit (#4714) 2025-10-30 19:43:53 +02:00
Cohee fc2aefa5be Claude: Fix image inlining for haiku-4-5 2025-10-30 04:17:33 +02:00
docfail 5f35a38963 Remove unnecessary check for swipe info to fix #4717 (#4718)
* - Removed unneccessary check for swipe info. Swipes are valid and can be read by the chat message UI just fine without the dates and details surrounding generation settings.

* + Swipe info will now be backfilled if it's missing using placeholder data, to improve compatibility.

* + Fix big oopsie.
2025-10-30 00:27:30 +02:00
Cohee 36557dc1f6 Add Start Reply With to master import/export (#4716) 2025-10-29 21:14:57 +02:00
docfailandCohee dd758161bd Add Full Support for BYAF Archives (#4701)
* + Fix discarding all scenarios aside from the first one, which would cause all chats other than the first one to be lost.
+ Accumulate alternative starting messages from all scenarios, as different scenarios are how Backyard handles having alternative greetings. A scenario with multiple messages in its "firstMessages" array is invalid as per BYAF spec.
+ Return scenarios so that they can be used to populate chats, scenario overrides, and in the future, the other character settings overrides as well.

* + Added support for importing chats (including swipes) from BYAF. This brings the core functionality of BYAF imports mostly in-line with the standard, without the inclusion of any features that are currently missing from ST.
> The only supported feature not yet implemented is scenario overrides per-chat. This will be the the goal of the next commit.

* + Implemented scenario overrides, fully bringing ST's BYAF import as in-line with the BYAF standard as possible without adding new feature functionality to ST.
+ Also added some new chat metadata fields in preparation for example message and system prompt overrides.

* + Added support for pulling alternate icons from the BYAF archive. They are not used yet, but they are safely stored.
+ Added support for pulling backgrounds from the BYAF archive. They are not used yet but they are stored and linked to the chats they originally belonged to.
+ Saved every remaining field that was previously discarded from BYAF that a user actually needs in a way that could be used in the future, and can be accessed by the user if needed after import. Any fields that are not preserved at this point are specfic to either Backyard AI's desktop application, or to the BYAF manifest itself, and therefore have no relevance to a user.
> With this, BYAF import should be fully supported and in-line with the official spec.

* + Updated comments and method names to reflect changes appropriately. First round of touch ups.

* + More comment updates.

* - Removed commented code, that is no longer needed for reference.

* > No longer sanitize for filenames in the character card, as there's no need. The sanitization now happens when generating the filename, which is subsequently used for file operations.
+ Added replacement function for sanitizing filenames which uses visually similar but valid for filenames replacement characters instead of deleting the characters for better data parity.

* + Preserve isNSFW flag as a tag, so it's not lost on import.

* + preserve labels on character alt avatars

* + Deduplicate first messages, so that 5 chats with the same first message don't create 5 identical first messages.

* + Adjusted icon naming logic to produce more sensible results.

* > User path.basename and path.extname for getting the base name and extension of files, respectively.

* > Should use camelCase for local function names.

* > Use a set for greetings instead of explicitly checking for duplicates.

* > Missed a snake case local function name.

* > Updated background import logic to integrate with existing per-chat background system.

* + Updated logic to skip import of chats and backgrounds when a character is being updated/replaced.

* + Added copy of getUniqueName helper function from frontend utils to backend utils.
+ Refactored duplicated logic for getting unique filenames for backgrounds and character alt icons to use the newly available function.

* > fixed adding an extra dot to the filenames for icons after switching to path.extname for getting the extension

* > Updated metadata settings generation in byaf chat so that it doesn't overwrite valid yet 'falsy' values with defaults. Oops

* > Remove variable for configuration that will likely never need to exist.

* > custom_background should be an empty string if chat_background is falsy

* > Make an array empty if chat_background is falsy.

* > Prefer camelCase for local variable names.

* + Added definitions for ByafParseResult and ByafChatBackground.
> Updated overused and unweildy anonymous types to the newly defined types.

* + When importing a character with chats, the character will now no longer open to a new empty chat, but instead will pick the first of the imported chats to open up to.

* Rename prev_paths => paths

* Prettify logs display

* Set fallback chat name if scenario is untitled

* card.data.name => card.name

* Optimize first scenario message access

* + Moved custom replacement function from importFromByaf into util.js as sanitizeSafeCharacterReplacements() so that the replacement logic may be reused anywhere for consistency.

* > Missed a couple. Updated for consistency

* + Preserve character full/display name without it needing to be safe as a filename.
> Change logic for naming the folder the alt images live in to match the logic the sprites endpoint uses to get character sprites for consistency

* > Only add full_name extension if displayName exists.

* full_name => display_name

* - No longer use safe lookalike replacements for filename sanitization to be consistent with how web browsers sanitize invalid characters in filenames before saving to disk.

* Tiny formatting fix

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-29 20:06:53 +02:00
Cohee 5e033a9db9 Change window resize log level to debug 2025-10-28 23:27:31 +02:00
docfailandCohee 47f744dfdf Character settings overrides UI (#4707)
* + Implemented support for overrides of system prompt and example messages from chat metadata. This is needed for BYAF import parity. No UI for modifying these yet, but they're easily changeable in the chat files already. These metadata settings are already supported by BYAF import as of the last commit so this just enables them.

* + Updated scenario overrides popup to now be a character settings overrides popup.
+ Updated the template to have a new section for example messages and system prompts
+ Updated the logic to handle all three overrides
+ Updated logic to only save when the popup is closed, instead of on every character input.

* Preserve import, allow scrolling

* Add confirmation on override removal. Always save pending changes.

* Update dialog layout, add editor expand buttons

* Fix mes examples override in group chats with Join mode

* Update group chat button title

* Specify that Prefer Char. Prompt is a requirement

* Fix group join mode not replacing macros in overrides

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-28 21:57:52 +02:00
6757a0375b Refactored mes_edit_up and mes_edit_down into messageEditMove. (#4704)
* Refactored `mes_edit_up` and `mes_edit_down` into `messageEditMove`.

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4704#pullrequestreview-3385227819

* Fixed https://github.com/SillyTavern/SillyTavern/pull/4704#pullrequestreview-3385647876 and refactored `updateEditArrowClasses`.

* Update this_edit_mes_id in messageEditMove

* Don't set this_edit_mes_id if unset

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-28 20:31:06 +02:00
Cohee f3ec2483ac Sync OpenRouter providers 2025-10-28 20:14:18 +02:00
Cohee 2175ccbf1e Don't split multiswipes unless requested (#4703) 2025-10-28 00:58:30 +02:00
DeclineThyselfanduser 0cb4f79c36 Fixed a bug in sendMessageAs. (#4706)
Co-authored-by: user <user@exmaple.com>
2025-10-28 00:06:13 +02:00
Cohee 1de4f30775 Prefer const in variable definition 2025-10-26 15:19:41 +02:00
db315ecf0f Fix koboldcpp abort generation error (#4693)
* Enhance contribution guidelines for pull requests

Added guidelines for maintaining workflow during PRs.

* fix abort generation error when koboldcpp is set with a password

* add parameter type, and remove unecessary line

* oops, missing comma

* eslint

* remove header content type

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
2025-10-26 15:19:10 +02:00
Cohee 256398f607 Merge branch 'release' into staging 2025-10-26 15:15:02 +02:00
Kristian SchlikowandCohee b5083c7b23 fix: Enhances model display for Fal.ai image gen source (#4694)
* fix: Enhances model display for Fal.ai image gen source

* Move text processing to backend

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-26 15:14:28 +02:00
Cohee 133ad15a83 Prevent propagation and editing of 'json_data' field in character data (#4690) 2025-10-24 15:44:50 +03:00
2df8e52d48 If the world-info has no comment, show it's keys in the placeholder. (#4681)
* Show keys in commentInput's placeholder.

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450822592
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450827302
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450834282
https://github.com/SillyTavern/SillyTavern/pull/4681#discussion_r2450844011

* Update comment backfill logic

* Don't update placeholder with secondary keys

* Fix MAX_COMMENT_LENGTH to enforce a limit of 100 characters

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-23 22:10:08 +03:00
Cohee 55969bc96e Chat Completion: Streamline settings and API key handling (#4687)
* refactor: streamline CC settings and API key handling

* Add types for API settings

* Allow keyless custom source connection
2025-10-23 21:28:37 +03:00
DreamGenX 4e428c938d update dreamgen presets (#4683)
* update dreamgen presets

* remove dreamgen presets

* remove dreamgen presets
2025-10-23 21:07:08 +03:00
Cohee e9cd32a123 Enhance contribution guidelines for pull requests
Added guidelines for maintaining workflow during PRs.
2025-10-23 12:35:15 +03:00
Cohee da2fbbbb15 Ollama: Always truncate embedding inputs
https://docs.ollama.com/api#parameters-8
2025-10-23 00:58:00 +03:00
Cohee d32ac6c018 Unbrick preset saving 2025-10-23 00:50:42 +03:00
Cohee 860e80fe0a Update default sampler presets for Text Completion and AI Horde / Kobold Classic (#4686)
* Update default sampler presets for Text Completion and AI Horde / Kobold Classic

* do_sample = true

* Add missing fields to TC presets

* Consolidate Default and RecoveredRuins

* Fix rep.pen in Kobold presets

* Adjust TC samplers in default settings.json
2025-10-22 23:01:48 +03: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 4add4f0090 Add official GLM API as CC provider (#4678)
* Add UI elements

* Add support for model configuration

* fix: update API request parameters for improved handling

* Add logo img

* Fix tool calling with negative index

* Include tool calls into 'last in context' calculation

* feat: add support for captioning
2025-10-21 22:37:27 +03:00
Cohee c0e84aaa16 Merge branch 'release' into staging 2025-10-21 20:56:09 +03:00
Cohee 46cb4b5fcb fix: freshChat detection on group chat load.
This breaks persona refresh on untainted group chats. I have no better solution for that yet.
2025-10-21 20:55:55 +03:00
Cohee 3e7b511af2 fix: return debounced save in deleteMessage 2025-10-21 20:16:30 +03:00
DeclineThyselfanduser 19c4aea25a Fixed crash when top_logprobs is empty. (#4680)
Co-authored-by: user <user@exmaple.com>
2025-10-20 23:12:29 +03:00
Cohee 593fba5700 Refactor message edit function (#4679)
* Refactor message edit, show counters on last message

* fix: add warnings for missing message in chat array and DOM during edit

* Export messageEdit function

* Formatting fix

* Fix comment alignment
2025-10-20 21:16:38 +03:00
20556aa3dd Refactored swipe and moved messageEdit to a separate function. (#4610)
* Extracted `messageEdit` and `messageEditCancel` from `.mes_edit` and `.mes_edit_cancel`

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r241505
https://github.com/SillyTavern/SillyTavern/pull/4633#pullrequestreview-3316588180

* Refactored `swipe` and moved `messageEdit` to a separate function.
Also, a few more minor changes.

* Fixed bug.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2404789035
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2404789038

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408682277
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408689706
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408690772
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408697066
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408705156
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408708088
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408725971
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408726241
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408740050
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408745918
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408753165
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408761262
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408764531
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408781694
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408784426
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408794672
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408802366
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408803433

* Fixed:
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408702506

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408805635

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2410368443

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2408791120

* Bugfixes. Incomplete.

* Fix formatting

* Use scrollTop because scrollIntoView breaks layout on phones.

* Only show '?' in `formaSwipeCounter` if something is wrong.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2412169005

* Respect animation_duration if it's >= 0.

* Disabled expandNewMessage's animation on Cohee's request. https://github.com/SillyTavern/SillyTavern/pull/4610/files#r2408731744

* Only hide the swipe counter when a generation is ongoing.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2440588779

* refreshSwipeButtons

* Adjust swipeDuration constant

* feat: add refreshSwipeButtons and isSwipingAllowed to context

* Fixed image swipes.

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442489827

https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442490042

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4610#issuecomment-3418657967

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442480238

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2442536011

* Minor refactor.

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2443359660 https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2443359435

* Fixed: https://github.com/SillyTavern/SillyTavern/pull/4610#discussion_r2443357913

* Fix registration of click events

* Fix passing data to swipe events

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-20 20:51:33 +03:00
Cohee 743c26a9f8 fix: nanogpt and deepseek models not saving to presets 2025-10-19 23:36:45 +03:00
Cohee 034a5f3aa4 fix: timeout git process after 5 minutes of inactivity (#4673)
* fix: timeout git process after 10 seconds of inactivity

* fix: increase git process timeout to 10 minutes

* 10->5 min, remove timeout from install
2025-10-19 22:03:19 +03:00
Cohee ba79e7d94c Fix event handlers in cosyvoice.js
Fixes #4668
2025-10-19 16:50:55 +03:00
Cohee 5c62c3a90d feat: add move up/down functionality for alternate greetings (#4676)
* feat: add move up/down functionality for alternate greetings

* Remove disabled cursor style
2025-10-19 16:46:19 +03:00
Cohee 5eb43e45b6 fix: set metadata tainted flag on swipe deletion 2025-10-18 19:15:43 +03:00
StageDog 4bda4444e4 feat: Apply preset regexes before scoped regexes + avoid unnecessary popping up (#4672)
* feat: apply preset regexes before scoped regexes

* feat: apply preset regexes before scoped regexes for debugger list

* fix: don't notify reload regexes when save preset through ui button

* docs: add comment for SCRIPT_TYPES order

* fix: updatePreset is wrongly reset preset
2025-10-18 19:08:11 +03:00
Cohee 94ba7bcf2d fix: /cut of the first displayed message 2025-10-18 17:14:55 +03:00
Cohee ea3c5029c6 fix: prevent swipe deletion from /del command 2025-10-18 16:33:27 +03:00
StageDog 7dda524284 feat: set sortable handle for regex (#4667) 2025-10-17 22:13:18 +03:00
bmen25124andCohee dcab740b99 Added deleteMessage method (#4666)
* Added deleteMessage

* Simpler swipeDeletion param

* Added to context

* Fix review comments

* Only offer swipe deletion if count of swipes > 1

* Improve array check

* Fix generation broken after message deleted

* Use named constant for confirmation result

* Save chat immediately

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-17 22:08:46 +03:00
Cohee d08f3a2eef Allow blockquotes with encoded tags (#4662)
* Allow blockquotes with encoded tags
Fixes #4634

* Cache canUseNegativeLookbehind result

* Optimize regex allocation
2025-10-17 19:42:10 +03:00
Cohee 47765b6205 CC: Add advanced formatting null settings notice (#4661) 2025-10-16 23:41:08 +03:00
Cohee 41c048ed35 Fix formatting in messageEditCancel 2025-10-16 23:30:15 +03:00
Cohee 59a80fb0a0 getContext: export showSwipeButtons/hideSwipeButtons 2025-10-16 23:22:34 +03:00
37271ddad4 Extracted messageEdit and messageEditCancel from .mes_edit and .mes_edit_cancel (#4633)
* Extracted `messageEdit` and `messageEditCancel` from `.mes_edit` and `.mes_edit_cancel`

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r241505
https://github.com/SillyTavern/SillyTavern/pull/4633#pullrequestreview-3316588180

* Fixed..
https://github.com/SillyTavern/SillyTavern/pull/4633#issuecomment-3383321321
https://github.com/SillyTavern/SillyTavern/pull/4633#pullrequestreview-3316602505

* Fixed...

* Fixed....
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r2415124843
https://github.com/SillyTavern/SillyTavern/pull/4633#discussion_r2415124845

* Fix type conversion errors

* Fix type error

* Fix being unable to close message edit on first message with escape

* Fixed.
https://github.com/SillyTavern/SillyTavern/pull/4633#issuecomment-3412364573

Another bug found (sorry):
Open edit on the last message, move it up, then move it back down. Swipe buttons appear, as far as I understand your intention, they shan't.

* showSwipeButtons: return early if message edit is open

---------

Co-authored-by: user <user@exmaple.com>
Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2025-10-16 23:20:47 +03:00
176 changed files with 7301 additions and 6156 deletions
+32
View File
@@ -56,6 +56,38 @@ jobs:
dist/
lib/
run-tests:
name: ✅ Run Unit Tests on PR
runs-on: ubuntu-latest
# Only needs to run when code is changed
if: always() && (github.event.action == 'opened' || github.event.action == 'synchronize')
steps:
- name: Checkout Repository
# Checkout
# https://github.com/marketplace/actions/checkout
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js
# Setup Node.js environment
# https://github.com/marketplace/actions/setup-node-js-environment
uses: actions/setup-node@v4.3.0
with:
node-version: 20
cache: 'npm'
- name: Install root dependencies
run: npm ci
- name: Install test dependencies
run: npm ci --prefix tests
- name: Run unit tests
run: npm run test:unit --prefix tests
label-by-size:
name: 🏷️ Label PR by Size
# This job should run after all others, to prevent possible concurrency issues
+2 -1
View File
@@ -55,4 +55,5 @@ public/scripts/extensions/third-party
.env
/StartDev.bat
yarn.lock
*.code-workspace
*.code-workspace
test-results/
+3 -1
View File
@@ -28,7 +28,9 @@
- Updating README.
- Updating GitHub Actions.
- Hotfixing a critical bug.
4. Project maintainers will test and can change your code before merging.
4. Project maintainers will test and can change your code before merging. To keep our workflow smooth, please ensure the following:
- The "Allow edits from maintainers" option is checked.
- Avoid force-pushing your branch once the PR is out of draft state.
5. To make sure that your contribution remains testable and reviewable, try not to exceed a soft limit of **200 lines of code** (both additions and deletions) per pull request. If you have more to contribute, split it into multiple pull requests. We can also consider creating a separate feature branch for more substantial changes, but please discuss it with the maintainers first.
6. Write at least somewhat meaningful PR descriptions and commit messages. There's no "right" way to do it, but the following may help with outlining a general structure:
- What is the reason for a change?
+2 -218
View File
@@ -139,98 +139,18 @@
"filename": "Char_Avatar_Comfy_Workflow.json",
"type": "workflow"
},
{
"filename": "presets/kobold/Ace of Spades.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Basic Coherence.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Best Guess.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Coherent Creativity.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Deterministic.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Genesis.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Godlike.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Good Winds.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Liminal Drift.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Low Rider.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Luna Moth.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Mayday.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Miro Bronze.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Miro Gold.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Miro Silver.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Ouroboros.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Pleasing Results.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Pro Writer.json",
"filename": "presets/kobold/Neutral.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/RecoveredRuins.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Space Alien.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Storywriter.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/TFS-with-Top-A.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Titanic.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/Universal-Creative.json",
"type": "kobold_preset"
@@ -243,10 +163,6 @@
"filename": "presets/kobold/Universal-Super-Creative.json",
"type": "kobold_preset"
},
{
"filename": "presets/kobold/simple-proxy-for-tavern.json",
"type": "kobold_preset"
},
{
"filename": "presets/novel/Asper-Kayra.json",
"type": "novel_preset"
@@ -343,22 +259,6 @@
"filename": "presets/novel/Erato-Zany Scribe.json",
"type": "novel_preset"
},
{
"filename": "presets/textgen/Asterism.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Beam Search.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Big O.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Contrastive Search.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Default.json",
"type": "textgen_preset"
@@ -368,99 +268,7 @@
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Divine Intellect.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Kobold (Godlike).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Kobold (Liminal Drift).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/LLaMa-Precise.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Midnight Enigma.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Miro Bronze.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Miro Gold.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Miro Silver.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Mirostat.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Naive.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Best Guess).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Decadence).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Genesis).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Lycaenidae).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Ouroboros).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Pleasing Results).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Sphinx Moth).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/NovelAI (Storywriter).json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Shortwave.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Simple-1.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Space Alien.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/StarChat.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/TFS-with-Top-A.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Titanic.json",
"filename": "presets/textgen/Neutral.json",
"type": "textgen_preset"
},
{
@@ -475,14 +283,6 @@
"filename": "presets/textgen/Universal-Super-Creative.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/Yara.json",
"type": "textgen_preset"
},
{
"filename": "presets/textgen/simple-proxy-for-tavern.json",
"type": "textgen_preset"
},
{
"filename": "presets/openai/Default.json",
"type": "openai_preset"
@@ -507,14 +307,6 @@
"filename": "presets/context/Default.json",
"type": "context"
},
{
"filename": "presets/context/DreamGen Role-Play V1 ChatML.json",
"type": "context"
},
{
"filename": "presets/context/DreamGen Role-Play V1 Llama3.json",
"type": "context"
},
{
"filename": "presets/context/Libra-32B.json",
"type": "context"
@@ -587,14 +379,6 @@
"filename": "presets/instruct/ChatML.json",
"type": "instruct"
},
{
"filename": "presets/instruct/DreamGen Role-Play V1 ChatML.json",
"type": "instruct"
},
{
"filename": "presets/instruct/DreamGen Role-Play V1 Llama3.json",
"type": "instruct"
},
{
"filename": "presets/instruct/Koala.json",
"type": "instruct"
@@ -1,14 +0,0 @@
{
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n\n\n{{/if}}## Overall plot description:\n\n{{#if scenario}}{{scenario}}{{else}}Conversation between {{char}} and {{user}}.{{/if}}{{#if wiBefore}}\n\n{{wiBefore}}{{/if}}\n\n\n## Characters:\n\n### {{char}}\n\n{{#if description}}{{description}}\n\n{{/if}}{{#if personality}}{{personality}}\n\n{{/if}}### {{user}}\n\n{{#if persona}}{{persona}}{{else}}{{user}} is the protagonist of the role-play.{{/if}}{{#if wiAfter}}\n\n{{wiAfter}}{{/if}}{{#if mesExamples}}\n\n{{mesExamples}}{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "",
"chat_start": "",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": false,
"trim_sentences": true,
"single_line": false,
"name": "DreamGen Role-Play V1 ChatML"
}
@@ -1,14 +0,0 @@
{
"story_string": "{{#if anchorBefore}}{{anchorBefore}}\n{{/if}}{{#if system}}{{system}}\n\n\n{{/if}}## Overall plot description:\n\n{{#if scenario}}{{scenario}}{{else}}Conversation between {{char}} and {{user}}.{{/if}}{{#if wiBefore}}\n\n{{wiBefore}}{{/if}}\n\n\n## Characters:\n\n### {{char}}\n\n{{#if description}}{{description}}\n\n{{/if}}{{#if personality}}{{personality}}\n\n{{/if}}### {{user}}\n\n{{#if persona}}{{persona}}{{else}}{{user}} is the protagonist of the role-play.{{/if}}{{#if wiAfter}}\n\n{{wiAfter}}{{/if}}{{#if mesExamples}}\n\n{{mesExamples}}{{/if}}{{#if anchorAfter}}{{anchorAfter}}\n{{/if}}{{trim}}",
"example_separator": "<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nWrite an example narrative / conversation that is not part of the main story.",
"chat_start": "<|eot_id|>\n<|start_header_id|>user<|end_header_id|>\n\nStart the role-play between {{char}} and {{user}}.",
"use_stop_strings": false,
"names_as_stop_strings": true,
"story_string_position": 0,
"story_string_depth": 1,
"story_string_role": 0,
"always_force_name2": false,
"trim_sentences": true,
"single_line": false,
"name": "DreamGen Role-Play V1 Llama3"
}
@@ -1,25 +0,0 @@
{
"input_sequence": "\n<|im_start|>text names= {{name}}\n",
"output_sequence": "\n<|im_start|>text names= {{name}}\n",
"last_output_sequence": "",
"system_sequence": "",
"stop_sequence": "\n<|im_start|>",
"wrap": false,
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "<|im_end|>",
"input_suffix": "<|im_end|>",
"system_suffix": "",
"user_alignment_message": "",
"system_same_as_user": true,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|im_start|>system\n",
"story_string_suffix": "<|im_end|>",
"name": "DreamGen Role-Play V1 ChatML"
}
@@ -1,25 +0,0 @@
{
"input_sequence": "<|eot_id|>\n<|start_header_id|>writer character: {{user}}<|end_header_id|>\n\n",
"output_sequence": "<|eot_id|>\n<|start_header_id|>writer character: {{char}}<|end_header_id|>\n\n",
"last_output_sequence": "",
"system_sequence": "",
"stop_sequence": "",
"wrap": false,
"macro": true,
"names_behavior": "none",
"activation_regex": "",
"first_output_sequence": "",
"skip_examples": false,
"output_suffix": "",
"input_suffix": "",
"system_suffix": "",
"user_alignment_message": "",
"system_same_as_user": false,
"last_system_sequence": "",
"first_input_sequence": "",
"last_input_sequence": "",
"sequences_as_stop_strings": true,
"story_string_prefix": "<|start_header_id|>system<|end_header_id|>\n",
"story_string_suffix": "",
"name": "DreamGen Role-Play V1 Llama3"
}
@@ -1,24 +0,0 @@
{
"temp": 1.15,
"rep_pen": 1.05,
"rep_pen_range": 2048,
"top_p": 0.95,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.8,
"rep_pen_slope": 7,
"sampler_order": [
6,
3,
2,
0,
5,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.59,
"rep_pen": 1.1,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.87,
"rep_pen_slope": 0.3,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.8,
"rep_pen": 1.15,
"rep_pen_range": 2048,
"top_p": 0.9,
"top_a": 0,
"top_k": 100,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 3.4,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.51,
"rep_pen": 1.2,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.99,
"rep_pen_slope": 0,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,8 +1,9 @@
{
"temp": 0,
"rep_pen": 1.18,
"rep_pen_range": 2048,
"rep_pen": 1,
"rep_pen_range": 0,
"top_p": 0,
"min_p": 0,
"top_a": 0,
"top_k": 1,
"typical": 1,
@@ -20,5 +21,6 @@
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"use_default_badwordsids": false,
"grammar": ""
}
}
@@ -1,24 +0,0 @@
{
"temp": 0.63,
"rep_pen": 1.05,
"rep_pen_range": 2048,
"top_p": 0.98,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.98,
"rep_pen_slope": 0.1,
"sampler_order": [
6,
2,
0,
3,
5,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.7,
"rep_pen": 1.1,
"rep_pen_range": 1024,
"top_p": 0.5,
"top_a": 0.75,
"top_k": 0,
"typical": 0.19,
"tfs": 0.97,
"rep_pen_slope": 0.7,
"sampler_order": [
6,
5,
4,
3,
2,
1,
0
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.7,
"rep_pen": 1.1,
"rep_pen_range": 1024,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.9,
"rep_pen_slope": 0.7,
"sampler_order": [
6,
0,
1,
2,
3,
4,
5
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.66,
"rep_pen": 1.1,
"rep_pen_range": 1024,
"top_p": 1,
"top_a": 0.96,
"top_k": 0,
"typical": 0.6,
"tfs": 1,
"rep_pen_slope": 0.7,
"sampler_order": [
6,
4,
5,
1,
0,
2,
3
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.94,
"rep_pen": 1.05,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 12,
"typical": 1,
"tfs": 0.94,
"rep_pen_slope": 0.2,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.5,
"rep_pen": 1.1,
"rep_pen_range": 2048,
"top_p": 0.24,
"top_a": 0,
"top_k": 85,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.05,
"rep_pen": 1.1,
"rep_pen_range": 1024,
"top_p": 0.95,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0.7,
"sampler_order": [
6,
0,
1,
2,
3,
4,
5
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.06,
"rep_pen": 1,
"rep_pen_range": 0,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0.9,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"mirostat": 2,
"mirostat_tau": 9.61,
"mirostat_eta": 1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.17,
"rep_pen": 1,
"rep_pen_range": 0,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0.9,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"mirostat": 2,
"mirostat_tau": 9.91,
"mirostat_eta": 1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.17,
"rep_pen": 1,
"rep_pen_range": 0,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0.9,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"mirostat": 2,
"mirostat_tau": 9.62,
"mirostat_eta": 1,
"grammar": ""
}
@@ -1,12 +1,13 @@
{
"temp": 0.7,
"rep_pen": 1.15,
"rep_pen_range": 2048,
"temp": 1,
"rep_pen": 1,
"rep_pen_range": 0,
"top_p": 1,
"top_a": 0.2,
"min_p": 0,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.95,
"tfs": 1,
"rep_pen_slope": 0,
"sampler_order": [
6,
@@ -20,5 +21,6 @@
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"use_default_badwordsids": false,
"grammar": ""
}
}
@@ -1,24 +0,0 @@
{
"temp": 1.07,
"rep_pen": 1.05,
"rep_pen_range": 404,
"top_p": 1,
"top_a": 0,
"top_k": 100,
"typical": 1,
"tfs": 0.93,
"rep_pen_slope": 0.8,
"sampler_order": [
6,
0,
5,
3,
2,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.44,
"rep_pen": 1.15,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.9,
"rep_pen_slope": 6.8,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.35,
"rep_pen": 1.15,
"rep_pen_range": 2048,
"top_p": 1,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 0.69,
"rep_pen_slope": 0.1,
"sampler_order": [
6,
3,
2,
5,
0,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -3,6 +3,7 @@
"rep_pen": 1.1,
"rep_pen_range": 600,
"top_p": 0.95,
"min_p": 0.01,
"top_a": 0,
"top_k": 0,
"typical": 1,
@@ -20,5 +21,6 @@
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"use_default_badwordsids": false,
"grammar": ""
}
}
@@ -1,24 +0,0 @@
{
"temp": 1.31,
"rep_pen": 1.09,
"rep_pen_range": 2048,
"top_p": 0.29,
"top_a": 0,
"top_k": 72,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 0.72,
"rep_pen": 1.1,
"rep_pen_range": 2048,
"top_p": 0.73,
"top_a": 0,
"top_k": 0,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0.2,
"sampler_order": [
6,
5,
0,
2,
3,
1,
4
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,24 +0,0 @@
{
"temp": 1.01,
"rep_pen": 1.21,
"rep_pen_range": 2048,
"top_p": 0.21,
"top_a": 0.75,
"top_k": 91,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,7 +1,7 @@
{
"temp": 1.5,
"rep_pen": 1,
"rep_pen_range": 600,
"rep_pen_range": 0,
"top_p": 1,
"min_p": 0.1,
"top_a": 0,
@@ -1,7 +1,7 @@
{
"temp": 1.25,
"rep_pen": 1,
"rep_pen_range": 600,
"rep_pen_range": 0,
"top_p": 1,
"min_p": 0.1,
"top_a": 0,
@@ -1,7 +1,7 @@
{
"temp": 2,
"rep_pen": 1,
"rep_pen_range": 600,
"rep_pen_range": 0,
"top_p": 1,
"min_p": 0.1,
"top_a": 0,
@@ -1,24 +0,0 @@
{
"temp": 0.65,
"rep_pen": 1.18,
"rep_pen_range": 2048,
"top_p": 0.47,
"top_a": 0,
"top_k": 42,
"typical": 1,
"tfs": 1,
"rep_pen_slope": 0,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"mirostat": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"grammar": ""
}
@@ -1,85 +0,0 @@
{
"temp": 1.68,
"temperature_last": true,
"top_p": 0.17,
"top_k": 77,
"top_a": 0.42,
"tfs": 0.97,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.02,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.7,
"temperature_last": true,
"top_p": 0.92,
"top_k": 150,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 3,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 2,
"penalty_alpha": 0,
"num_beams": 10,
"length_penalty": 1.4,
"min_length": 200,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": true,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.87,
"temperature_last": true,
"top_p": 0.99,
"top_k": 85,
"top_a": 0,
"tfs": 0.68,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 0.68,
"min_p": 0,
"rep_pen": 1.01,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1,
"temperature_last": true,
"top_p": 1,
"top_k": 4,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0.6,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": false,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
+40 -7
View File
@@ -1,15 +1,15 @@
{
"temp": 0.7,
"temp": 1,
"temperature_last": true,
"top_p": 0.5,
"top_k": 40,
"top_p": 0.95,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.2,
"min_p": 0.01,
"rep_pen": 1.1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
@@ -44,12 +44,17 @@
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"json_schema": null,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
"presence_penalty",
"frequency_penalty",
"dry",
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_n_sigma",
"top_k",
"top_p",
"typical_p",
@@ -58,16 +63,40 @@
"tfs",
"top_a",
"min_p",
"mirostat"
"mirostat",
"xtc",
"encoder_repetition_penalty",
"no_repeat_ngram"
],
"samplers": [
"penalties",
"dry",
"top_n_sigma",
"top_k",
"typ_p",
"tfs_z",
"typical_p",
"xtc",
"top_p",
"min_p",
"temperature"
],
"samplers_priorities": [
"dry",
"penalties",
"no_repeat_ngram",
"temperature",
"top_nsigma",
"top_p_top_k",
"top_a",
"min_p",
"tfs",
"eta_cutoff",
"epsilon_cutoff",
"typical_p",
"quadratic",
"xtc"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
@@ -81,5 +110,9 @@
5
],
"logit_bias": [],
"xtc_threshold": 0.1,
"xtc_probability": 0,
"nsigma": 0,
"min_keep": 0,
"rep_pen_size": 0
}
@@ -9,7 +9,7 @@
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.18,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
@@ -44,12 +44,17 @@
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"json_schema": null,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
"presence_penalty",
"frequency_penalty",
"dry",
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_n_sigma",
"top_k",
"top_p",
"typical_p",
@@ -58,16 +63,40 @@
"tfs",
"top_a",
"min_p",
"mirostat"
"mirostat",
"xtc",
"encoder_repetition_penalty",
"no_repeat_ngram"
],
"samplers": [
"penalties",
"dry",
"top_n_sigma",
"top_k",
"typ_p",
"tfs_z",
"typical_p",
"xtc",
"top_p",
"min_p",
"temperature"
],
"samplers_priorities": [
"dry",
"penalties",
"no_repeat_ngram",
"temperature",
"top_nsigma",
"top_p_top_k",
"top_a",
"min_p",
"tfs",
"eta_cutoff",
"epsilon_cutoff",
"typical_p",
"quadratic",
"xtc"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
@@ -81,5 +110,9 @@
5
],
"logit_bias": [],
"xtc_threshold": 0.1,
"xtc_probability": 0,
"nsigma": 0,
"min_keep": 0,
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.31,
"temperature_last": true,
"top_p": 0.14,
"top_k": 49,
"top_a": 0.52,
"tfs": 1,
"epsilon_cutoff": 1.49,
"eta_cutoff": 10.42,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.17,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.7,
"temperature_last": true,
"top_p": 0.5,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 0.19,
"min_p": 0,
"rep_pen": 1.1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.66,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 0.6,
"min_p": 0,
"rep_pen": 1.1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.7,
"temperature_last": true,
"top_p": 0.1,
"top_k": 40,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.18,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 200,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.98,
"temperature_last": true,
"top_p": 0.37,
"top_k": 100,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.18,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.06,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 2,
"mirostat_tau": 9.61,
"mirostat_eta": 1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.17,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 2,
"mirostat_tau": 9.91,
"mirostat_eta": 1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.17,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 2,
"mirostat_tau": 9.62,
"mirostat_eta": 1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 2,
"mirostat_tau": 8,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.7,
"temperature_last": true,
"top_p": 0.85,
"top_k": 50,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,5 +1,5 @@
{
"temp": 0.44,
"temp": 1,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
@@ -9,7 +9,7 @@
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.15,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
@@ -44,12 +44,17 @@
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"json_schema": null,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
"presence_penalty",
"frequency_penalty",
"dry",
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_n_sigma",
"top_k",
"top_p",
"typical_p",
@@ -58,16 +63,40 @@
"tfs",
"top_a",
"min_p",
"mirostat"
"mirostat",
"xtc",
"encoder_repetition_penalty",
"no_repeat_ngram"
],
"samplers": [
"penalties",
"dry",
"top_n_sigma",
"top_k",
"typ_p",
"tfs_z",
"typical_p",
"xtc",
"top_p",
"min_p",
"temperature"
],
"samplers_priorities": [
"dry",
"penalties",
"no_repeat_ngram",
"temperature",
"top_nsigma",
"top_p_top_k",
"top_a",
"min_p",
"tfs",
"eta_cutoff",
"epsilon_cutoff",
"typical_p",
"quadratic",
"xtc"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
@@ -81,5 +110,9 @@
5
],
"logit_bias": [],
"xtc_threshold": 0.1,
"xtc_probability": 0,
"nsigma": 0,
"min_keep": 0,
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.8,
"temperature_last": true,
"top_p": 0.9,
"top_k": 100,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.15,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.99,
"temperature_last": true,
"top_p": 1,
"top_k": 100,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 0.97,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.63,
"temperature_last": true,
"top_p": 0.98,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.05,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.99,
"temperature_last": true,
"top_p": 0.85,
"top_k": 12,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.15,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.07,
"temperature_last": true,
"top_p": 1,
"top_k": 100,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.05,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.99,
"temperature_last": true,
"top_p": 0.18,
"top_k": 30,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.15,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.72,
"temperature_last": true,
"top_p": 0.73,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.53,
"temperature_last": true,
"top_p": 0.64,
"top_k": 33,
"top_a": 0.04,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.07,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.7,
"temperature_last": true,
"top_p": 0.9,
"top_k": 20,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.15,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.31,
"temperature_last": true,
"top_p": 0.29,
"top_k": 72,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.09,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.02,
"temperature_last": true,
"top_p": 0.95,
"top_k": 50,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.7,
"temperature_last": true,
"top_p": 1,
"top_k": 0,
"top_a": 0.2,
"tfs": 0.95,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.15,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 1.01,
"temperature_last": true,
"top_p": 0.21,
"top_k": 91,
"top_a": 0.75,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 10.78,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.21,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1.07,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -44,12 +44,17 @@
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"json_schema": null,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
"presence_penalty",
"frequency_penalty",
"dry",
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_n_sigma",
"top_k",
"top_p",
"typical_p",
@@ -58,16 +63,40 @@
"tfs",
"top_a",
"min_p",
"mirostat"
"mirostat",
"xtc",
"encoder_repetition_penalty",
"no_repeat_ngram"
],
"samplers": [
"penalties",
"dry",
"top_n_sigma",
"top_k",
"typ_p",
"tfs_z",
"typical_p",
"xtc",
"top_p",
"min_p",
"temperature"
],
"samplers_priorities": [
"dry",
"penalties",
"no_repeat_ngram",
"temperature",
"top_nsigma",
"top_p_top_k",
"top_a",
"min_p",
"tfs",
"eta_cutoff",
"epsilon_cutoff",
"typical_p",
"quadratic",
"xtc"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
@@ -81,5 +110,9 @@
4
],
"logit_bias": [],
"xtc_threshold": 0.1,
"xtc_probability": 0,
"nsigma": 0,
"min_keep": 0,
"rep_pen_size": 0
}
@@ -44,12 +44,17 @@
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"json_schema": null,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
"presence_penalty",
"frequency_penalty",
"dry",
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_n_sigma",
"top_k",
"top_p",
"typical_p",
@@ -58,16 +63,40 @@
"tfs",
"top_a",
"min_p",
"mirostat"
"mirostat",
"xtc",
"encoder_repetition_penalty",
"no_repeat_ngram"
],
"samplers": [
"penalties",
"dry",
"top_n_sigma",
"top_k",
"typ_p",
"tfs_z",
"typical_p",
"xtc",
"top_p",
"min_p",
"temperature"
],
"samplers_priorities": [
"dry",
"penalties",
"no_repeat_ngram",
"temperature",
"top_nsigma",
"top_p_top_k",
"top_a",
"min_p",
"tfs",
"eta_cutoff",
"epsilon_cutoff",
"typical_p",
"quadratic",
"xtc"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
@@ -81,5 +110,9 @@
4
],
"logit_bias": [],
"xtc_threshold": 0.1,
"xtc_probability": 0,
"nsigma": 0,
"min_keep": 0,
"rep_pen_size": 0
}
@@ -44,12 +44,17 @@
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"json_schema": null,
"banned_tokens": "",
"sampler_priority": [
"repetition_penalty",
"presence_penalty",
"frequency_penalty",
"dry",
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_n_sigma",
"top_k",
"top_p",
"typical_p",
@@ -58,16 +63,40 @@
"tfs",
"top_a",
"min_p",
"mirostat"
"mirostat",
"xtc",
"encoder_repetition_penalty",
"no_repeat_ngram"
],
"samplers": [
"penalties",
"dry",
"top_n_sigma",
"top_k",
"typ_p",
"tfs_z",
"typical_p",
"xtc",
"top_p",
"min_p",
"temperature"
],
"samplers_priorities": [
"dry",
"penalties",
"no_repeat_ngram",
"temperature",
"top_nsigma",
"top_p_top_k",
"top_a",
"min_p",
"tfs",
"eta_cutoff",
"epsilon_cutoff",
"typical_p",
"quadratic",
"xtc"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
@@ -81,5 +110,9 @@
4
],
"logit_bias": [],
"xtc_threshold": 0.1,
"xtc_probability": 0,
"nsigma": 0,
"min_keep": 0,
"rep_pen_size": 0
}
-85
View File
@@ -1,85 +0,0 @@
{
"temp": 0.82,
"temperature_last": true,
"top_p": 0.21,
"top_k": 72,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.19,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
5,
6,
0,
1,
2,
3,
4
],
"logit_bias": [],
"rep_pen_size": 0
}
@@ -1,85 +0,0 @@
{
"temp": 0.65,
"temperature_last": true,
"top_p": 0.47,
"top_k": 42,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0,
"rep_pen": 1.18,
"rep_pen_range": 0,
"rep_pen_decay": 0,
"rep_pen_slope": 1,
"no_repeat_ngram_size": 0,
"penalty_alpha": 0,
"num_beams": 1,
"length_penalty": 1,
"min_length": 0,
"encoder_rep_pen": 1,
"freq_pen": 0,
"presence_pen": 0,
"skew": 0,
"do_sample": true,
"early_stopping": false,
"dynatemp": false,
"min_temp": 0,
"max_temp": 2,
"dynatemp_exponent": 1,
"smoothing_factor": 0,
"smoothing_curve": 1,
"dry_allowed_length": 2,
"dry_multiplier": 0,
"dry_base": 1.75,
"dry_sequence_breakers": "[\"\\n\", \":\", \"\\\"\", \"*\"]",
"dry_penalty_last_n": 0,
"add_bos_token": true,
"ban_eos_token": false,
"skip_special_tokens": true,
"mirostat_mode": 0,
"mirostat_tau": 5,
"mirostat_eta": 0.1,
"guidance_scale": 1,
"negative_prompt": "",
"grammar_string": "",
"json_schema": {},
"banned_tokens": "",
"sampler_priority": [
"temperature",
"dynamic_temperature",
"quadratic_sampling",
"top_k",
"top_p",
"typical_p",
"epsilon_cutoff",
"eta_cutoff",
"tfs",
"top_a",
"min_p",
"mirostat"
],
"samplers": [
"top_k",
"tfs_z",
"typical_p",
"top_p",
"min_p",
"temperature"
],
"ignore_eos_token": false,
"spaces_between_special_tokens": true,
"speculative_ngram": false,
"sampler_order": [
6,
0,
1,
3,
4,
2,
5
],
"logit_bias": [],
"rep_pen_size": 0
}
+4 -2
View File
@@ -22,14 +22,15 @@
"world_info_budget_cap": 0
},
"textgenerationwebui_settings": {
"temp": 0.5,
"top_p": 0.9,
"temp": 1,
"top_p": 0.95,
"top_k": 0,
"top_a": 0,
"tfs": 1,
"epsilon_cutoff": 0,
"eta_cutoff": 0,
"typical_p": 1,
"min_p": 0.01,
"rep_pen": 1.1,
"rep_pen_range": 0,
"no_repeat_ngram_size": 0,
@@ -430,6 +431,7 @@
"rep_pen": 1.1,
"rep_pen_range": 600,
"top_p": 0.95,
"min_p": 0.01,
"top_a": 0,
"top_k": 0,
"typical": 1,
+425 -15
View File
@@ -1,12 +1,12 @@
{
"name": "sillytavern",
"version": "1.13.5",
"version": "1.14.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sillytavern",
"version": "1.13.5",
"version": "1.14.0",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
@@ -133,6 +133,7 @@
"@types/yargs": "^17.0.33",
"@types/yauzl": "^2.10.3",
"eslint": "^8.57.1",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jsdoc": "^48.10.0"
},
"engines": {
@@ -186,17 +187,20 @@
}
},
"node_modules/@eslint-community/eslint-utils": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
"integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
"version": "4.9.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
"integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==",
"dev": true,
"license": "MIT",
"dependencies": {
"eslint-visitor-keys": "^3.3.0"
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
},
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
}
@@ -2105,6 +2109,13 @@
"@types/jquery": "*"
}
},
"node_modules/@types/semver": {
"version": "7.7.1",
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
"integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/send": {
"version": "0.17.4",
"resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz",
@@ -2188,6 +2199,160 @@
"@types/node": "*"
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz",
"integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "5.62.0",
"@typescript-eslint/visitor-keys": "5.62.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/types": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz",
"integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz",
"integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"@typescript-eslint/types": "5.62.0",
"@typescript-eslint/visitor-keys": "5.62.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"semver": "^7.3.7",
"tsutils": "^3.21.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/debug": {
"version": "4.4.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.3"
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true,
"license": "MIT"
},
"node_modules/@typescript-eslint/utils": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz",
"integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@types/json-schema": "^7.0.9",
"@types/semver": "^7.3.12",
"@typescript-eslint/scope-manager": "5.62.0",
"@typescript-eslint/types": "5.62.0",
"@typescript-eslint/typescript-estree": "5.62.0",
"eslint-scope": "^5.1.1",
"semver": "^7.3.7"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/@typescript-eslint/utils/node_modules/eslint-scope": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"esrecurse": "^4.3.0",
"estraverse": "^4.1.1"
},
"engines": {
"node": ">=8.0.0"
}
},
"node_modules/@typescript-eslint/utils/node_modules/estraverse": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=4.0"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "5.62.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz",
"integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "5.62.0",
"eslint-visitor-keys": "^3.3.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@ungap/structured-clone": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
@@ -2590,9 +2755,9 @@
}
},
"node_modules/archiver-utils/node_modules/glob": {
"version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
"integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
"version": "10.5.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz",
"integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==",
"license": "ISC",
"dependencies": {
"foreground-child": "^3.1.0",
@@ -2739,6 +2904,16 @@
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
"license": "MIT"
},
"node_modules/array-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/ast-types": {
"version": "0.13.4",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
@@ -2913,6 +3088,19 @@
"concat-map": "0.0.1"
}
},
"node_modules/braces": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/browserslist": {
"version": "4.24.0",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz",
@@ -3906,6 +4094,19 @@
"md5": "^2.3.0"
}
},
"node_modules/dir-glob": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
"integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
"dev": true,
"license": "MIT",
"dependencies": {
"path-type": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/doctrine": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
@@ -4257,6 +4458,32 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-plugin-jest": {
"version": "27.9.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz",
"integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/utils": "^5.10.0"
},
"engines": {
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
},
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0",
"eslint": "^7.0.0 || ^8.0.0",
"jest": "*"
},
"peerDependenciesMeta": {
"@typescript-eslint/eslint-plugin": {
"optional": true
},
"jest": {
"optional": true
}
}
},
"node_modules/eslint-plugin-jsdoc": {
"version": "48.10.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.10.0.tgz",
@@ -4609,6 +4836,23 @@
"resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
"integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="
},
"node_modules/fast-glob": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
"integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
"glob-parent": "^5.1.2",
"merge2": "^1.3.0",
"micromatch": "^4.0.8"
},
"engines": {
"node": ">=8.6.0"
}
},
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
@@ -4702,6 +4946,19 @@
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
}
},
"node_modules/fill-range": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/finalhandler": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
@@ -5039,6 +5296,19 @@
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"license": "ISC",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/glob-to-regexp": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
@@ -5071,6 +5341,27 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/globby": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
"integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
"dev": true,
"license": "MIT",
"dependencies": {
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
"fast-glob": "^3.2.9",
"ignore": "^5.2.0",
"merge2": "^1.4.1",
"slash": "^3.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/google-translate-api-browser": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/google-translate-api-browser/-/google-translate-api-browser-3.0.1.tgz",
@@ -5633,6 +5924,16 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/is-path-inside": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
@@ -5762,9 +6063,9 @@
"license": "BSD-3-Clause"
},
"node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz",
"integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6076,6 +6377,16 @@
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
"license": "MIT"
},
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 8"
}
},
"node_modules/methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
@@ -6085,6 +6396,20 @@
"node": ">= 0.6"
}
},
"node_modules/micromatch": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
"braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
"node": ">=8.6"
}
},
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
@@ -6140,9 +6465,10 @@
}
},
"node_modules/min-document": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz",
"integrity": "sha512-9Wy1B3m3f66bPPmU5hdA4DR4PB2OfDU/+GS3yAB7IQozE3tqXaVv2zOjgla7MEGSRv95+ILmOuvhLkOK6wJtCQ==",
"version": "2.19.2",
"resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.2.tgz",
"integrity": "sha512-8S5I8db/uZN8r9HSLFVWPdJCvYOejMcEC82VIzNUc6Zkklf/d1gg2psfE79/vyhWOj4+J8MtwmoOz3TmvaGu5A==",
"license": "MIT",
"dependencies": {
"dom-walk": "^0.1.0"
}
@@ -6765,6 +7091,16 @@
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==",
"license": "MIT"
},
"node_modules/path-type": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
"integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/peek-readable": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-4.1.0.tgz",
@@ -6802,6 +7138,19 @@
"integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==",
"license": "ISC"
},
"node_modules/picomatch": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/platform": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
@@ -7656,6 +8005,16 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"license": "MIT"
},
"node_modules/slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/slashes": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz",
@@ -8028,6 +8387,19 @@
"integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==",
"license": "MIT"
},
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
},
"engines": {
"node": ">=8.0"
}
},
"node_modules/toidentifier": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
@@ -8089,6 +8461,29 @@
"node": ">=0.6.x"
}
},
"node_modules/tsutils": {
"version": "3.21.0",
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
"integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
"dev": true,
"license": "MIT",
"dependencies": {
"tslib": "^1.8.1"
},
"engines": {
"node": ">= 6"
},
"peerDependencies": {
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
}
},
"node_modules/tsutils/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true,
"license": "0BSD"
},
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -8146,6 +8541,21 @@
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==",
"license": "MIT"
},
"node_modules/typescript": {
"version": "5.9.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/uglify-js": {
"version": "3.19.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
+3 -2
View File
@@ -113,7 +113,7 @@
"type": "git",
"url": "https://github.com/SillyTavern/SillyTavern.git"
},
"version": "1.13.5",
"version": "1.14.0",
"scripts": {
"start": "node server.js",
"debug": "node --inspect server.js",
@@ -164,6 +164,7 @@
"@types/yargs": "^17.0.33",
"@types/yauzl": "^2.10.3",
"eslint": "^8.57.1",
"eslint-plugin-jsdoc": "^48.10.0"
"eslint-plugin-jsdoc": "^48.10.0",
"eslint-plugin-jest": "^27.9.0"
}
}
+103
View File
@@ -25,6 +25,16 @@
border-radius: 15px;
}
.mes .mes_file_wrapper:empty {
display: none;
}
.mes .mes_file_wrapper {
display: flex;
flex-direction: column;
gap: 0.5em;
}
.mes_file_container .right_menu_button {
padding-right: 0;
}
@@ -55,3 +65,96 @@
display: flex;
text-align: left;
}
/* Audio Player Styles */
.mes_audio_container {
cursor: default;
display: flex;
width: fit-content;
min-width: min(350px, 100%);
max-width: 100%;
background-color: var(--white20a);
border: 2px solid var(--SmartThemeBorderColor);
padding: 0.5em 1em;
border-radius: 15px;
}
.mes_audio_container .mes_img_swipes {
position: unset;
opacity: unset;
background: none;
padding: 0;
}
.mes_audio_container .mes_img_swipes .right_menu_button {
filter: brightness(75%);
text-shadow: none;
}
.mes_audio_container .mes_img_swipes .mes_img_swipe_counter {
filter: none;
text-shadow: none;
}
.audio-player {
display: flex;
flex-direction: column;
gap: 5px;
}
.audio-player-header {
display: flex;
flex-direction: row;
gap: 15px;
align-items: center;
justify-content: space-between;
}
.audio-player-title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.audio-player-controls {
display: flex;
align-items: center;
gap: 10px;
}
.audio-player-play-pause,
.audio-player-volume {
background: none;
border: none;
}
.audio-player-time-separator {
font-size: 0.9em;
text-align: center;
}
.audio-player-current-time,
.audio-player-total-time {
font-size: 0.9em;
color: var(--SmartThemeQuoteColor);
min-width: 40px;
text-align: center;
}
.audio-player-progress {
flex: 1;
height: 6px;
background-color: var(--black30a);
border-radius: 3px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.audio-player-progress-bar {
height: 100%;
background-color: var(--SmartThemeEmColor);
border-radius: 3px;
transition: width 0.1s linear;
width: 0%;
}
+18
View File
@@ -544,3 +544,21 @@ label[for="bind_preset_to_connection"]:has(input:checked) {
#openai_settings [data-cc-toggle="false"]>.icon-unsupported {
color: var(--golden);
}
#advanced-formatting-cc-notice {
display: none;
gap: 5px;
align-items: baseline;
margin: 5px 0;
padding: 5px 10px;
}
#top-settings-holder:has(#main_api option[value="openai"]:checked) #advanced-formatting-cc-notice {
display: flex;
}
#top-settings-holder:has(#main_api option[value="openai"]:checked) #AdvancedFormatting [data-cc-null] {
opacity: 0.5;
filter: grayscale(0.5);
cursor: not-allowed;
}
+8
View File
@@ -237,6 +237,14 @@
display: none;
}
.world_entry .select2-selection--multiple,
.world_entry textarea.keyprimarytextpole,
.world_entry textarea.keysecondarytextpole {
max-height: 160px;
overflow-y: auto;
overflow-x: hidden;
}
span.select2-container .select2-selection__choice__display:has(> .regex_item),
span.select2-container .select2-results__option:has(> .result_block .regex_item) {
background-color: #D27D2D30;
+84
View File
@@ -2,12 +2,96 @@ import libs from './lib';
import getContext from './scripts/st-context';
import { power_user } from './scripts/power-user';
import { QuickReplyApi } from './scripts/extensions/quick-reply/api/QuickReplyApi';
import { oai_settings } from './scripts/openai';
import { textgenerationwebui_settings } from './scripts/textgen-settings';
import { FileAttachment } from './scripts/chats';
import { ReasoningMessageExtra } from './scripts/reasoning';
declare global {
// Custom types
type InstructSettings = typeof power_user.instruct;
type ContextSettings = typeof power_user.context;
type ReasoningSettings = typeof power_user.reasoning;
type ChatCompletionSettings = typeof oai_settings;
type TextCompletionSettings = typeof textgenerationwebui_settings;
type MessageTimestamp = string | number | Date;
interface ChatMessage {
name?: string;
mes?: string;
title?: string;
gen_started?: MessageTimestamp;
gen_finished?: MessageTimestamp;
send_date?: MessageTimestamp;
is_user?: boolean;
is_system?: boolean;
force_avatar?: string;
original_avatar?: string;
swipes?: string[];
swipe_info?: Record<string, any>;
swipe_id?: number;
extra?: ChatMessageExtra & Partial<ReasoningMessageExtra> & Record<string, any>;
};
interface ChatMessageExtra {
bias?: string;
uses_system_ui?: boolean;
memory?: string;
display_text?: string;
reasoning_display_text?: string;
tool_invocations?: any[];
title?: string;
isSmallSys?: boolean;
token_count?: number;
files?: FileAttachment[];
inline_image?: boolean;
media_display?: string;
media_index?: number;
media?: MediaAttachment[],
/** @deprecated Use `files` instead */
file?: FileAttachment;
/** @deprecated Use `media` instead */
image?: string;
/** @deprecated Use `media` instead */
video?: string;
/** @deprecated Use `media` with `media_display = 'gallery'` instead */
image_swipes?: string[];
/** @deprecated Use `MediaAttachment.append_title` instead */
append_title?: boolean;
/** @deprecated Use `MediaAttachment.generation_type` instead */
generationType?: number;
/** @deprecated Use `MediaAttachment.negative` instead */
negative?: string;
}
type MediaAttachment = MediaAttachmentProps & ImageGenerationAttachmentProps & ImageCaptionAttachmentProps;
interface MediaAttachmentProps {
url: string;
title?: string;
type: string;
source?: string;
}
interface ImageGenerationAttachmentProps {
generation_type?: number;
negative?: string;
}
interface ImageCaptionAttachmentProps {
/** Append title to the message text in case of non-inline captions. */
append_title?: boolean;
/** Marker for captioned images to prevent auto-caption from firing again. */
captioned?: boolean;
}
/** Media playback state */
interface MediaState {
/** Current playback time */
currentTime: number;
/** Whether the media is paused */
paused: boolean;
}
// Global namespace modules
interface Window {
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="142.22" height="68.010002" viewBox="0 0 142.22 68.010002" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<path d="M 136.05,0 H 74.21 c -3.42,0 -6.18,2.77 -6.18,6.18 v 18.55 c 0,3.42 -2.77,6.18 -6.18,6.18 H 6.18 C 2.76,30.91 0,33.68 0,37.09 v 24.74 c 0,3.42 2.77,6.18 6.18,6.18 h 61.84 c 3.42,0 6.18,-2.77 6.18,-6.18 V 43.28 c 0,-3.42 2.77,-6.18 6.18,-6.18 h 55.66 c 3.42,0 6.18,-2.77 6.18,-6.18 V 6.18 C 142.22,2.76 139.45,0 136.04,0 Z" />
</svg>

After

Width:  |  Height:  |  Size: 560 B

+3
View File
@@ -0,0 +1,3 @@
<svg version="1.1" x="0" y="0" xml:space="preserve" id="svg6" width="18.60156" height="15.82031" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18.60156 15.82031">
<path id="path2" d="M.4707 0v2.33008h7.09961c.36 0 .7004-.1807.9004-.4707L9.77147.00977S.4607.01.4707 0zm10.68946.00977L0 15.8203h7.4414L18.60157.00977Zm-.11914 13.48046c-.36 0-.7004.1807-.9004.4707l-1.31054 1.85938h9.30078v-2.33008z"/>
</svg>

After

Width:  |  Height:  |  Size: 414 B

+266 -133
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "يجمع الرسائل المتتالية للنظام في رسالة واحدة (باستثناء الحوارات المثالية). قد يحسن التتابع لبعض النماذج.",
"Enable function calling": "تمكين استدعاء الوظيفة",
"Send inline images": "إرسال الصور المضمنة",
"image_inlining_hint_1": "يرسل الصور في المطالبات إذا كان النموذج يدعمها .\n استخدم ال",
"image_inlining_hint_1": "يرسل الصور في المطالبات إذا كان النموذج يدعمها .",
"image_inlining_hint_2": "الإجراء على أي رسالة أو",
"image_inlining_hint_3": "القائمة لإرفاق ملف صورة للدردشة.",
"Inline Image Quality": "جودة الصورة المضمنة",
+1 -1
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Kombiniert aufeinanderfolgende Systemnachrichten zu einer (ausschließlich Beispiel-Dialoge ausgeschlossen). Kann die Kohärenz für einige Modelle verbessern.",
"Enable function calling": "Funktionsaufruf aktivieren",
"Send inline images": "Inline-Bilder senden",
"image_inlining_hint_1": "Sendet Bilder in Eingabeaufforderungen, wenn das Modell dies unterstützt.\nVerwenden Sie die",
"image_inlining_hint_1": "Sendet Bilder in Eingabeaufforderungen, wenn das Modell dies unterstützt.",
"image_inlining_hint_2": "Aktion auf eine Nachricht oder die",
"image_inlining_hint_3": "Menü, um eine Bilddatei an den Chat anzuhängen.",
"Inline Image Quality": "Inline-Bildqualität",
+1 -1
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina mensajes del sistema consecutivos en uno solo (excluyendo diálogos de ejemplo). Puede mejorar la coherencia para algunos modelos.",
"Enable function calling": "Habilitar llamada a función",
"Send inline images": "Enviar imágenes en línea",
"image_inlining_hint_1": "Envía imágenes en mensajes si el modelo lo admite.\n Utilizar el",
"image_inlining_hint_1": "Envía imágenes en mensajes si el modelo lo admite.",
"image_inlining_hint_2": "acción sobre cualquier mensaje o el",
"image_inlining_hint_3": "menú para adjuntar un archivo de imagen al chat.",
"Inline Image Quality": "Calidad de imagen en línea",
+1 -1
View File
@@ -227,7 +227,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combine les messages système consécutifs en un seul (à l'exclusion des dialogues d'exemple). Peut améliorer la cohérence pour certains modèles.",
"Enable function calling": "Activer l'appel de fonction",
"Send inline images": "Envoyer des images en ligne",
"image_inlining_hint_1": "Envoie des images dans les prompts si le modèle le prend en charge.\nUtilisez le",
"image_inlining_hint_1": "Envoie des images dans les prompts si le modèle le prend en charge.",
"image_inlining_hint_2": "action sur n'importe quel message ou le",
"image_inlining_hint_3": "menu pour joindre un fichier image au chat.",
"Inline Image Quality": "Qualité d'image en ligne",
+1 -1
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Sameinar samhliða kerfisskilaboð í eitt (sem er utan umsagna dæmum). Getur bætt samfelldni fyrir sumar módel.",
"Enable function calling": "Virkja aðgerðarkall",
"Send inline images": "Senda myndir í línu",
"image_inlining_hint_1": "Sendir myndir í skilaboðum ef líkanið styður það.\n Nota",
"image_inlining_hint_1": "Sendir myndir í skilaboðum ef líkanið styður það.",
"image_inlining_hint_2": "aðgerð á hvaða skilaboðum sem er eða",
"image_inlining_hint_3": "valmynd til að hengja myndskrá við spjallið.",
"Inline Image Quality": "Innbyggð myndgæði",
+1 -1
View File
@@ -235,7 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina i messaggi di sistema consecutivi in uno solo (escludendo i dialoghi di esempio). Potrebbe migliorare la coerenza per alcuni modelli.",
"Enable function calling": "Abilita la chiamata alla funzione",
"Send inline images": "Invia immagini inline",
"image_inlining_hint_1": "Invia immagini nei prompt se il modello lo supporta.\n Usa il",
"image_inlining_hint_1": "Invia immagini nei prompt se il modello lo supporta.",
"image_inlining_hint_2": "azione su qualsiasi messaggio o il",
"image_inlining_hint_3": "menu per allegare un file immagine alla chat.",
"Inline Image Quality": "Qualità dell'immagine in linea",
+1 -3
View File
@@ -237,9 +237,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "연속된 시스템 메시지를 하나로 결합합니다(예제 대화 제외). 일부 모델의 일관성을 향상시킬 수 있습니다.",
"Enable function calling": "함수 호출 활성화",
"Send inline images": "인라인 이미지 전송",
"image_inlining_hint_1": "모델이 지원하는 경우 메시지로 이미지를 보냅니다.\n 사용",
"image_inlining_hint_2": "메시지에 대한 조치 또는",
"image_inlining_hint_3": "채팅에 이미지 파일을 첨부하는 메뉴입니다.",
"image_inlining_hint_1": "모델이 지원하는 경우 메시지로 이미지를 보냅니다.",
"Inline Image Quality": "인라인 이미지 품질",
"openai_inline_image_quality_auto": "자동",
"openai_inline_image_quality_low": "낮은",
+1 -3
View File
@@ -235,9 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combineert opeenvolgende systeemberichten tot één (exclusief voorbeeld dialogen). Kan de coherentie verbeteren voor sommige modellen.",
"Enable function calling": "Schakel functieaanroepen in",
"Send inline images": "Inline afbeeldingen verzenden",
"image_inlining_hint_1": "Verzendt afbeeldingen in prompts als het model dit ondersteunt.\n Gebruik de",
"image_inlining_hint_2": "actie op elk bericht of de",
"image_inlining_hint_3": "menu om een ​​afbeeldingsbestand aan de chat toe te voegen.",
"image_inlining_hint_1": "Verzendt afbeeldingen in prompts als het model dit ondersteunt.",
"Inline Image Quality": "Inline-beeldkwaliteit",
"openai_inline_image_quality_auto": "Auto",
"openai_inline_image_quality_low": "Laag",
+1 -3
View File
@@ -235,9 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Combina mensagens do sistema consecutivas em uma (excluindo diálogos de exemplo). Pode melhorar a coerência para alguns modelos.",
"Enable function calling": "Habilitar chamada de função",
"Send inline images": "Enviar imagens inline",
"image_inlining_hint_1": "Envia imagens em prompts se o modelo suportar.\n Use o",
"image_inlining_hint_2": "ação em qualquer mensagem ou",
"image_inlining_hint_3": "menu para anexar um arquivo de imagem ao chat.",
"image_inlining_hint_1": "Envia imagens em prompts se o modelo suportar.",
"Inline Image Quality": "Qualidade de imagem embutida",
"openai_inline_image_quality_auto": "Auto",
"openai_inline_image_quality_low": "Baixo",
+2 -6
View File
@@ -1020,9 +1020,7 @@
"The prompt to be sent.": "Текст промпта.",
"prompt_manager_forbid_overrides": "Запретить перезапись",
"This prompt cannot be overridden by character cards, even if overrides are preferred.": "Карточка персонажа не сможет перезаписать этот промпт, даже если настройки отдают приоритет именно ей.",
"image_inlining_hint_1": "Отправлять картинки как часть промпта, если позволяет модель. Чтобы добавить в чат изображение, используйте на нужном сообщении действие",
"image_inlining_hint_2": ". Также это можно сделать через меню",
"image_inlining_hint_3": ".",
"image_inlining_hint_1": "Отправлять картинки как часть промпта, если позволяет модель.",
"Contest Winners": "Победители конкурса",
"Rename Background": "Переименовать фон",
"Lock": "Закрепить",
@@ -2445,9 +2443,7 @@
"Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.": "Отводит часть ответа под рассуждения (Минимальные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 95%), но минимум 1024 токена. При выборе значение Авто рассуждения не запрашиваются.",
"Use system prompt": "Включить системный промпт",
"Send inline videos": "Отправлять inline-видео",
"video_inlining_hint_1": "Отправляет модели видео, если она поддерживает такую возможность. Чтобы прикрепить видео к чату, используйте на любом сообщении кнопку",
"video_inlining_hint_2": "либо меню",
"video_inlining_hint_3": ".",
"video_inlining_hint_1": "Отправляет модели видео, если она поддерживает такую возможность.",
"video_inlining_hint_4": "Видео должно весить не более 20 Мб и длиться не дольше 1 минуты.",
"Allocates a portion of the response length for thinking (Flash 2.5/Pro 2.5) (min: 0/128 tokens, low: 10%, medium: 25%, high: 50%, max: 24576/32768 tokens). Auto lets the model decide.": "Отводит часть ответа под рассуждения (Flash 2.5/Pro 2.5) (Минимальные: 0/128 токенов, Поверхностные: 10%, Обычные: 25%, Подробные: 50%, Максимальные: 24576/32768 токенов). При выборе значения Авто модель определяет объём самостоятельно.",
"Google Vertex AI Configuration": "Настройки Google Vertex AI",
+2 -4
View File
@@ -241,9 +241,7 @@
"Allows the model to return its thinking process.": "อนุญาตให้โมเดลส่งคืนกระบวนการคิดของตัวเอง",
"This setting affects visibility only.": "การตั้งค่านี้มีผลต่อการมองเห็นเท่านั้น",
"Send inline images": "ส่งรูปภาพแบบ inline",
"image_inlining_hint_1": "ส่งรูปภาพในพรอมต์หากโมเดลรองรับ โดยใช้",
"image_inlining_hint_2": "เพื่อดำเนินการในข้อความนั้นๆ หรือใช้ตัวเลือก",
"image_inlining_hint_3": "เพื่อแนบไฟล์รูปภาพลงในแชท",
"image_inlining_hint_1": "ส่งรูปภาพในพรอมต์หากโมเดลรองรับ",
"Inline Image Quality": "คุณภาพรูปภาพ Inline",
"openai_inline_image_quality_auto": "อัตโนมัติ",
"openai_inline_image_quality_low": "ต่ำ",
@@ -1458,4 +1456,4 @@
"Stop Inspecting": "Stop Inspecting",
"Inspect Prompts": "ตรวจสอบ Prompt",
"Toggle prompt inspection": "สลับการตรวจสอบ Prompt"
}
}
+1 -3
View File
@@ -235,9 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Об'єднує послідовні системні повідомлення в одне (крім прикладів діалогів). Може покращити співпрацю для деяких моделей.",
"Enable function calling": "Увімкнути виклик функцій",
"Send inline images": "Надсилати вбудовані зображення",
"image_inlining_hint_1": "Надсилає зображення у підказках, якщо модель це підтримує.\n Використовувати",
"image_inlining_hint_2": "дії з будь-яким повідомленням або",
"image_inlining_hint_3": "меню, щоб прикріпити файл зображення до чату.",
"image_inlining_hint_1": "Надсилає зображення у підказках, якщо модель це підтримує.",
"Inline Image Quality": "Якість вбудованого зображення",
"openai_inline_image_quality_auto": "Авто",
"openai_inline_image_quality_low": "Низький",
+1 -3
View File
@@ -235,9 +235,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "Kết hợp các tin nhắn hệ thống liên tiếp thành một (loại bỏ các đoạn hội thoại mẫu). Có thể cải thiện tính nhất quán cho một số model.",
"Enable function calling": "Sử dụng tính năng gọi hàm (function calling)",
"Send inline images": "Gửi hình ảnh nội bộ",
"image_inlining_hint_1": "Gửi hình ảnh theo Prompt nếu kiểu máy hỗ trợ.\n Sử dụng",
"image_inlining_hint_2": "hành động đối với bất kỳ tin nhắn nào hoặc",
"image_inlining_hint_3": "menu để đính kèm tệp hình ảnh vào cuộc trò chuyện.",
"image_inlining_hint_1": "Gửi hình ảnh theo Prompt nếu kiểu máy hỗ trợ.",
"Inline Image Quality": "Chất lượng hình ảnh nội tuyến",
"openai_inline_image_quality_auto": "Tự động",
"openai_inline_image_quality_low": "Thấp",
+6 -6
View File
@@ -269,17 +269,13 @@
"enable_functions_desc_3": "可以被各种扩展利用来提供附加功能。",
"enable_functions_desc_4": "当提示词后处理没有选择工具时不支持。",
"Send inline images": "发送图片",
"image_inlining_hint_1": "如果模型支持,就可以在提示词中发送图片。\n发送消息时,点击",
"image_inlining_hint_2": "在这里(",
"image_inlining_hint_3": ")将图片添加到消息中。",
"image_inlining_hint_1": "如果模型支持,就可以在提示词中发送图片。",
"Inline Image Quality": "图片画质",
"openai_inline_image_quality_auto": "自动",
"openai_inline_image_quality_low": "低",
"openai_inline_image_quality_high": "高",
"Send inline videos": "发送视频",
"video_inlining_hint_1": "当模型支持时,将视频发送给模型。使用",
"video_inlining_hint_2": "在任意消息上添加视频,或",
"video_inlining_hint_3": "菜单来添加视频。",
"video_inlining_hint_1": "当模型支持时,将视频发送给模型。",
"video_inlining_hint_4": "视频必须在 20MB 以下且时长不超过1分钟。",
"Request inline images": "请求图片返回",
"Allows the model to return image attachments.": "允许模型返回图片附件。",
@@ -2276,6 +2272,10 @@
"Drag handle to reorder. Click name to rename. Click color to change display.": "拖拽左侧三条横线以排序,点击名字以重命名,点击调色盘以切换颜色。",
"Click on the folder icon to use this tag as a folder.": "点击文件夹图标来将此标签作为一个文件夹。",
"Use alphabetical sorting": "按字母顺序排列",
"Sort mode": "排序模式",
"Manual (Drag & Drop)": "手动 (拖放)",
"Alphabetical (A-Z)": "按字母 (A-Z)",
"Most Used (By Count)": "按使用次数",
"tags_sorting_desc": "启用后,标签在创建或重命名时会自动按字母顺序排序。\n禁用后,新标签会追加到末尾。\n\n如果通过拖动手动重新排列标签,则自动排序将被禁用。",
"Are you sure you want to delete the theme?": "你确定要删除这个主题吗?",
"Hi,": "嗨,",
+6 -6
View File
@@ -236,9 +236,7 @@
"Combines consecutive system messages into one (excluding example dialogues). May improve coherence for some models.": "將連續的系統訊息合併為一個(不包括對話範例)。可能會提高某些模型的一致性。",
"Enable function calling": "啟用函式呼叫",
"Send inline images": "傳送內嵌圖片",
"image_inlining_hint_1": "如果模型支援,則在提示詞中傳送圖片。\n使用任何訊息上的",
"image_inlining_hint_2": "動作或",
"image_inlining_hint_3": "選單來附加圖片文件到聊天中。",
"image_inlining_hint_1": "如果模型支援,則在提示詞中傳送圖片。",
"Inline Image Quality": "內嵌圖片品質",
"openai_inline_image_quality_auto": "自動",
"openai_inline_image_quality_low": "低",
@@ -2109,6 +2107,10 @@
"Drag handle to reorder. Click name to rename. Click color to change display.": "拖動以重新排序。點選名稱重新命名。點選顏色更改顯示。",
"Click on the folder icon to use this tag as a folder.": "點選資料夾圖示以將此標籤作為資料夾。",
"Use alphabetical sorting": "按字母順序排序 ",
"Sort mode": "排序模式",
"Manual (Drag & Drop)": "手動(拖放)",
"Alphabetical (A-Z)": "按字母(A-Z)",
"Most Used (By Count)": "按使用次數",
"tags_sorting_desc": "啟用後,標籤將在建立或重新命名時將自動按字母排序。\n停用時,新標籤將附加到結尾。\n若標籤被手動拖動重新排序,則自動排序將被停用。",
"and connect to an": "並連線到",
"You can add more": "您可加入更多",
@@ -2646,9 +2648,7 @@
"Min Keep": "最小保留",
"enable_functions_desc_4": "當使用「無工具」提示後處理時不支援!",
"Send inline videos": "傳送內嵌影片",
"video_inlining_hint_1": "若模型支援,則在提示中傳送影片。使用",
"video_inlining_hint_2": "操作於任何訊息或使用",
"video_inlining_hint_3": "選單以上傳影片檔案到聊天中。",
"video_inlining_hint_1": "若模型支援,則在提示中傳送影片。",
"video_inlining_hint_4": "影片大小必須小於 20 MB 且長度低於 1 分鐘",
"This setting affects visibility only.": "此設定僅影響可見性。",
"Allocates a portion of the response length for thinking (min: 1024 tokens, low: 10%, medium: 25%, high: 50%, max: 95%), but minimum 1024 tokens. Auto does not request thinking.": "為推理部分分配回應長度(最大回應長度至少需 1024 符元,低:10%、中:25%、高:50%、最高:95%)。選擇「自動」將不請求推理。",
+1384 -759
View File
File diff suppressed because it is too large Load Diff
+5 -2
View File
@@ -19,6 +19,7 @@ import {
substituteParams,
sendTextareaMessage,
doNavbarIconClick,
isSwipingAllowed,
} from '../script.js';
import {
@@ -402,6 +403,7 @@ function RA_autoconnect(PrevApi) {
|| (secret_state[SECRET_KEYS.COHERE] && oai_settings.chat_completion_source == chat_completion_sources.COHERE)
|| (secret_state[SECRET_KEYS.PERPLEXITY] && oai_settings.chat_completion_source == chat_completion_sources.PERPLEXITY)
|| (secret_state[SECRET_KEYS.GROQ] && oai_settings.chat_completion_source == chat_completion_sources.GROQ)
|| (secret_state[SECRET_KEYS.SILICONFLOW] && oai_settings.chat_completion_source == chat_completion_sources.SILICONFLOW)
|| (secret_state[SECRET_KEYS.ELECTRONHUB] && oai_settings.chat_completion_source == chat_completion_sources.ELECTRONHUB)
|| (secret_state[SECRET_KEYS.NANOGPT] && oai_settings.chat_completion_source == chat_completion_sources.NANOGPT)
|| (secret_state[SECRET_KEYS.DEEPSEEK] && oai_settings.chat_completion_source == chat_completion_sources.DEEPSEEK)
@@ -410,6 +412,7 @@ function RA_autoconnect(PrevApi) {
|| (secret_state[SECRET_KEYS.MOONSHOT] && oai_settings.chat_completion_source == chat_completion_sources.MOONSHOT)
|| (secret_state[SECRET_KEYS.FIREWORKS] && oai_settings.chat_completion_source == chat_completion_sources.FIREWORKS)
|| (secret_state[SECRET_KEYS.COMETAPI] && oai_settings.chat_completion_source == chat_completion_sources.COMETAPI)
|| (secret_state[SECRET_KEYS.ZAI] && oai_settings.chat_completion_source == chat_completion_sources.ZAI)
|| (oai_settings.chat_completion_source === chat_completion_sources.POLLINATIONS)
|| (isValidUrl(oai_settings.custom_url) && oai_settings.chat_completion_source == chat_completion_sources.CUSTOM)
|| (secret_state[SECRET_KEYS.AZURE_OPENAI] && oai_settings.chat_completion_source == chat_completion_sources.AZURE_OPENAI)
@@ -1109,8 +1112,8 @@ export function initRossMods() {
if (event.key == 'ArrowLeft') { //swipes left
if (
isSwipingAllowed &&
!isNanogallery2LightboxActive() && // Check if lightbox is NOT active
$('.swipe_left:last').css('display') === 'flex' &&
$('#send_textarea').val() === '' &&
$('#character_popup').css('display') === 'none' &&
$('#shadow_select_chat_popup').css('display') === 'none' &&
@@ -1123,8 +1126,8 @@ export function initRossMods() {
}
if (event.key == 'ArrowRight') { //swipes right
if (
isSwipingAllowed &&
!isNanogallery2LightboxActive() && // Check if lightbox is NOT active
$('.swipe_right:last').css('display') === 'flex' &&
$('#send_textarea').val() === '' &&
$('#character_popup').css('display') === 'none' &&
$('#shadow_select_chat_popup').css('display') === 'none' &&
+605
View File
@@ -0,0 +1,605 @@
import { formatTime } from './utils.js';
export class AudioPlayer {
/**
* Creates an audio player instance
* @param {HTMLElement} audioElement - The audio element to control
* @param {HTMLElement} containerElement - The container element with player controls
* @param {Object} options - Configuration options
*/
constructor(audioElement, containerElement, options = {}) {
if (!(audioElement instanceof HTMLAudioElement)) {
throw new Error('First argument must be an HTMLAudioElement');
}
if (!(containerElement instanceof HTMLElement)) {
throw new Error('Second argument must be an HTMLElement');
}
this.audio = audioElement;
this.container = containerElement;
this.options = {
title: '',
autoplay: false,
volume: 1.0,
onPlay: null,
onPause: null,
onEnded: null,
onTimeUpdate: null,
onVolumeChange: null,
...options,
};
this.isDragging = false;
this.isDestroyed = false;
// Store bound event handlers for cleanup
this.boundHandlers = {
// Audio event handlers
audioLoadedMetadata: this.onAudioLoadedMetadata.bind(this),
audioTimeUpdate: this.onAudioTimeUpdate.bind(this),
audioPlay: this.onAudioPlay.bind(this),
audioPause: this.onAudioPause.bind(this),
audioEnded: this.onAudioEnded.bind(this),
audioVolumeChange: this.onAudioVolumeChange.bind(this),
// Control event handlers
playPauseClick: this.onPlayPauseClick.bind(this),
volumeClick: this.onVolumeClick.bind(this),
volumeInput: this.onVolumeInput.bind(this),
progressMouseDown: this.onProgressMouseDown.bind(this),
progressClick: this.onProgressClick.bind(this),
progressMouseMove: this.onProgressMouseMove.bind(this),
documentMouseMove: this.onDocumentMouseMove.bind(this),
documentMouseUp: this.onDocumentMouseUp.bind(this),
};
// MutationObserver for DOM cleanup detection
this.observer = null;
this.init();
}
/**
* Initializes the audio player by setting up elements, events, and initial state
* @returns {void}
*/
init() {
this.findElements();
this.bindEvents();
this.setupDOMObserver();
if (this.options.title) {
this.setTitle(this.options.title);
} else if (this.audio.title) {
this.setTitle(this.audio.title);
} else if (this.audio.src) {
const srcParts = this.audio.src.split('/');
this.setTitle(decodeURIComponent(srcParts[srcParts.length - 1]));
}
if (this.options.autoplay) {
this.play();
}
this.setVolume(this.options.volume);
// Initialize time displays
this.updateTimeDisplays();
}
/**
* Finds and caches all required DOM elements within the container
* @returns {void}
*/
findElements() {
this.elements = {
title: this.container.querySelector('.audio-player-title'),
playPauseBtn: this.container.querySelector('.audio-player-play-pause'),
currentTime: this.container.querySelector('.audio-player-current-time'),
totalTime: this.container.querySelector('.audio-player-total-time'),
progress: this.container.querySelector('.audio-player-progress'),
progressBar: this.container.querySelector('.audio-player-progress-bar'),
volumeBtn: this.container.querySelector('.audio-player-volume'),
};
// Validate required elements
const requiredElements = ['playPauseBtn', 'currentTime', 'totalTime', 'progress', 'progressBar', 'volumeBtn'];
for (const key of requiredElements) {
if (!this.elements[key]) {
console.warn(`AudioPlayer: Required element .audio-player-${key.replace(/([A-Z])/g, '-$1').toLowerCase()} not found`);
}
}
}
/**
* Sets up a MutationObserver to detect when audio or container elements are removed from DOM
* @returns {void}
*/
setupDOMObserver() {
// Watch for removal of audio or container from DOM
this.observer = new MutationObserver((mutations) => {
for (const mutation of mutations) {
for (const node of mutation.removedNodes) {
if (node === this.audio || node === this.container ||
node.contains?.(this.audio) || node.contains?.(this.container)) {
this.destroy();
return;
}
}
}
});
// Observe the parent nodes
const chatParent = this.audio.closest('#chat') ?? document.body;
if (chatParent) {
this.observer.observe(chatParent, { childList: true, subtree: true });
}
}
/**
* Binds all event listeners to audio and control elements
* @returns {void}
*/
bindEvents() {
// Audio events
this.audio.addEventListener('loadedmetadata', this.boundHandlers.audioLoadedMetadata);
this.audio.addEventListener('timeupdate', this.boundHandlers.audioTimeUpdate);
this.audio.addEventListener('play', this.boundHandlers.audioPlay);
this.audio.addEventListener('pause', this.boundHandlers.audioPause);
this.audio.addEventListener('ended', this.boundHandlers.audioEnded);
this.audio.addEventListener('volumechange', this.boundHandlers.audioVolumeChange);
// Control events
if (this.elements.playPauseBtn) {
this.elements.playPauseBtn.addEventListener('click', this.boundHandlers.playPauseClick);
}
if (this.elements.volumeBtn) {
this.elements.volumeBtn.addEventListener('click', this.boundHandlers.volumeClick);
}
if (this.elements.progress) {
this.elements.progress.addEventListener('mousedown', this.boundHandlers.progressMouseDown);
this.elements.progress.addEventListener('click', this.boundHandlers.progressClick);
this.elements.progress.addEventListener('mousemove', this.boundHandlers.progressMouseMove);
}
}
/**
* Removes all event listeners from audio and control elements
* @returns {void}
*/
unbindEvents() {
// Audio events
this.audio.removeEventListener('loadedmetadata', this.boundHandlers.audioLoadedMetadata);
this.audio.removeEventListener('timeupdate', this.boundHandlers.audioTimeUpdate);
this.audio.removeEventListener('play', this.boundHandlers.audioPlay);
this.audio.removeEventListener('pause', this.boundHandlers.audioPause);
this.audio.removeEventListener('ended', this.boundHandlers.audioEnded);
this.audio.removeEventListener('volumechange', this.boundHandlers.audioVolumeChange);
// Control events
if (this.elements.playPauseBtn) {
this.elements.playPauseBtn.removeEventListener('click', this.boundHandlers.playPauseClick);
}
if (this.elements.volumeBtn) {
this.elements.volumeBtn.removeEventListener('click', this.boundHandlers.volumeClick);
}
if (this.elements.progress) {
this.elements.progress.removeEventListener('mousedown', this.boundHandlers.progressMouseDown);
this.elements.progress.removeEventListener('click', this.boundHandlers.progressClick);
this.elements.progress.removeEventListener('mousemove', this.boundHandlers.progressMouseMove);
}
// Document events
document.removeEventListener('mousemove', this.boundHandlers.documentMouseMove);
document.removeEventListener('mouseup', this.boundHandlers.documentMouseUp);
}
// Audio event handlers
/**
* Handles the audio element's loadedmetadata event
* @returns {void}
*/
onAudioLoadedMetadata() {
if (this.isDestroyed) return;
this.updateTimeDisplays();
}
/**
* Handles the audio element's timeupdate event
* @returns {void}
*/
onAudioTimeUpdate() {
if (this.isDestroyed || this.isDragging) return;
const percent = (this.audio.currentTime / this.audio.duration) * 100 || 0;
if (this.elements.progressBar) {
/** @type {HTMLElement} */ (this.elements.progressBar).style.width = percent + '%';
}
if (this.elements.currentTime) {
this.elements.currentTime.textContent = formatTime(this.audio.currentTime);
}
if (typeof this.options.onTimeUpdate === 'function') {
this.options.onTimeUpdate.call(this, this.audio.currentTime, this.audio.duration);
}
}
/**
* Handles the audio element's play event
* @returns {void}
*/
onAudioPlay() {
if (this.isDestroyed) return;
if (this.elements.playPauseBtn) {
this.elements.playPauseBtn.classList.remove('fa-play');
this.elements.playPauseBtn.classList.add('fa-pause');
this.elements.playPauseBtn.setAttribute('title', 'Pause');
}
if (typeof this.options.onPlay === 'function') {
this.options.onPlay.call(this);
}
}
/**
* Handles the audio element's pause event
* @returns {void}
*/
onAudioPause() {
if (this.isDestroyed) return;
if (this.elements.playPauseBtn) {
this.elements.playPauseBtn.classList.remove('fa-pause');
this.elements.playPauseBtn.classList.add('fa-play');
this.elements.playPauseBtn.setAttribute('title', 'Play');
}
if (typeof this.options.onPause === 'function') {
this.options.onPause.call(this);
}
}
/**
* Handles the audio element's ended event
* @returns {void}
*/
onAudioEnded() {
if (this.isDestroyed) return;
if (this.elements.playPauseBtn) {
this.elements.playPauseBtn.classList.remove('fa-pause');
this.elements.playPauseBtn.classList.add('fa-play');
this.elements.playPauseBtn.setAttribute('title', 'Play');
}
if (typeof this.options.onEnded === 'function') {
this.options.onEnded.call(this);
}
}
/**
* Handles the audio element's volumechange event
* @returns {void}
*/
onAudioVolumeChange() {
if (this.isDestroyed) return;
this.updateVolumeIcon();
if (typeof this.options.onVolumeChange === 'function') {
this.options.onVolumeChange.call(this, this.audio.volume, this.audio.muted);
}
}
// Control event handlers
/**
* Handles click events on the play/pause button
* @param {MouseEvent} e - The click event
* @returns {void}
*/
onPlayPauseClick(e) {
e.preventDefault();
this.togglePlay();
}
/**
* Handles click events on the volume button
* @param {MouseEvent} e - The click event
* @returns {void}
*/
onVolumeClick(e) {
e.preventDefault();
this.toggleMute();
}
/**
* Handles input events on the volume slider
* @param {InputEvent} e - The input event
* @returns {void}
*/
onVolumeInput(e) {
if (!(e.target instanceof HTMLInputElement)) return;
const value = parseFloat(e.target.value);
this.setVolume(value);
}
/**
* Handles mousedown events on the progress bar
* @param {MouseEvent} e - The mousedown event
* @returns {void}
*/
onProgressMouseDown(e) {
this.isDragging = true;
this.updateProgress(e);
document.addEventListener('mousemove', this.boundHandlers.documentMouseMove);
document.addEventListener('mouseup', this.boundHandlers.documentMouseUp);
}
/**
* Handles click events on the progress bar
* @param {MouseEvent} e - The click event
* @returns {void}
*/
onProgressClick(e) {
if (!this.isDragging) {
this.updateProgress(e);
}
}
/**
* Handles mousemove on the progress bar (no-op if dragging)
* @param {MouseEvent} e - The mousemove event
* @returns {void}
*/
onProgressMouseMove(e) {
if (!this.isDragging) {
this.updateProgressTitle(e);
}
}
/**
* Handles document mousemove events during progress bar dragging
* @param {MouseEvent} e - The mousemove event
* @returns {void}
*/
onDocumentMouseMove(e) {
if (this.isDragging) {
this.updateProgress(e);
}
}
/**
* Handles document mouseup events to end progress bar dragging
* @returns {void}
*/
onDocumentMouseUp() {
if (this.isDragging) {
this.isDragging = false;
document.removeEventListener('mousemove', this.boundHandlers.documentMouseMove);
document.removeEventListener('mouseup', this.boundHandlers.documentMouseUp);
}
}
/**
* Updates the progress bar position and seeks audio based on mouse position
* @param {MouseEvent} e - The mouse event containing position information
* @returns {void}
*/
updateProgress(e) {
if (!this.elements.progress) return;
const rect = this.elements.progress.getBoundingClientRect();
const offsetX = e.clientX - rect.left;
const width = rect.width;
const percent = Math.max(0, Math.min(100, (offsetX / width) * 100));
if (this.elements.progressBar) {
/** @type {HTMLElement} */ (this.elements.progressBar).style.width = percent + '%';
}
const seekTime = (percent / 100) * this.audio.duration;
if (isFinite(seekTime)) {
this.audio.currentTime = seekTime;
if (this.elements.currentTime) {
this.elements.currentTime.textContent = formatTime(seekTime);
}
}
}
/**
* Updates the volume icon based on current volume and mute state
* @returns {void}
*/
updateVolumeIcon() {
if (!this.elements.volumeBtn) return;
const volume = this.audio.volume;
const isMuted = this.audio.muted;
this.elements.volumeBtn.classList.remove('fa-volume-high', 'fa-volume-low', 'fa-volume-off', 'fa-volume-xmark');
if (isMuted || volume === 0) {
this.elements.volumeBtn.classList.add('fa-volume-xmark');
} else if (volume < 0.5) {
this.elements.volumeBtn.classList.add('fa-volume-low');
} else {
this.elements.volumeBtn.classList.add('fa-volume-high');
}
}
/**
* Updates the current time and total time display elements
* @returns {void}
*/
updateTimeDisplays() {
if (this.elements.currentTime) {
this.elements.currentTime.textContent = formatTime(this.audio.currentTime || 0);
}
if (this.elements.totalTime) {
this.elements.totalTime.textContent = formatTime(this.audio.duration || 0);
}
}
/**
* Updates the mouseover title on the progress bar to show time at cursor position
* @param {MouseEvent} e - The mouse event
* @returns {void}
*/
updateProgressTitle(e) {
if (!this.elements.progress) return;
const rect = this.elements.progress.getBoundingClientRect();
const offsetX = e.clientX - rect.left;
const width = rect.width;
const percent = Math.max(0, Math.min(100, (offsetX / width) * 100));
this.elements.progress.setAttribute('title', formatTime((percent / 100) * this.audio.duration));
}
// Public methods
/**
* Starts audio playback
* @returns {void}
*/
play() {
if (this.isDestroyed) return;
if (this.audio.paused) {
const playPromise = this.audio.play();
if (playPromise !== undefined) {
playPromise.catch(error => {
console.error('Audio play failed:', error);
});
}
}
}
/**
* Pauses audio playback
* @returns {void}
*/
pause() {
if (this.isDestroyed) return;
if (!this.audio.paused) {
this.audio.pause();
}
}
/**
* Toggles between play and pause states
* @returns {void}
*/
togglePlay() {
if (this.audio.paused) {
this.play();
} else {
this.pause();
}
}
/**
* Seeks to a specific time in the audio
* @param {number} time - The time in seconds to seek to
* @returns {void}
*/
seek(time) {
if (this.isDestroyed) return;
if (isFinite(time) && time >= 0 && time <= this.audio.duration) {
this.audio.currentTime = time;
}
}
/**
* Sets the volume level
* @param {number} volume - Volume level between 0.0 and 1.0
* @returns {void}
*/
setVolume(volume) {
if (this.isDestroyed) return;
volume = Math.max(0, Math.min(1, volume));
this.audio.volume = volume;
if (volume > 0 && this.audio.muted) {
this.audio.muted = false;
}
}
/**
* Mutes the audio
* @returns {void}
*/
mute() {
if (this.isDestroyed) return;
this.audio.muted = true;
}
/**
* Unmutes the audio
* @returns {void}
*/
unmute() {
if (this.isDestroyed) return;
this.audio.muted = false;
}
/**
* Toggles the mute state
* @returns {void}
*/
toggleMute() {
if (this.isDestroyed) return;
this.audio.muted = !this.audio.muted;
}
/**
* Sets the audio source URL
* @param {string} src - The URL of the audio file
* @returns {void}
*/
setSrc(src) {
if (this.isDestroyed) return;
this.audio.src = src;
}
/**
* Sets the title displayed in the player
* @param {string} title - The title text to display
* @returns {void}
*/
setTitle(title) {
if (this.isDestroyed) return;
this.options.title = title;
if (this.elements.title) {
this.elements.title.textContent = title;
}
}
/**
* Cleans up the player by removing event listeners and clearing references
* @returns {void}
*/
destroy() {
if (this.isDestroyed) return;
this.isDestroyed = true;
// Stop observing DOM changes
if (this.observer) {
this.observer.disconnect();
this.observer = null;
}
// Pause and clear audio
this.pause();
this.audio.src = '';
// Remove all event listeners
this.unbindEvents();
// Clear references to prevent memory leaks
this.audio = null;
this.container = null;
this.elements = null;
this.options = null;
this.boundHandlers = null;
}
}
+1
View File
@@ -344,6 +344,7 @@ export async function convertSoloToGroupChat() {
// Save group-chat marker
if (index == 0) {
// @ts-ignore
message.is_group = true;
}
+482 -175
View File
@@ -10,12 +10,10 @@ import {
event_types,
getCurrentChatId,
getRequestHeaders,
hideSwipeButtons,
name1,
name2,
reloadCurrentChat,
saveSettingsDebounced,
showSwipeButtons,
this_chid,
saveChatConditional,
chat_metadata,
@@ -27,6 +25,10 @@ import {
getSystemMessageByType,
printMessages,
clearChat,
refreshSwipeButtons,
getMediaIndex,
getMediaDisplay,
chatElement,
} from '../script.js';
import { selected_group } from './group-chats.js';
import { power_user } from './power-user.js';
@@ -44,6 +46,8 @@ import {
getFileText,
getFileExtension,
convertTextToBase64,
isSameFile,
clamp,
} from './utils.js';
import { extension_settings, renderExtensionTemplateAsync, saveMetadataDebounced } from './extensions.js';
import { POPUP_RESULT, POPUP_TYPE, Popup, callGenericPopup } from './popup.js';
@@ -53,6 +57,7 @@ import { renderTemplateAsync } from './templates.js';
import { t } from './i18n.js';
import { humanizedDateTime } from './RossAscends-mods.js';
import { accountStorage } from './util/AccountStorage.js';
import { MEDIA_DISPLAY, MEDIA_SOURCE, MEDIA_TYPE, SCROLL_BEHAVIOR, SWIPE_DIRECTION } from './constants.js';
/**
* @typedef {Object} FileAttachment
@@ -159,8 +164,7 @@ export async function hideChatMessageRange(start, end, unhide, nameFitler = null
}
// Reload swipes. Useful when a last message is hidden.
hideSwipeButtons();
showSwipeButtons();
refreshSwipeButtons();
await saveChatConditional();
}
@@ -189,62 +193,71 @@ export async function unhideChatMessage(messageId, _messageBlock) {
/**
* Adds a file attachment to the message.
* @param {object} message Message object
* @param {ChatMessage} message Message object
* @returns {Promise<void>} A promise that resolves when file is uploaded.
*/
export async function populateFileAttachment(message, inputId = 'file_form_input') {
try {
if (!message) return;
if (!message.extra) message.extra = {};
if (!message.extra || typeof message.extra !== 'object') message.extra = {};
const fileInput = document.getElementById(inputId);
if (!(fileInput instanceof HTMLInputElement)) return;
const file = fileInput.files[0];
if (!file) return;
const slug = getStringHash(file.name);
const fileNamePrefix = `${Date.now()}_${slug}`;
const fileBase64 = await getBase64Async(file);
let base64Data = fileBase64.split(',')[1];
const extension = getFileExtension(file);
for (const file of fileInput.files) {
const slug = getStringHash(file.name);
const fileNamePrefix = `${Date.now()}_${slug}`;
const fileBase64 = await getBase64Async(file);
let base64Data = fileBase64.split(',')[1];
const extension = getFileExtension(file);
// If file is image
if (file.type.startsWith('image/')) {
const imageUrl = await saveBase64AsFile(base64Data, name2, fileNamePrefix, extension);
message.extra.image = imageUrl;
message.extra.inline_image = true;
}
// If file is video
else if (file.type.startsWith('video/')) {
const videoUrl = await saveBase64AsFile(base64Data, name2, fileNamePrefix, extension);
message.extra.video = videoUrl;
} else {
const uniqueFileName = `${fileNamePrefix}.txt`;
if (isConvertible(file.type)) {
try {
const converter = getConverter(file.type);
const fileText = await converter(file);
base64Data = convertTextToBase64(fileText);
} catch (error) {
toastr.error(String(error), t`Could not convert file`);
console.error('Could not convert file', error);
const mediaType = MEDIA_TYPE.getFromMime(file.type);
if (mediaType) {
const imageUrl = await saveBase64AsFile(base64Data, name2, fileNamePrefix, extension);
if (!Array.isArray(message.extra.media)) {
message.extra.media = [];
}
/** @type {MediaAttachment} */
const mediaAttachment = {
url: imageUrl,
type: mediaType,
title: file.name,
source: MEDIA_SOURCE.UPLOAD,
};
message.extra.media.push(mediaAttachment);
message.extra.media_index = message.extra.media.length - 1;
message.extra.inline_image = true;
} else {
const uniqueFileName = `${fileNamePrefix}.txt`;
if (isConvertible(file.type)) {
try {
const converter = getConverter(file.type);
const fileText = await converter(file);
base64Data = convertTextToBase64(fileText);
} catch (error) {
toastr.error(String(error), t`Could not convert file`);
console.error('Could not convert file', error);
}
}
const fileUrl = await uploadFileAttachment(uniqueFileName, base64Data);
if (!fileUrl) {
continue;
}
if (!Array.isArray(message.extra.files)) {
message.extra.files = [];
}
message.extra.files.push({
url: fileUrl,
size: file.size,
name: file.name,
created: Date.now(),
});
}
const fileUrl = await uploadFileAttachment(uniqueFileName, base64Data);
if (!fileUrl) {
return;
}
message.extra.file = {
url: fileUrl,
size: file.size,
name: file.name,
created: Date.now(),
};
}
} catch (error) {
console.error('Could not upload file', error);
toastr.error(t`Either the file is corrupted or its format is not supported.`, t`Could not upload the file`);
@@ -316,16 +329,16 @@ export async function getFileAttachment(url) {
*/
async function validateFile(file) {
const fileText = await file.text();
const isImage = file.type.startsWith('image/');
const isMedia = file.type.startsWith('image/') || file.type.startsWith('video/') || file.type.startsWith('audio/');
const isBinary = /^[\x00-\x08\x0E-\x1F\x7F-\xFF]*$/.test(fileText);
if (!isImage && file.size > fileSizeLimit) {
if (!isMedia && file.size > fileSizeLimit) {
toastr.error(t`File is too big. Maximum size is ${humanFileSize(fileSizeLimit)}.`);
return false;
}
// If file is binary
if (isBinary && !isImage && !isConvertible(file.type)) {
if (isBinary && !isMedia && !isConvertible(file.type)) {
toastr.error(t`Binary files are not supported. Select a text file or image.`);
return false;
}
@@ -342,22 +355,28 @@ export function hasPendingFileAttachment() {
/**
* Displays file information in the message sending form.
* @param {File} file File object
* @param {FileList} fileList File object
* @returns {Promise<void>}
*/
async function onFileAttach(file) {
if (!file) return;
async function onFileAttach(fileList) {
if (!fileList || fileList.length === 0) return;
const isValid = await validateFile(file);
for (const file of fileList) {
const isValid = await validateFile(file);
// If file is binary
if (!isValid) {
$('#file_form').trigger('reset');
return;
// If file is binary
if (!isValid) {
toastr.warning(t`File ${file.name} is not supported.`);
$('#file_form').trigger('reset');
return;
}
}
$('#file_form .file_name').text(file.name);
$('#file_form .file_size').text(humanFileSize(file.size));
const name = fileList.length === 1 ? fileList[0].name : t`${fileList.length} files selected`;
const size = [...fileList].reduce((acc, file) => acc + file.size, 0);
const title = [...fileList].map(x => x.name).join('\n');
$('#file_form .file_name').text(name).attr('title', title);
$('#file_form .file_size').text(humanFileSize(size)).attr('title', size);
$('#file_form').removeClass('displayNone');
// Reset form on chat change (if not on a welcome screen)
@@ -370,10 +389,17 @@ async function onFileAttach(file) {
}
/**
* Deletes file from message.
* Deletes file from a message.
* @param {JQuery<HTMLElement>} messageBlock Message block element
* @param {number} messageId Message ID
* @param {number} fileIndex File index
*/
async function deleteMessageFile(messageId) {
async function deleteMessageFile(messageBlock, messageId, fileIndex) {
if (isNaN(messageId) || isNaN(fileIndex)) {
console.warn('Invalid message ID or file index');
return;
}
const confirm = await callGenericPopup('Are you sure you want to delete this file?', POPUP_TYPE.CONFIRM);
if (confirm !== POPUP_RESULT.AFFIRMATIVE) {
@@ -383,26 +409,49 @@ async function deleteMessageFile(messageId) {
const message = chat[messageId];
if (!message?.extra?.file) {
console.debug('Message has no file');
if (!Array.isArray(message?.extra?.files)) {
console.debug('Message has no files');
return;
}
const url = message.extra.file.url;
if (fileIndex < 0 || fileIndex >= message.extra.files.length) {
console.warn('Invalid file index for message');
return;
}
const url = message.extra.files[fileIndex]?.url;
message.extra.files.splice(fileIndex, 1);
delete message.extra.file;
$(`.mes[mesid="${messageId}"] .mes_file_container`).remove();
await saveChatConditional();
await deleteFileFromServer(url);
}
appendMediaToMessage(message, messageBlock, SCROLL_BEHAVIOR.KEEP);
}
/**
* Opens file from message in a modal.
* @param {number} messageId Message ID
* @param {number} fileIndex File index
*/
async function viewMessageFile(messageId) {
const messageFile = chat[messageId]?.extra?.file;
async function viewMessageFile(messageId, fileIndex) {
if (isNaN(messageId) || isNaN(fileIndex)) {
console.warn('Invalid message ID or file index');
return;
}
const message = chat[messageId];
if (!Array.isArray(message?.extra?.files)) {
console.debug('Message has no files');
return;
}
if (fileIndex < 0 || fileIndex >= message.extra.files.length) {
console.warn('Invalid file index for message');
return;
}
const messageFile = message.extra.files[fileIndex];
if (!messageFile) {
console.debug('Message has no file or it is empty');
@@ -431,39 +480,51 @@ function embedMessageFile(messageId, messageBlock) {
.on('change', parseAndUploadEmbed)
.trigger('click');
async function parseAndUploadEmbed(e) {
const file = e.target.files[0];
if (!file) return;
async function parseAndUploadEmbed(/** @type {JQuery.ChangeEvent} */ e) {
if (!(e.target instanceof HTMLInputElement)) return;
if (!e.target.files.length) return;
const isValid = await validateFile(file);
for (const file of e.target.files) {
const isValid = await validateFile(file);
if (!isValid) {
$('#file_form').trigger('reset');
return;
if (!isValid) {
toastr.warning(t`File ${file.name} is not supported.`);
$('#file_form').trigger('reset');
return;
}
}
await populateFileAttachment(message, 'embed_file_input');
await eventSource.emit(event_types.MESSAGE_FILE_EMBEDDED, messageId);
appendMediaToMessage(message, messageBlock);
appendMediaToMessage(message, messageBlock, SCROLL_BEHAVIOR.KEEP);
await saveChatConditional();
}
}
/**
* Appends file content to the message text.
* @param {object} message Message object
* @param {ChatMessage} message Message object
* @param {string} messageText Message text
* @returns {Promise<string>} Message text with file content appended.
*/
export async function appendFileContent(message, messageText) {
if (message.extra?.file) {
const fileText = message.extra.file.text || (await getFileAttachment(message.extra.file.url));
if (fileText) {
const fileWrapped = `${fileText}\n\n`;
message.extra.fileLength = fileWrapped.length;
messageText = fileWrapped + messageText;
if (!message || !message.extra || typeof message.extra !== 'object') {
return messageText;
}
if (message.extra.fileLength >= 0) {
delete message.extra.fileLength;
}
if (Array.isArray(message.extra?.files) && message.extra.files.length > 0) {
const fileTexts = [];
for (const file of message.extra.files) {
const fileText = file.text || (await getFileAttachment(file.url));
if (fileText) {
fileTexts.push(fileText);
}
}
const mergedFileTexts = fileTexts.join('\n\n') + '\n\n';
message.extra.fileLength = mergedFileTexts.length;
return mergedFileTexts + messageText;
}
return messageText;
}
@@ -809,62 +870,128 @@ export function isExternalMediaAllowed() {
return !power_user.forbid_external_media;
}
function expandMessageImage(event) {
const mesBlock = $(event.currentTarget).closest('.mes');
const mesId = mesBlock.attr('mesid');
const message = chat[mesId];
const imgSrc = message?.extra?.image;
const title = message?.extra?.title;
if (!imgSrc) {
/**
* Expands the message media attachment.
* @param {number} messageId Message ID
* @param {number} mediaIndex Media index
* @returns {HTMLElement} Enlarged media element
*/
function expandMessageMedia(messageId, mediaIndex) {
if (isNaN(messageId) || isNaN(mediaIndex)) {
console.warn('Invalid message ID or media index');
return;
}
const img = document.createElement('img');
img.classList.add('img_enlarged');
img.src = imgSrc;
const imgHolder = document.createElement('div');
imgHolder.classList.add('img_enlarged_holder');
imgHolder.append(img);
const imgContainer = $('<div><pre><code class="img_enlarged_title"></code></pre></div>');
imgContainer.prepend(imgHolder);
imgContainer.addClass('img_enlarged_container');
/** @type {ChatMessage} */
const message = chat[messageId];
const codeTitle = imgContainer.find('.img_enlarged_title');
codeTitle.addClass('txt').text(title);
const titleEmpty = !title || title.trim().length === 0;
imgContainer.find('pre').toggle(!titleEmpty);
addCopyToCodeBlocks(imgContainer);
if (!Array.isArray(message?.extra?.media) || message.extra.media.length === 0) {
console.warn('Message has no media to expand');
return;
}
const popup = new Popup(imgContainer, POPUP_TYPE.DISPLAY, '', { large: true, transparent: true });
const mediaAttachment = message.extra.media[mediaIndex];
const title = mediaAttachment.title || message.extra.title || '';
if (!mediaAttachment) {
return;
}
if (mediaAttachment.type === MEDIA_TYPE.AUDIO) {
console.warn('Audio media cannot be expanded');
return;
}
/**
* Gets the media element based on its type.
* @returns {HTMLElement} Media element
*/
function getMediaElement() {
function getImageElement() {
const img = document.createElement('img');
img.src = mediaAttachment.url;
img.classList.add('img_enlarged');
return img;
}
function getVideoElement() {
const video = document.createElement('video');
video.src = mediaAttachment.url;
video.classList.add('img_enlarged');
video.controls = true;
video.autoplay = true;
return video;
}
switch (mediaAttachment.type) {
case MEDIA_TYPE.IMAGE:
return getImageElement();
case MEDIA_TYPE.VIDEO:
return getVideoElement();
}
console.warn('Unsupported media type for enlargement:', mediaAttachment.type);
return getImageElement();
}
const mediaElement = getMediaElement();
const mediaHolder = document.createElement('div');
mediaHolder.classList.add('img_enlarged_holder');
mediaHolder.append(mediaElement);
const mediaContainer = document.createElement('div');
mediaContainer.classList.add('img_enlarged_container');
mediaContainer.append(mediaHolder);
mediaElement.addEventListener('click', event => {
const shouldZoom = !mediaElement.classList.contains('zoomed') && mediaElement.nodeName === 'IMG';
mediaElement.classList.toggle('zoomed', shouldZoom);
event.stopPropagation();
});
if (title.trim().length > 0) {
const mediaTitlePre = document.createElement('pre');
const mediaTitleCode = document.createElement('code');
mediaTitleCode.classList.add('img_enlarged_title', 'txt');
mediaTitleCode.textContent = title;
mediaTitlePre.append(mediaTitleCode);
mediaTitleCode.addEventListener('click', event => {
event.stopPropagation();
});
mediaContainer.append(mediaTitlePre);
addCopyToCodeBlocks(mediaContainer);
}
const popup = new Popup(mediaContainer, POPUP_TYPE.DISPLAY, '', { large: true, transparent: true });
popup.dlg.style.width = 'unset';
popup.dlg.style.height = 'unset';
img.addEventListener('click', event => {
const shouldZoom = !img.classList.contains('zoomed');
img.classList.toggle('zoomed', shouldZoom);
event.stopPropagation();
});
codeTitle[0]?.addEventListener('click', event => {
event.stopPropagation();
});
popup.dlg.addEventListener('click', event => {
popup.dlg.addEventListener('click', () => {
popup.completeCancelled();
});
popup.show();
return img;
return mediaElement;
}
function expandAndZoomMessageImage(event) {
expandMessageImage(event).click();
}
/**
* Deletes an image from a message.
* @param {number} messageId Message ID
* @param {number} mediaIndex Image index
* @param {JQuery<HTMLElement>} messageBlock Message block element
*/
async function deleteMessageMedia(messageId, mediaIndex, messageBlock) {
if (isNaN(messageId) || isNaN(mediaIndex)) {
console.warn('Invalid message ID or media index');
return;
}
async function deleteMessageImage() {
const value = await callGenericPopup('<h3>Delete image from message?<br>This action can\'t be undone.</h3>', POPUP_TYPE.TEXT, '', {
const deleteUrls = [];
const deleteFromServerId = 'delete_media_files_checkbox';
let deleteFromServer = true;
const value = await Popup.show.confirm(t`Delete media from message?`, t`This action can't be undone.`, {
okButton: t`Delete one`,
cancelButton: false,
customButtons: [
{
text: t`Delete all`,
@@ -877,64 +1004,123 @@ async function deleteMessageImage() {
result: POPUP_RESULT.CANCELLED,
},
],
customInputs: [
{
type: 'checkbox',
label: t`Also delete files from server`,
id: deleteFromServerId,
defaultState: true,
},
],
onClose: (popup) => {
deleteFromServer = Boolean(popup.inputResults.get(deleteFromServerId) ?? false);
},
});
if (!value) {
return;
}
const mesBlock = $(this).closest('.mes');
const mesId = mesBlock.attr('mesid');
const message = chat[mesId];
/** @type {ChatMessage} */
const message = chat[messageId];
let isLastImage = true;
if (Array.isArray(message.extra.image_swipes)) {
const indexOf = message.extra.image_swipes.indexOf(message.extra.image);
if (indexOf > -1) {
message.extra.image_swipes.splice(indexOf, 1);
isLastImage = message.extra.image_swipes.length === 0;
if (!isLastImage) {
const newIndex = Math.min(indexOf, message.extra.image_swipes.length - 1);
message.extra.image = message.extra.image_swipes[newIndex];
}
}
if (!Array.isArray(message?.extra?.media)) {
console.debug('Message has no media');
return;
}
if (isLastImage || value === POPUP_RESULT.CUSTOM1) {
delete message.extra.image;
if (mediaIndex < 0 || mediaIndex >= message.extra.media.length) {
console.warn('Invalid media index for message');
return;
}
deleteUrls.push(message.extra.media[mediaIndex].url);
message.extra.media.splice(mediaIndex, 1);
if (message.extra.media_index === mediaIndex) {
const newIndex = mediaIndex > 0 ? mediaIndex - 1 : 0;
message.extra.media_index = clamp(newIndex, 0, message.extra.media.length - 1);
}
if (value === POPUP_RESULT.CUSTOM1) {
for (const media of message.extra.media) {
deleteUrls.push(media.url);
}
delete message.extra.media;
delete message.extra.inline_image;
delete message.extra.title;
delete message.extra.append_title;
delete message.extra.image_swipes;
mesBlock.find('.mes_img_container').removeClass('img_extra');
mesBlock.find('.mes_img').attr('src', '');
} else {
appendMediaToMessage(message, mesBlock);
}
if (deleteFromServer) {
for (const url of deleteUrls) {
if (!url) continue;
await deleteMediaFromServer(url, true);
}
}
await saveChatConditional();
appendMediaToMessage(message, messageBlock, SCROLL_BEHAVIOR.KEEP);
}
async function deleteMessageVideo() {
const confirm = await Popup.show.confirm(t`Delete video from message?`, t`This action can't be undone.`);
if (!confirm) {
/**
* Switches the media display mode for a message.
* @param {number} messageId Message ID
* @param {JQuery<HTMLElement>} messageBlock Message block element
* @param {MEDIA_DISPLAY} targetDisplay Target display mode
*/
async function switchMessageMediaDisplay(messageId, messageBlock, targetDisplay) {
if (isNaN(messageId)) {
console.warn('Invalid message ID');
return;
}
const mesBlock = $(this).closest('.mes');
const mesId = mesBlock.attr('mesid');
const message = chat[mesId];
/** @type {ChatMessage} */
const message = chat[messageId];
if (!message?.extra?.video) {
console.warn('Message has no video or it is empty');
if (!message) {
console.warn('Message not found for ID', messageId);
return;
}
delete message.extra.video;
mesBlock.find('.mes_video_container').remove();
if (!message.extra || typeof message.extra !== 'object') {
message.extra = {};
}
message.extra.media_display = targetDisplay;
await saveChatConditional();
appendMediaToMessage(message, messageBlock, SCROLL_BEHAVIOR.KEEP);
}
/**
* Deletes media file from the server.
* @param {string} url Path to the media file on the server
* @param {boolean} [silent=false] If true, do not show error messages
* @returns {Promise<boolean>} True if media file was deleted, false otherwise.
*/
export async function deleteMediaFromServer(url, silent = false) {
try {
const result = await fetch('/api/images/delete', {
method: 'POST',
headers: getRequestHeaders(),
body: JSON.stringify({ path: url }),
});
if (!result.ok) {
if (!silent) {
const error = await result.text();
throw new Error(error);
}
return false;
}
await eventSource.emit(event_types.MEDIA_ATTACHMENT_DELETED, url);
return true;
} catch (error) {
toastr.error(String(error), t`Could not delete image`);
console.error('Could not delete image', error);
return false;
}
}
/**
@@ -943,7 +1129,7 @@ async function deleteMessageVideo() {
* @param {boolean} [silent=false] If true, do not show error messages
* @returns {Promise<boolean>} True if file was deleted, false otherwise.
*/
async function deleteFileFromServer(url, silent = false) {
export async function deleteFileFromServer(url, silent = false) {
try {
const result = await fetch('/api/files/delete', {
method: 'POST',
@@ -951,9 +1137,12 @@ async function deleteFileFromServer(url, silent = false) {
body: JSON.stringify({ path: url }),
});
if (!result.ok && !silent) {
const error = await result.text();
throw new Error(error);
if (!result.ok) {
if (!silent) {
const error = await result.text();
throw new Error(error);
}
return false;
}
await eventSource.emit(event_types.FILE_ATTACHMENT_DELETED, url);
@@ -1867,6 +2056,61 @@ export function addDOMPurifyHooks() {
});
}
/**
* Switches an image to the next or previous one in the swipe list.
* @param {number} messageId Message ID
* @param {JQuery<HTMLElement>} element Message element
* @param {string} direction Swipe direction
* @returns {Promise<void>}
*/
async function onImageSwiped(messageId, element, direction) {
const animationClass = 'fa-fade';
const messageMedia = element.find('.mes_img, .mes_video');
// Current image is already animating
if (messageMedia.hasClass(animationClass)) {
return;
}
const message = chat[messageId];
const media = message?.extra?.media;
if (!message || !Array.isArray(media) || media.length === 0) {
console.warn('No media found in the message');
return;
}
const currentIndex = getMediaIndex(message);
const mediaDisplay = getMediaDisplay(message);
if (mediaDisplay !== MEDIA_DISPLAY.GALLERY) {
console.warn('Image swiping is only supported for gallery media display');
return;
}
await eventSource.emit(event_types.IMAGE_SWIPED, { message, element, direction });
if (media.length === 1) {
console.warn('Only one media item in the message, swiping is not applicable');
return;
}
// Switch to previous image or wrap around if at the beginning
if (direction === SWIPE_DIRECTION.LEFT) {
const newIndex = currentIndex === 0 ? media.length - 1 : currentIndex - 1;
message.extra.media_index = newIndex;
}
// Switch to next image or generate a new one if at the end
if (direction === SWIPE_DIRECTION.RIGHT) {
const newIndex = currentIndex === media.length - 1 ? 0 : currentIndex + 1;
message.extra.media_index = newIndex >= media.length ? 0 : newIndex;
}
await saveChatConditional();
appendMediaToMessage(message, element);
}
export function initChatUtilities() {
$(document).on('click', '.mes_hide', async function () {
const messageBlock = $(this).closest('.mes');
@@ -1883,13 +2127,17 @@ export function initChatUtilities() {
$(document).on('click', '.mes_file_delete', async function () {
const messageBlock = $(this).closest('.mes');
const messageId = Number(messageBlock.attr('mesid'));
await deleteMessageFile(messageId);
const fileBlock = $(this).closest('.mes_file_container');
const fileIndex = Number(fileBlock.attr('data-index'));
await deleteMessageFile(messageBlock, messageId, fileIndex);
});
$(document).on('click', '.mes_file_open', async function () {
const messageBlock = $(this).closest('.mes');
const messageId = Number(messageBlock.attr('mesid'));
await viewMessageFile(messageId);
const fileBlock = $(this).closest('.mes_file_container');
const fileIndex = Number(fileBlock.attr('data-index'));
await viewMessageFile(messageId, fileIndex);
});
$(document).on('click', '.assistant_note_export', async function () {
@@ -2054,16 +2302,55 @@ export function initChatUtilities() {
openGlobalStylesPreferenceDialog();
});
$(document).on('click', '.mes_img', expandMessageImage);
$(document).on('click', '.mes_img_enlarge', expandAndZoomMessageImage);
$(document).on('click', '.mes_img_delete', deleteMessageImage);
$(document).on('click', '.mes_video_delete', deleteMessageVideo);
/**
* Returns information about the closest media container.
* @returns {MediaContainerInfo} Information about the media container
* @typedef {object} MediaContainerInfo
* @property {JQuery<HTMLElement>} messageBlock The closest message block
* @property {number} messageId The message ID
* @property {JQuery<HTMLElement>} mediaBlock The closest media container block
* @property {number} mediaIndex The media index within the message
*/
function getMediaContainerInfo(containerClass = '.mes_media_container') {
const messageBlock = $(this).closest('.mes');
const messageId = Number(messageBlock.attr('mesid'));
const mediaBlock = $(this).closest(containerClass);
const mediaIndex = Number(mediaBlock.attr('data-index'));
return { messageBlock, messageId, mediaBlock, mediaIndex };
}
chatElement.on('click', '.mes_img', async function () {
const { messageId, mediaIndex } = getMediaContainerInfo.call(this);
expandMessageMedia(messageId, mediaIndex);
});
chatElement.on('click', '.mes_media_enlarge', async function () {
const { messageId, mediaIndex } = getMediaContainerInfo.call(this);
expandMessageMedia(messageId, mediaIndex).click();
});
chatElement.on('click', '.mes_media_delete', async function () {
const { messageId, mediaIndex, messageBlock } = getMediaContainerInfo.call(this);
await deleteMessageMedia(messageId, mediaIndex, messageBlock);
});
chatElement.on('click', '.mes_media_list', async function () {
const { messageId, messageBlock } = getMediaContainerInfo.call(this);
await switchMessageMediaDisplay(messageId, messageBlock, MEDIA_DISPLAY.GALLERY);
});
chatElement.on('click', '.mes_media_gallery', async function () {
const { messageId, messageBlock } = getMediaContainerInfo.call(this);
await switchMessageMediaDisplay(messageId, messageBlock, MEDIA_DISPLAY.LIST);
});
chatElement.on('click', '.mes_img_swipe_left', async function () {
const { messageId, messageBlock } = getMediaContainerInfo.call(this);
await onImageSwiped(messageId, messageBlock, SWIPE_DIRECTION.LEFT);
});
chatElement.on('click', '.mes_img_swipe_right', async function () {
const { messageId, messageBlock } = getMediaContainerInfo.call(this);
await onImageSwiped(messageId, messageBlock, SWIPE_DIRECTION.RIGHT);
});
$('#file_form_input').on('change', async () => {
const fileInput = document.getElementById('file_form_input');
if (!(fileInput instanceof HTMLInputElement)) return;
const file = fileInput.files[0];
await onFileAttach(file);
await onFileAttach(fileInput.files);
});
$('#file_form').on('reset', function () {
$('#file_form').addClass('displayNone');
@@ -2077,18 +2364,38 @@ export function initChatUtilities() {
event.preventDefault();
event.stopPropagation();
await handleFileAttach(Array.from(event.clipboardData.files));
});
new DragAndDropHandler('#form_sheld', async (files) => {
await handleFileAttach(files);
});
/**
* Common handler for file attachments.
* @param {File[]} files Files to attach
* @returns {Promise<void>}
*/
async function handleFileAttach(files) {
const fileInput = document.getElementById('file_form_input');
if (!(fileInput instanceof HTMLInputElement)) return;
// Workaround for Firefox: Use a DataTransfer object to indirectly set fileInput.files
const dataTransfer = new DataTransfer();
for (let i = 0; i < event.clipboardData.files.length; i++) {
dataTransfer.items.add(event.clipboardData.files[i]);
for (let i = 0; i < files.length; i++) {
dataTransfer.items.add(files[i]);
}
// Preserve existing non-duplicate files in the input
for (const file of fileInput.files) {
if (!Array.from(dataTransfer.files).some(f => isSameFile(f, file))) {
dataTransfer.items.add(file);
}
}
fileInput.files = dataTransfer.files;
await onFileAttach(fileInput.files[0]);
});
await onFileAttach(fileInput.files);
}
eventSource.on(event_types.CHAT_CHANGED, checkForCreatorNotesStyles);
}

Some files were not shown because too many files have changed in this diff Show More