mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 20:20:16 +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);
|
options.onController?.(controller);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const chatPath = this.path(ByteDance.ChatPath);
|
const chatPath = this.path(ByteDance.ChatPath(modelConfig.model));
|
||||||
const chatPayload = {
|
const chatPayload = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(requestPayload),
|
body: JSON.stringify(requestPayload),
|
||||||
|
@ -82,7 +82,11 @@ export function Avatar(props: { model?: ModelType; avatar?: string }) {
|
|||||||
LlmIcon = BotIconGrok;
|
LlmIcon = BotIconGrok;
|
||||||
} else if (modelName.startsWith("hunyuan")) {
|
} else if (modelName.startsWith("hunyuan")) {
|
||||||
LlmIcon = BotIconHunyuan;
|
LlmIcon = BotIconHunyuan;
|
||||||
} else if (modelName.startsWith("doubao") || modelName.startsWith("ep-")) {
|
} else if (
|
||||||
|
modelName.startsWith("doubao") ||
|
||||||
|
modelName.startsWith("ep-") ||
|
||||||
|
modelName.startsWith("bot-")
|
||||||
|
) {
|
||||||
LlmIcon = BotIconDoubao;
|
LlmIcon = BotIconDoubao;
|
||||||
} else if (
|
} else if (
|
||||||
modelName.toLowerCase().includes("glm") ||
|
modelName.toLowerCase().includes("glm") ||
|
||||||
|
@ -216,7 +216,13 @@ export const Baidu = {
|
|||||||
|
|
||||||
export const ByteDance = {
|
export const ByteDance = {
|
||||||
ExampleEndpoint: "https://ark.cn-beijing.volces.com/api/",
|
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 = {
|
export const Alibaba = {
|
||||||
|
@ -304,7 +304,9 @@ export function getTimeoutMSByModel(model: string) {
|
|||||||
model.startsWith("o1") ||
|
model.startsWith("o1") ||
|
||||||
model.startsWith("o3") ||
|
model.startsWith("o3") ||
|
||||||
model.includes("deepseek-r") ||
|
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_FOR_THINKING;
|
||||||
return REQUEST_TIMEOUT_MS;
|
return REQUEST_TIMEOUT_MS;
|
||||||
|
Loading…
Reference in New Issue
Block a user