mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
Merge branch 'ChatGPTNextWeb:main' into main
This commit is contained in:
commit
f3faa17f9d
@ -225,6 +225,8 @@ function useSubmitHandler() {
|
||||
}, []);
|
||||
|
||||
const shouldSubmit = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
|
||||
// Fix Chinese input method "Enter" on Safari
|
||||
if (e.keyCode == 229) return false;
|
||||
if (e.key !== "Enter") return false;
|
||||
if (e.key === "Enter" && (e.nativeEvent.isComposing || isComposing.current))
|
||||
return false;
|
||||
|
12
app/utils.ts
12
app/utils.ts
@ -291,9 +291,11 @@ export function getMessageImages(message: RequestMessage): string[] {
|
||||
}
|
||||
|
||||
export function isVisionModel(model: string) {
|
||||
return (
|
||||
// model.startsWith("gpt-4-vision") ||
|
||||
// model.startsWith("gemini-pro-vision") ||
|
||||
model.includes("vision")
|
||||
);
|
||||
// Note: This is a better way using the TypeScript feature instead of `&&` or `||` (ts v5.5.0-dev.20240314 I've been using)
|
||||
const visionKeywords = [
|
||||
"vision",
|
||||
"claude-3",
|
||||
];
|
||||
|
||||
return visionKeywords.some(keyword => model.includes(keyword));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user