Commit Graph

297 Commits

Author SHA1 Message Date
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
Kwaroran
c22cde2c8a Fix systemContentReplacement empty string 2024-11-27 18:00:40 +09:00
Kwaroran
1e96eada22 Handle optional system content replacement in reformater function 2024-11-27 11:10:15 +09:00
Kwaroran
8366acc66c Add abort signal handling to requestGoogleCloudVertex function 2024-11-27 08:04:33 +09:00
Kwaroran
68113cc383 Add system prompt handling to requestGoogleCloudVertex function 2024-11-27 08:03:17 +09:00
Kwaroran
981ec3921e Add plenty of features 2024-11-27 06:01:42 +09:00
Kwaroran
597c8879fc Add systemContentReplacement and Flags 2024-11-27 04:33:12 +09:00
kwaroran
cc8d753dc8 Rework custom API 2024-11-25 23:04:32 +09:00
kwaroran
8274fae180 Refactor model handling 2024-11-25 05:25:58 +09:00
kwaroran
6214388cc6 Add new model options for Mistral Large 2411 and Gemini Exp 1121 and Flash 002, fixes #666 2024-11-22 21:52:39 +09:00
kwaroran
ec03903372 Add OAI prediction 2024-11-21 15:44:14 +09:00
kwaroran
e895008814 Add 4o 1120 2024-11-21 15:38:04 +09:00
kwaroran
ebbb9d9191 Add specific token ban 2024-11-18 20:08:34 +09:00
kwaroran
c2b5177c92 Improve welcome page and add gemini exp 2024-11-17 23:03:22 +09:00
kwaroran
bea14f22c1 Add JSON schema for Claude 2024-11-15 12:44:50 +09:00
heshiqi
3bbb2ace7d Fix AWS Support
AWS Claude model calling no longer support direct calling, but support Cross-region inference instead. All Cross-region inference model profile IDs equal to original model name with "us." in the beginning.
Reference: https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/inference-profiles
2024-11-08 14:18:37 +08:00
kwaroran
efbda2333d Change saving 2024-11-02 01:46:21 +09:00
kwaroran
29d9c0bcb1 add aws 3.5 sonnet v2 (#654)
# PR Checklist
- [ ] 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?
- [ ] Did you added a type def?

# Description

![image](https://github.com/user-attachments/assets/45055aca-45d6-40dc-8c1e-dec5972f5bd8)
2024-10-26 21:19:54 +09:00
kwaroran
ffa6308ca3 change globalApi path 2024-10-26 20:40:40 +09:00
kwaroran
e255199fcc Change setDatabase and getDatabase to accessing dbState 2024-10-25 19:11:41 +09:00
kwaroran
0f6246bef6 fix structuredclone 2024-10-25 18:11:00 +09:00
kwaroran
b3fddb814e Migrate all DataBase to DBState 2024-10-24 01:59:57 +09:00
bangonicdd
95e3f36729 add aws 3.5 sonnet v2 2024-10-24 01:50:42 +09:00
kwaroran
2044d9b63b Change DataBase inside svelte to DBState for performance 2024-10-23 23:46:32 +09:00
kwaroran
5a931d4ba0 Migrate to Tauri V2 2024-10-09 20:07:59 +09:00
kwaroran
39996125c9 Add Gemini pro 1.5 002 2024-09-26 08:39:08 +09:00
kwaroran
a9ddf66001 Add Jamba Support 2024-09-13 08:54:29 +09:00
kwaroran
567a6e3dea Fix max tokens 2024-09-13 08:25:34 +09:00
kwaroran
a3ad188b07 Add Gpt4o1 support 2024-09-13 08:14:30 +09:00
kwaroran
5b6c3e0d04 Add JSON Schema 2024-09-11 06:08:21 +09:00
kwaroran
611f3e4b94 Add ooba convertion 2024-09-09 18:17:26 +09:00
kwaroran
db39b64841 Add safety mode param 2024-09-09 03:48:41 +09:00
kwaroran
cb34b3e422 Add parameter manager 2024-09-08 21:19:28 +09:00
kwaroran
7ba6a81ff0 fix nai issue 2024-09-01 19:38:54 +09:00