mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-21 09:23:41 +08:00
Compare commits
1 Commits
58e1b9e39e
...
Leizhenpen
Author | SHA1 | Date | |
---|---|---|---|
|
c9ef6d58ed |
11
README.md
11
README.md
@@ -40,13 +40,12 @@ English / [简体中文](./README_CN.md)
|
||||
|
||||
</div>
|
||||
|
||||
## 🥳 Cheer for DeepSeek, China's AI star!
|
||||
> Purpose-Built UI for DeepSeek Reasoner Model
|
||||
## 🥳 Cheer for NextChat iOS Version Online!
|
||||
> [ 👉 Click Here Install Now](https://apps.apple.com/us/app/nextchat-ai/id6743085599)
|
||||
|
||||

|
||||
|
||||
|
||||
<img src="https://github.com/user-attachments/assets/f3952210-3af1-4dc0-9b81-40eaa4847d9a"/>
|
||||
|
||||
|
||||
|
||||
## 🫣 NextChat Support MCP !
|
||||
> Before build, please set env ENABLE_MCP=true
|
||||
|
||||
|
@@ -117,7 +117,7 @@ export class DoubaoApi implements LLMApi {
|
||||
options.onController?.(controller);
|
||||
|
||||
try {
|
||||
const chatPath = this.path(ByteDance.ChatPath(modelConfig.model));
|
||||
const chatPath = this.path(ByteDance.ChatPath);
|
||||
const chatPayload = {
|
||||
method: "POST",
|
||||
body: JSON.stringify(requestPayload),
|
||||
|
@@ -1868,7 +1868,7 @@ function _Chat() {
|
||||
</div>
|
||||
{!isUser && (
|
||||
<div className={styles["chat-model-name"]}>
|
||||
{message.modelDisplayName ?? message.model}
|
||||
{message.model}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
@@ -82,11 +82,7 @@ export function Avatar(props: { model?: ModelType; avatar?: string }) {
|
||||
LlmIcon = BotIconGrok;
|
||||
} else if (modelName.startsWith("hunyuan")) {
|
||||
LlmIcon = BotIconHunyuan;
|
||||
} else if (
|
||||
modelName.startsWith("doubao") ||
|
||||
modelName.startsWith("ep-") ||
|
||||
modelName.startsWith("bot-")
|
||||
) {
|
||||
} else if (modelName.startsWith("doubao") || modelName.startsWith("ep-")) {
|
||||
LlmIcon = BotIconDoubao;
|
||||
} else if (
|
||||
modelName.includes("glm") ||
|
||||
|
@@ -216,13 +216,7 @@ export const Baidu = {
|
||||
|
||||
export const ByteDance = {
|
||||
ExampleEndpoint: "https://ark.cn-beijing.volces.com/api/",
|
||||
ChatPath: (modelName: string) => {
|
||||
if (modelName.startsWith("bot-")) {
|
||||
return "api/v3/bots/chat/completions";
|
||||
} else {
|
||||
return "api/v3/chat/completions";
|
||||
}
|
||||
},
|
||||
ChatPath: "api/v3/chat/completions",
|
||||
};
|
||||
|
||||
export const Alibaba = {
|
||||
|
@@ -60,7 +60,6 @@ export type ChatMessage = RequestMessage & {
|
||||
isError?: boolean;
|
||||
id: string;
|
||||
model?: ModelType;
|
||||
modelDisplayName?: string;
|
||||
tools?: ChatMessageTool[];
|
||||
audio_url?: string;
|
||||
isMcpResponse?: boolean;
|
||||
@@ -152,24 +151,6 @@ function getSummarizeModel(
|
||||
return [currentModel, providerName];
|
||||
}
|
||||
|
||||
function getModelDisplayName(
|
||||
model: ModelType,
|
||||
providerName: ServiceProvider,
|
||||
): string | undefined {
|
||||
const configStore = useAppConfig.getState();
|
||||
const accessStore = useAccessStore.getState();
|
||||
const allModel = collectModelsWithDefaultModel(
|
||||
configStore.models,
|
||||
[configStore.customModels, accessStore.customModels].join(","),
|
||||
accessStore.defaultModel,
|
||||
);
|
||||
|
||||
const matchedModel = allModel.find(
|
||||
(m) => m.name === model && m.provider?.providerName === providerName,
|
||||
);
|
||||
return matchedModel ? matchedModel.displayName : undefined;
|
||||
}
|
||||
|
||||
function countMessages(msgs: ChatMessage[]) {
|
||||
return msgs.reduce(
|
||||
(pre, cur) => pre + estimateTokenLength(getMessageTextContent(cur)),
|
||||
@@ -456,10 +437,6 @@ export const useChatStore = createPersistStore(
|
||||
role: "assistant",
|
||||
streaming: true,
|
||||
model: modelConfig.model,
|
||||
modelDisplayName: getModelDisplayName(
|
||||
modelConfig.model,
|
||||
modelConfig.providerName,
|
||||
),
|
||||
});
|
||||
|
||||
// get recent messages
|
||||
|
@@ -304,9 +304,7 @@ export function getTimeoutMSByModel(model: string) {
|
||||
model.startsWith("o1") ||
|
||||
model.startsWith("o3") ||
|
||||
model.includes("deepseek-r") ||
|
||||
model.includes("-thinking") ||
|
||||
model.startsWith("ep-") ||
|
||||
model.startsWith("bot-")
|
||||
model.includes("-thinking")
|
||||
)
|
||||
return REQUEST_TIMEOUT_MS_FOR_THINKING;
|
||||
return REQUEST_TIMEOUT_MS;
|
||||
|
Reference in New Issue
Block a user