Commit Graph

3090 Commits

Author SHA1 Message Date
kwaroran
15778e7c68 Add help tooltip to preset chain input in AdvancedSettings 2024-12-08 22:16:26 +09:00
kwaroran
1aa54be9be Fix translation strings in zh-Hant.ts for consistency and clarity 2024-12-08 22:15:46 +09:00
kwaroran
8d03623923 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-12-08 22:14:55 +09:00
kwaroran
6d64acb9a9 Improve random selection logic for preset chain names 2024-12-08 22:14:53 +09:00
kwaroran
38c70ddd8b Update zh-Hant.ts (#679)
# PR Checklist
- [x] Did you check if it works normally in all models? *Not applicable
since this is a JSON translation update.*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? *Not applicable since this is a JSON translation
update.*
- [x] Did you added a type def? *Not applicable since no type
definitions are involved in this PR.*

# Description
- Completed translation for the current version
- Adjusted wording:  
  - Changed "你" to "您" for consistent use of formal language
- Made minor refinements to better align with Traditional Chinese usage
(e.g., "圖像" changed to "圖片", etc.)
2024-12-08 21:26:48 +09:00
kwaroran
5178d97a5d bump version to 143.0.0 in configuration and related files 2024-12-08 21:26:13 +09:00
kwaroran
40ad42ffe9 Add new asset finder and preset chain 2024-12-08 21:25:57 +09:00
Rivelle
f8af6bddc4 Update zh-Hant.ts with Enhanced Translation and Formal Language Adjustments
- Completed translation for the current version
- Adjusted wording:  
  - Changed "你" to "您" for consistent use of formal language
  - Made minor refinements to better align with Traditional Chinese usage (e.g., "圖像" changed to "圖片", etc.)
2024-12-08 20:13:07 +08:00
kwaroran
c454f8df2d Update character card export to convert image data before writing 2024-12-08 18:46:10 +09:00
kwaroran
ccebb4d665 Roll back couple of things 2024-12-08 18:36:05 +09:00
kwaroran
8c8c8baf8e Fix Gemini Image Input Functionality (#678)
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [x] Did you added a type def?

# Description
This PR fixes the image input functionality for the Gemini model.

### Issue with Existing Code
The previous implementation attempted to process images in the following
way:
1. In the `OpenAIChat` type, if the `memo` field started with
`inlayImage`, the `content` field's value was copied into a variable
called `pendingImage`.
2. Later, if the `chat` role was `'user'` and `pendingImage` was not an
empty string, the code processed the image.

However, it does not seem to work as expected in the current state.

### Update
I updated the image input handling to align with the method used in
RisuAI for handling GPT’s image input. Specifically, the changes
include:

1. In `image.ts`, I explicitly specified the `gemini-exp` model.
2. If the `chat` object has a `multimodals` field and the `role` is
`user`:
- I created an array called `geminiParts` to store `GeminiPart` objects.
- The `chat.content` value is set as the `text` field of the
`GeminiPart` object in the array.
- I then iterated over `chat.multimodals` and created an object for each
`image` type, formatting it to match the Gemini structure, and added it
to the `geminiParts` array.
- After the iteration, the `geminiParts` array is assigned to the
`parts` field of `reformatedChat`.


### Notes
- I removed the previous non-functional code entirely. If this causes
any inconvenience or violates any conventions, I sincerely apologize.
- As the final name of the next-generation Gemini model is currently
unknown, I restricted the functionality to the **gemini-exp** model in
the `image.ts` file for now. This can be updated later when the official
name is confirmed.

The Gemini model is currently very widely used, so I kindly request you
to review the updated code. If you have any feedback or if the changes
are not acceptable, I completely understand if this PR is rejected.

Thank you for your time and consideration! Let me know if there's
anything I can improve or clarify.
2024-12-08 15:49:10 +09:00
kwaroran
69a87a4d16 bump version to 142.0.0 in configuration and related files 2024-12-08 15:47:58 +09:00
kwaroran
1c28651541 bump version to 141.6.0 in configuration and related files 2024-12-08 15:47:16 +09:00
kwaroran
0c62b8bbfe Add pools 2024-12-08 15:46:54 +09:00
poroyo
9a1b22eae5 Fix code indentation 2024-12-08 05:28:57 +09:00
poroyo
697201bbb6 Remove unused variable 'pendingImage' 2024-12-08 05:16:13 +09:00
poroyo
94bb79df7e Fix Gemini image input issue 2024-12-08 05:04:06 +09:00
kwaroran
8d5fb1a139 bump version to 141.5.0 in configuration and related files 2024-12-07 22:29:56 +09:00
kwaroran
35ab2951d2 Update character card validation to check 'spec' instead of version 2024-12-07 22:27:24 +09:00
kwaroran
9d8f239250 Refactor tokenizer 2024-12-07 06:24:33 +09:00
kwaroran
34b4a1245b Add google cloud tokenizer 2024-12-07 03:49:56 +09:00
kwaroran
852bd6a882 bump version to 141.4.0 in configuration and related files 2024-12-07 03:21:01 +09:00
kwaroran
03bdca0958 Remove unused Plugin button from ModelList and update model parameters for Gemini Exp 1206; adjust URL generation logic in request functions. 2024-12-07 03:20:45 +09:00
kwaroran
80da860f6c bump version to 141.3.0 2024-12-07 00:58:33 +09:00
kwaroran
909e9635d2 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-12-07 00:58:13 +09:00
kwaroran
e0f6c58540 Refactor HypaProcesser instantiation to remove hardcoded model name and add models and others 2024-12-07 00:58:09 +09:00
kwaroran
aa891b7dc4 Fix issue with autoTranslateCachedOnly option being ignored when sending messages (#676)
# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
There was an issue where the autoTranslateCachedOnly option was being
ignored when sending messages. This occurred due to the way the
translated variable was initialized with let translated =
$state(DBState.db.autoTranslate).
2024-12-05 22:52:31 +09:00
kwaroran
7db4ad8139 Fix hypav2 issue where the 'search_document: ' string is not truncated correctly. (#675)
# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
This PR fixes hypav2 issue where the "search_document: " string is not
truncated correctly.
If the "search_document: " string is not truncated correctly, it will
cause "t: " to remain within the <Past Events Details></Past Events
Details> tag.

Edit: This PR also add memo "supaPrompt" to detect supaMemory model
requests in the plugin
2024-12-05 22:52:21 +09:00
kwaroran
998e8e6c65 bump version to 141.2.1 2024-12-05 22:50:41 +09:00
kwaroran
4352466dac Update realm.ts 2024-12-05 22:50:18 +09:00
Bo26fhmC5M
ecc2817a7b Add memo to detect supaMemory model requests in the plugin 2024-12-04 13:46:35 +09:00
Bo26fhmC5M
6c62580ccb Fix issue with autoTranslateCachedOnly option being ignored when sending messages 2024-12-03 22:38:09 +09:00
Bo26fhmC5M
dbd7485c50 Fix hypav2 issue where the 'search_document: ' string is not truncated correctly. 2024-12-03 22:12:53 +09:00
kwaroran
8d1e7cc5a8 Fix {{#if_pure}} syntax issue where indentation and whitespace were not preserved as intended. (#674)
# PR Checklist
- [ ] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
This PR fixes an issue where indentation and whitespace inside the
{{#if_pure}} syntax were being trimmed.
I made an effort to minimize the impact on the parser's existing
behavior.
2024-12-03 21:35:58 +09:00
kwaroran
2b8195041f bump version to 141.2.0 2024-12-03 21:35:09 +09:00
kwaroran
50d20bcc3f Add custom flags 2024-12-03 21:34:55 +09:00
kwaroran
9ac91190f9 bump version 2024-12-03 21:16:50 +09:00
Bo26fhmC5M
3c8ac16367 Fix {{#if_pure}} syntax issue where spaces and whitespace were not preserved as intended. 2024-12-02 13:04:56 +09:00
kwaroran
18ea5aff4e Add notification feature with permission handling and UI toggle 2024-12-02 04:42:13 +09:00
kwaroran
0e292bd690 aria-role fixes 2024-12-02 04:27:50 +09:00
kwaroran
8f72b9e6e2 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-12-01 18:11:08 +09:00
kwaroran
ca57244153 Add alertClear to imports and update error handling in Chat.svelte 2024-12-01 18:09:36 +09:00
kwaroran
5499368ac0 Fix version numbers 2024-12-01 18:08:06 +09:00
kwaroran
9f4d99db4c Fix translation issue in input auto-translation field for LLM-based Translation (#673)
# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
This PR introduces a fix for the issue where the input auto-translation
field ("Enter Message for Translate to English" text displayed when
nothing is entered) was not correctly translating the original text into
English in the LLM-based translation.

Additionally, this update ensures that "Curly Braced Syntaxes {{slot}}"
are translated into the user's native language when the translation
button is pressed, and into English during the input translation,
facilitating more effective translation.
2024-12-01 17:28:48 +09:00
kwaroran
9ba1686781 Fix cache handling for autoTranslateCachedOnly when translateBeforeHTMLFormatting is disabled (#672)
# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [x] Did you check if it works normally in all of web, local and node
hosted versions? if it dosen't, did you blocked it in those versions?
- [ ] Did you added a type def?

# Description
This PR introduces a fix for an issue where cache misses occur when
translateBeforeHTMLFormatting is disabled. Previously, the 'Auto
Translate Cached Only' feature only worked when
translateBeforeHTMLFormatting was enabled. This update ensures that
cached translations are used properly even when
translateBeforeHTMLFormatting is disabled.

Thank you for taking the time. This is not an urgent matter, but I would
appreciate it if you could incorporate this PR along with other changes
in the next update.
2024-12-01 17:28:37 +09:00
kwaroran
227a11815f Improve parser 2024-12-01 17:25:15 +09:00
kwaroran
d05f5942a1 Add support for 'jb' 2024-12-01 17:16:45 +09:00
kwaroran
6231192dca Fix CBS 2024-12-01 17:15:02 +09:00
kwaroran
8a6cfedcda Add ChatML and Rework display 2024-12-01 17:05:50 +09:00
Bo26fhmC5M
7c6ab023d1 Fix translation issue in input auto-translation field. 2024-11-30 11:16:47 +09:00