mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-02 08:06:38 +08:00
commit
513a806f3d
4
.github/workflows/dockerToHub.yml
vendored
4
.github/workflows/dockerToHub.yml
vendored
@ -72,7 +72,7 @@ jobs:
|
|||||||
rm -rf /www/server/nginx/proxy_cache_dir/*
|
rm -rf /www/server/nginx/proxy_cache_dir/*
|
||||||
rm -rf /www/server/nginx/proxy_temp_dir/*
|
rm -rf /www/server/nginx/proxy_temp_dir/*
|
||||||
sleep 2
|
sleep 2
|
||||||
tccli cdn PurgePathCache --cli-unfold-argument --Paths '${{ secrets.WEB_URL }}' --FlushType delete
|
#tccli cdn PurgePathCache --cli-unfold-argument --Paths '${{ secrets.WEB_URL }}' --FlushType delete
|
||||||
- name: Sync repository to ty
|
- name: Sync repository to ty
|
||||||
run: |
|
run: |
|
||||||
yes | docker image prune
|
yes | docker image prune
|
||||||
@ -98,7 +98,7 @@ jobs:
|
|||||||
rm -rf /www/server/nginx/proxy_cache_dir/*
|
rm -rf /www/server/nginx/proxy_cache_dir/*
|
||||||
rm -rf /www/server/nginx/proxy_temp_dir/*
|
rm -rf /www/server/nginx/proxy_temp_dir/*
|
||||||
sleep 2
|
sleep 2
|
||||||
tccli cdn PurgePathCache --cli-unfold-argument --Paths '${{ secrets.WEB_URL }}' --FlushType delete
|
#tccli cdn PurgePathCache --cli-unfold-argument --Paths '${{ secrets.WEB_URL }}' --FlushType delete
|
||||||
- name: Sync repository to tx
|
- name: Sync repository to tx
|
||||||
run: |
|
run: |
|
||||||
yes | docker image prune
|
yes | docker image prune
|
||||||
|
@ -131,6 +131,7 @@ export const GEMINI_SUMMARIZE_MODEL = "gemini-pro";
|
|||||||
|
|
||||||
export const KnowledgeCutOffDate: Record<string, string> = {
|
export const KnowledgeCutOffDate: Record<string, string> = {
|
||||||
default: "2021-09",
|
default: "2021-09",
|
||||||
|
"gpt-4-turbo": "2023-12",
|
||||||
"gpt-4-turbo-preview": "2023-12",
|
"gpt-4-turbo-preview": "2023-12",
|
||||||
"gpt-4-1106-preview": "2023-04",
|
"gpt-4-1106-preview": "2023-04",
|
||||||
"gpt-4-0125-preview": "2023-12",
|
"gpt-4-0125-preview": "2023-12",
|
||||||
@ -160,6 +161,24 @@ export const DEFAULT_MODELS = [
|
|||||||
providerType: "openai",
|
providerType: "openai",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "gpt-4-turbo",
|
||||||
|
available: true,
|
||||||
|
provider: {
|
||||||
|
id: "openai",
|
||||||
|
providerName: "OpenAI",
|
||||||
|
providerType: "openai",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "gpt-4-turbo-2024-04-09",
|
||||||
|
available: true,
|
||||||
|
provider: {
|
||||||
|
id: "openai",
|
||||||
|
providerName: "OpenAI",
|
||||||
|
providerType: "openai",
|
||||||
|
},
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// name: "gpt-4",
|
// name: "gpt-4",
|
||||||
// describe: "GPT-4,聪明,贵,慢",
|
// describe: "GPT-4,聪明,贵,慢",
|
||||||
|
@ -290,8 +290,11 @@ export function getMessageImages(message: RequestMessage): string[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isVisionModel(model: string) {
|
export function isVisionModel(model: string) {
|
||||||
// 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"];
|
const visionKeywords = ["vision", "claude-3"];
|
||||||
|
const isGpt4Turbo =
|
||||||
|
model.includes("gpt-4-turbo") && !model.includes("preview");
|
||||||
|
|
||||||
return visionKeywords.some((keyword) => model.includes(keyword));
|
return (
|
||||||
|
visionKeywords.some((keyword) => model.includes(keyword)) || isGpt4Turbo
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user