mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-18 15:03:43 +08:00
Merge branch 'main' of https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web
This commit is contained in:
@@ -61,7 +61,7 @@ import {
|
||||
isVisionModel,
|
||||
} from "../utils";
|
||||
|
||||
import { compressImage } from "@/app/utils/chat";
|
||||
import { uploadImage as uploadImageRemote } from "@/app/utils/chat";
|
||||
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
@@ -1167,7 +1167,7 @@ function _Chat() {
|
||||
...(await new Promise<string[]>((res, rej) => {
|
||||
setUploading(true);
|
||||
const imagesData: string[] = [];
|
||||
compressImage(file, 256 * 1024)
|
||||
uploadImageRemote(file)
|
||||
.then((dataUrl) => {
|
||||
imagesData.push(dataUrl);
|
||||
setUploading(false);
|
||||
@@ -1209,7 +1209,7 @@ function _Chat() {
|
||||
const imagesData: string[] = [];
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = event.target.files[i];
|
||||
compressImage(file, 256 * 1024)
|
||||
uploadImageRemote(file)
|
||||
.then((dataUrl) => {
|
||||
imagesData.push(dataUrl);
|
||||
if (
|
||||
|
||||
@@ -57,6 +57,7 @@ import {
|
||||
ByteDance,
|
||||
Alibaba,
|
||||
Google,
|
||||
GoogleSafetySettingsThreshold,
|
||||
OPENAI_BASE_URL,
|
||||
Path,
|
||||
RELEASE_URL,
|
||||
@@ -1125,6 +1126,35 @@ export function Settings() {
|
||||
}
|
||||
></input>
|
||||
</ListItem>
|
||||
<ListItem
|
||||
title={
|
||||
Locale.Settings.Access.Google.GoogleSafetySettings
|
||||
.Title
|
||||
}
|
||||
subTitle={
|
||||
Locale.Settings.Access.Google.GoogleSafetySettings
|
||||
.SubTitle
|
||||
}
|
||||
>
|
||||
<Select
|
||||
value={accessStore.googleSafetySettings}
|
||||
onChange={(e) => {
|
||||
accessStore.update(
|
||||
(access) =>
|
||||
(access.googleSafetySettings = e.target
|
||||
.value as GoogleSafetySettingsThreshold),
|
||||
);
|
||||
}}
|
||||
>
|
||||
{Object.entries(GoogleSafetySettingsThreshold).map(
|
||||
([k, v]) => (
|
||||
<option value={v} key={k}>
|
||||
{k}
|
||||
</option>
|
||||
),
|
||||
)}
|
||||
</Select>
|
||||
</ListItem>
|
||||
</>
|
||||
)}
|
||||
{accessStore.provider === ServiceProvider.Anthropic && (
|
||||
|
||||
Reference in New Issue
Block a user