mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 12:10:17 +09:00
support bytedance api start with "bot-" (with internet ability)
This commit is contained in:
parent
c15dbf5296
commit
e2429d444b
@ -117,7 +117,7 @@ export class DoubaoApi implements LLMApi {
|
||||
options.onController?.(controller);
|
||||
|
||||
try {
|
||||
const chatPath = this.path(ByteDance.ChatPath);
|
||||
const chatPath = this.path(ByteDance.ChatPath(modelConfig.model));
|
||||
const chatPayload = {
|
||||
method: "POST",
|
||||
body: JSON.stringify(requestPayload),
|
||||
|
@ -82,7 +82,11 @@ 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-")) {
|
||||
} else if (
|
||||
modelName.startsWith("doubao") ||
|
||||
modelName.startsWith("ep-") ||
|
||||
modelName.startsWith("bot-")
|
||||
) {
|
||||
LlmIcon = BotIconDoubao;
|
||||
} else if (
|
||||
modelName.toLowerCase().includes("glm") ||
|
||||
|
@ -216,7 +216,13 @@ export const Baidu = {
|
||||
|
||||
export const ByteDance = {
|
||||
ExampleEndpoint: "https://ark.cn-beijing.volces.com/api/",
|
||||
ChatPath: "api/v3/chat/completions",
|
||||
ChatPath: (modelName: string) => {
|
||||
if (modelName.startsWith("bot-")) {
|
||||
return "api/v3/bots/chat/completions";
|
||||
} else {
|
||||
return "api/v3/chat/completions";
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const Alibaba = {
|
||||
|
@ -304,7 +304,9 @@ export function getTimeoutMSByModel(model: string) {
|
||||
model.startsWith("o1") ||
|
||||
model.startsWith("o3") ||
|
||||
model.includes("deepseek-r") ||
|
||||
model.includes("-thinking")
|
||||
model.includes("-thinking") ||
|
||||
model.startsWith("ep-") ||
|
||||
model.startsWith("bot-")
|
||||
)
|
||||
return REQUEST_TIMEOUT_MS_FOR_THINKING;
|
||||
return REQUEST_TIMEOUT_MS;
|
||||
|
Loading…
Reference in New Issue
Block a user