diff --git a/web/src/typings/chat.d.ts b/web/src/typings/chat.d.ts index 2d8f8f7b..7930dd18 100644 --- a/web/src/typings/chat.d.ts +++ b/web/src/typings/chat.d.ts @@ -63,9 +63,9 @@ declare namespace Chat { name: string url: string enablePerModeRatelimit: boolean, - maxToken?: number, - defaultToken?: number, - orderNumber?: number, + maxToken?: string, + defaultToken?: string, + orderNumber?: string, httpTimeOut?: number } diff --git a/web/src/views/chat/components/Session/SessionConfig.vue b/web/src/views/chat/components/Session/SessionConfig.vue index d28e21db..de98bc60 100644 --- a/web/src/views/chat/components/Session/SessionConfig.vue +++ b/web/src/views/chat/components/Session/SessionConfig.vue @@ -78,7 +78,7 @@ watch(modelRef, async (modelValue: ModelType) => { const tokenUpperLimit = computed(() => { - if (data.value) { + if (data && data.value) { for (let modelConfig of data.value) { if (modelConfig.name == modelRef.value.chatModel) { return modelConfig.maxToken @@ -91,7 +91,7 @@ const tokenUpperLimit = computed(() => { }) const defaultToken = computed(() => { - if (data.value) { + if (data && data.value) { for (let modelConfig of data.value) { if (modelConfig.name == modelRef.value.chatModel) { return modelConfig.defaultToken