mini optimizations
This commit is contained in:
parent
d74f79e9c5
commit
1ae5fdbf01
|
@ -4,7 +4,7 @@ import {
|
||||||
ApiPath,
|
ApiPath,
|
||||||
SILICONFLOW_BASE_URL,
|
SILICONFLOW_BASE_URL,
|
||||||
SiliconFlow,
|
SiliconFlow,
|
||||||
REQUEST_TIMEOUT_MS,
|
REQUEST_TIMEOUT_MS_FOR_THINKING,
|
||||||
} from "@/app/constant";
|
} from "@/app/constant";
|
||||||
import {
|
import {
|
||||||
useAccessStore,
|
useAccessStore,
|
||||||
|
@ -123,7 +123,7 @@ export class SiliconflowApi implements LLMApi {
|
||||||
// make a fetch request
|
// make a fetch request
|
||||||
const requestTimeoutId = setTimeout(
|
const requestTimeoutId = setTimeout(
|
||||||
() => controller.abort(),
|
() => controller.abort(),
|
||||||
REQUEST_TIMEOUT_MS,
|
REQUEST_TIMEOUT_MS_FOR_THINKING,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (shouldStream) {
|
if (shouldStream) {
|
||||||
|
|
|
@ -54,6 +54,8 @@ export function Avatar(props: { model?: ModelType; avatar?: string }) {
|
||||||
if (
|
if (
|
||||||
modelName.startsWith("gpt") ||
|
modelName.startsWith("gpt") ||
|
||||||
modelName.startsWith("chatgpt") ||
|
modelName.startsWith("chatgpt") ||
|
||||||
|
modelName.startsWith("dall-e") ||
|
||||||
|
modelName.startsWith("dalle") ||
|
||||||
modelName.startsWith("o1") ||
|
modelName.startsWith("o1") ||
|
||||||
modelName.startsWith("o3")
|
modelName.startsWith("o3")
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in New Issue