Commit Graph

971 Commits

Author SHA1 Message Date
bangonicdd
23fd706d9b feat: apply positionParser to alternate global note 2025-01-17 00:23:14 +09:00
Bo26fhmC5M
3c62317f3a feat: add lastSelectedSummaries property to store selected memory indices 2025-01-17 00:17:12 +09:00
Bo26fhmC5M
6a13b33103 refactor: extract repeated summarization logic into retryableSummarize function 2025-01-16 23:36:32 +09:00
Bo26fhmC5M
fac11bfe67 fix: improve HypaV3 logging 2025-01-16 22:40:08 +09:00
Bo26fhmC5M
3e234dcb15 feat: add dual-action translation (cached/regenerate) in HypaV3 modal
Implements shift+click (desktop) and double tap (mobile) for regenerating translations while maintaining regular click/tap for cached translations.
2025-01-15 13:45:34 +09:00
Bo26fhmC5M
a10a2c5502 refactor: extract HypaV3 modal into separate component 2025-01-14 13:01:14 +09:00
Bo26fhmC5M
f3c6278d21 feat: add important button in HypaV3 Data modal 2025-01-13 23:30:18 +09:00
Bo26fhmC5M
4176a647a5 fix: restore undefined value from null after importing hypaDataV3 2025-01-13 19:31:24 +09:00
Bo26fhmC5M
a1158ebdb1 fix: adjust memory selection order 2025-01-13 14:09:18 +09:00
Bo26fhmC5M
cfdd5d6bf5 fix: resolve summarize function issues with instruct35 2025-01-13 13:30:10 +09:00
Bo26fhmC5M
04e640a791 refactor: improve array conversion and sorting syntax 2025-01-13 13:02:22 +09:00
Bo26fhmC5M
ab7a2aa499 feat: add resummarize button to HypaV3 Data modal 2025-01-12 23:32:20 +09:00
Bo26fhmC5M
f08c31612b fix: prevent over-summarization and improve logging 2025-01-12 17:15:11 +09:00
Bo26fhmC5M
6e49970b76 fix: correct targetTokens calculation in summarization and improve logging 2025-01-12 14:49:01 +09:00
Bo26fhmC5M
85bdf1d544 fix: improve memory token tracking and logging 2025-01-12 13:17:56 +09:00
Bo26fhmC5M
50361d7aa2 feat: Implement HypaV3 ratio-based memory 2025-01-12 11:05:18 +09:00
kwaroran
c363d50aa3 fix: gemini multimodal (#712)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?

# Description
fix gemini multimodal error.
ERROR MESSAGE : Invalid value at 'contents[6].parts[1]' (oneof), oneof
field 'data' is already set. Cannot set 'text'
2025-01-11 01:44:30 +09:00
kwaroran
edb4964da7 fix: Fix message handling and summarization in HypaV2 (#711)
# PR Checklist
- [x] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [x] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?

# Description
This PR addresses several issues in the HypaV2 memory system:

1. Improved Summarization Error Handling
- Before: When unable to summarize messages while exceeding context
size, HypaV2 would continue and make API requests with unintentionally
truncated context
- After: HypaV2 now provides clear error messages asking users to adjust
their settings when:
  - Unable to summarize last 4 messages
  - A single message exceeds chunk size

2. Message Order Preservation
- Before: lastTwoChats logic was causing the first message (index 1) and
user input (index 2) to appear in the wrong order
- After: Fixed by adjusting the initial index to preserve the original
message sequence

3. Message Filtering
- Added logic to skip unnecessary messages during summarization:
  - Excludes [Start a new chat] message at index 0
  - Skips empty messages
<br>
Requesting review from @LightningHyperBlaze45654
2025-01-11 01:44:10 +09:00
kwaroran
9896b68b7a fix: resolve state_unsafe_mutation in getChatVar() (#707)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?

# Description
While investigating an issue where `{{getvar::A}}` didn't work properly
in background embedding, I encountered a `state_unsafe_mutation` error.
It appears that modifying the null check operator on the relevant line
can resolve this issue. Thank for your time.
2025-01-11 01:44:01 +09:00
Bo26fhmC5M
7c1faee6f4 fix: Fix message handling and summarization in HypaV2
- Add clear error messages when summarization is not possible
- Fix message order issues caused by lastTwoChats logic
- Skip [Start a new chat] and empty messages during summarization
2025-01-08 20:45:19 +09:00
donmarble
2d11b05e6c fix: gemini multimodal text 2025-01-07 23:45:01 +09:00
Kwaroran
9fc8978d1d Add GeminiBlockOff 2025-01-07 00:05:20 +09:00
bangonicdd
6537e0926c fix: add missing check for regex order flag 2025-01-06 15:39:57 +09:00
Kwaroran
c0e1311568 Add branches 2025-01-06 00:24:03 +09:00
Bo26fhmC5M
0317a941f1 fix: token calculation for HypaV2 2025-01-02 20:52:37 +09:00
Bo26fhmC5M
2b92582df4 fix: resolve chatMemos serialization issue in HypaV2Data 2025-01-02 18:47:16 +09:00
Kwaroran
821ba1812f Merge branch 'main' of https://github.com/kwaroran/RisuAI 2025-01-02 03:03:03 +09:00
Kwaroran
866996ba1e chore: update version to 145.3.0 2025-01-02 03:02:54 +09:00
LightningHyperBlaze45654
d2042116aa Fix: Token counting fix 2024-12-31 21:52:13 -08:00
Kwaroran
cd092a5a01 feat: add translation feature and ban character set functionality 2024-12-29 04:03:21 +09:00
kwaroran
03acfdc306 Bugfix on hypaV2 (#696)
# PR Checklist
- [ ] Have you checked if it works normally in all models? *Ignore this
if it doesn't use models.*
- [ ] Have you checked if it works normally in all web, local, and node
hosted versions? If it doesn't, have you blocked it in those versions?
- [ ] Have you added type definitions?

# Description
When chat imported from json, it breaks
Fixed by changing the list back to set

Need to check if there is any bug on token counting(unknown issue, so
currently re-calculating the token accurately)
2024-12-28 05:36:22 +09:00
HyperBlaze
9c1f65e518 Merge branch 'kwaroran:main' into main 2024-12-26 23:53:59 -08:00
LightningHyperBlaze45654
e51ec6c739 bugfix(read desc)
need to check if the token count is still bugged.
2024-12-26 23:53:05 -08:00
Kwaroran
ebdcd5ffcd Add new catagory 2024-12-27 16:16:36 +09:00
Kwaroran
cc223dfefa feat: limit thoughts extraction based on maxThoughtTagDepth setting 2024-12-27 15:56:48 +09:00
Kwaroran
191be6d5c1 feat: add image translation feature and enhance regex list functionality 2024-12-27 15:51:29 +09:00
poroyo
823541af40 Fix sayTTS missing break in gptsovits case 2024-12-27 04:00:19 +09:00
kwaroran
b874ed42ed HypaV2 context deletion safety (#680)
# PR Checklist
- [x] Did you check if it works normally in all models? *ignore this
when it dosen't uses models*
- [] 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? <<
Checked on browser only, works fine
- [x] Did you added a type def?

# Description
HypaV2 data's large type definition update.
```ts
    mainChunks: { // summary itself
        id: number;
        text: string;
        chatMemos: Set<string>; // UUIDs of summarized chats
        lastChatMemo: string;
    }[];
    chunks: { // split mainChunks for retrieval or something. Although quite uncomfortable logic, so maybe I will delete it soon.
        mainChunkID: number;
        text:string;
    }[];
```
With this, ensure that mainChunks is relevant on chat context change by
deletion

If there is no UUID in the chat context, but it exists on chatMemos on
certain mainChunk, removes it.

Changed index.svelte.ts to update args on each call to ensure hypav2 to
stay adaptive on this change without refreshing the page

Also changed mainChunks to be pushed instead of unshifted
2024-12-26 05:02:33 +09:00
Kwaroran
2672195d92 Add preset related features 2024-12-26 04:29:14 +09:00
Kwaroran
c6cc258a50 Refactor preset handling and improve database snapshot logic 2024-12-26 03:18:00 +09:00
Kwaroran
28d8bfdd22 Fix nativeFetch and comfy 2024-12-25 21:06:52 +09:00
Kwaroran
1c51afc626 Enhance plugin functionality by adding optional provider parameters and improving thoughts extraction regex 2024-12-25 04:55:05 +09:00
Kwaroran
8b6fc5bc8b Add max_tokens parameter to plugin documentation and request function 2024-12-25 00:31:28 +09:00
kwaroran
98ca1736ab Fix thoughts extraction regex for multiline content handling (#687)
# 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 updates the regex used for extracting <Thoughts> content to
handle multiline cases reliably. The previous regex (.+?) had
limitations when processing text spanning multiple lines, as it could
not match content with line breaks.
2024-12-24 23:16:20 +09:00
Kwaroran
027a591424 Remove V1 Plugin 2024-12-24 23:14:49 +09:00
Kwaroran
8f667d6394 Add Saving Icon 2024-12-23 17:07:19 +09:00
LightningHyperBlaze45654
4ddb932237 add: convert previous version's hypaV2Data 2024-12-20 23:38:40 -08:00
HyperBlaze
ea2fc1ad26 Merge branch 'kwaroran:main' into main 2024-12-20 23:36:41 -08:00
Bo26fhmC5M
6d182a8ad3 Fix thoughts extraction regex for multiline content handling 2024-12-21 13:07:57 +09:00
Kwaroran
50cf5e65b8 Remove thoughts property from OpenAIChatExtra interface and clean up related request processing 2024-12-21 06:35:05 +09:00