Commit Graph

330 Commits

Author SHA1 Message Date
Kwaroran
929108def3 Add error handling 2025-02-26 12:22:10 +09:00
Kwaroran
4e69ee6445 refactor: remove unnecessary controller.enqueue calls and optimize text handling 2025-02-26 12:19:34 +09:00
Kwaroran
5a4b7bbef2 Add anti server overload 2025-02-26 09:14:32 +09:00
Kwaroran
6c72d78157 Add Sonnet 3.7 2025-02-25 05:25:34 +09:00
Kwaroran
21e311b7a4 Remove thought input in gemini 2025-02-25 04:41:12 +09:00
Kwaroran
ed2957fc50 Upgrade translator playground 2025-02-25 04:36:58 +09:00
Kwaroran
1b1d43cf1b Add request related triggers 2025-02-16 02:55:27 +09:00
Kwaroran
1b171cab66 Update version, gemini models, and new progress dialoge, and charxjpeg 2025-02-06 09:48:55 +09:00
Kwaroran
25aa83877b Add reasoning effort 2025-02-01 09:05:07 +09:00
Kwaroran
338d1cfec2 Add models 2025-01-29 05:38:26 +09:00
Kwaroran
62ea10cc32 fix: remove logit_bias from request body if empty 2025-01-29 04:25:59 +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
Kwaroran
866996ba1e chore: update version to 145.3.0 2025-01-02 03:02:54 +09:00
Kwaroran
cd092a5a01 feat: add translation feature and ban character set functionality 2024-12-29 04:03:21 +09:00
Kwaroran
ebdcd5ffcd Add new catagory 2024-12-27 16:16:36 +09:00
Kwaroran
191be6d5c1 feat: add image translation feature and enhance regex list functionality 2024-12-27 15:51:29 +09:00
Kwaroran
8b6fc5bc8b Add max_tokens parameter to plugin documentation and request function 2024-12-25 00:31:28 +09:00
Kwaroran
8f667d6394 Add Saving Icon 2024-12-23 17:07:19 +09:00
Kwaroran
50cf5e65b8 Remove thoughts property from OpenAIChatExtra interface and clean up related request processing 2024-12-21 06:35:05 +09:00
Kwaroran
d4db95070e Update plugin documentation and types to support ReadableStream in provider results 2024-12-21 06:33:00 +09:00
Kwaroran
7cd49fc8c3 Add V2 plugin 2024-12-20 23:45:07 +09:00
Kwaroran
e5e01d0688 Fix error handling in gemini and add dataItem hotkey 2024-12-20 18:11:11 +09:00
Kwaroran
cc4bbdc8e2 Enhance LLM model flags to include requiresAlternateRole and update request processing to handle multimodal and thoughts data 2024-12-20 04:31:23 +09:00
Kwaroran
01da904c9b Gemini change thinking 2024-12-20 03:14:06 +09:00
Kwaroran
c937a65b1f Fix formatting of thoughts in request processing to ensure proper line breaks 2024-12-20 02:55:10 +09:00
Kwaroran
4afe32a2c2 Add geminiThinking flag and enhance thoughts handling in chat processing 2024-12-20 02:53:58 +09:00
Kwaroran
73e94658fd Add thoughts 2024-12-20 02:15:48 +09:00
Kwaroran
c05aa389b9 Fix devrole 2024-12-18 03:45:11 +09:00
Kwaroran
a961a553d8 Move DeveloperRole 2024-12-18 03:38:20 +09:00
Kwaroran
f09cb1bd69 Add DeveloperRole flag and update role handling in OpenAIChatExtra 2024-12-18 03:37:41 +09:00
Kwaroran
6d3fdadf55 Merge branch 'main' of https://github.com/kwaroran/RisuAI 2024-12-18 03:26:55 +09:00
Kwaroran
5df9e68bae Add o1 and fix some mistakes 2024-12-18 03:26:02 +09:00
shirosaki-hana
a092d1f482 Fixed “Separate Parameters” scaling issue
Fixed an issue where the “Temperature” parameter was not scaled correctly when using the “Separate Parameters” feature.
2024-12-17 11:30:16 +09:00
Kwaroran
dcc48d5cb3 Add subtitle 2024-12-15 19:33:26 +09:00
Kwaroran
7d4030cf7a Readd Gemini stream 2024-12-14 20:10:07 +09:00
Kwaroran
f4b78480f3 Rework realm and several bug fixes 2024-12-14 19:09:28 +09:00
Kwaroran
fcd049eae8 Refactor parameter handling in requestGoogleCloudVertex function to filter parameters based on modelInfo 2024-12-12 12:56:17 +09:00
Kwaroran
146aaa1e7c Skip setting value for 'top_k' when 'ignoreTopKIfZero' is true and 'top_k' is 0 2024-12-12 12:34:10 +09:00
Kwaroran
fc571d45ac Rename parameter 'ignoreTopKIfOne' to 'ignoreTopKIfZero' 2024-12-12 10:43:18 +09:00
Kwaroran
5174082796 Add Gemini related features 2024-12-12 08:38:33 +09:00
Kwaroran
61763deaa7 Update Gemini parameters 2024-12-12 07:57:01 +09:00
Kwaroran
64e759e187 Fix mistral top_p and fix seperateParameters 2024-12-11 03:44:07 +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
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
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