S0025136190 преди 7 месеца
родител
ревизия
0fc1e6f887
променени са 4 файла, в които са добавени 12 реда и са изтрити 12 реда
  1. 1 1
      app/api/api.ts
  2. 2 2
      app/client/platforms/bigModel.ts
  3. 4 4
      app/components/chat.tsx
  4. 5 5
      app/components/sidebar.tsx

+ 1 - 1
app/api/api.ts

@@ -3,7 +3,7 @@ import axios, { AxiosResponse } from 'axios';
 // 创建axios实例
 const axiosInstance = axios.create({
     baseURL: '/bigmodel-api',
-    timeout: 30000,// 请求超时30秒
+    timeout: 300000,// 请求超时5分钟
 });
 
 // 请求拦截器

+ 2 - 2
app/client/platforms/bigModel.ts

@@ -23,7 +23,7 @@ export class BigModelApi implements LLMApi {
     const chatMode = useChatStore.getState().chatMode;
     this.baseURL = '/bigmodel-api';
     if (chatMode === 'LOCAL') {
-      this.apiPath = this.baseURL + '/takai/api/chat';
+      this.apiPath = this.baseURL + '/deepseek/api/chat';
     } else {
       this.apiPath = this.baseURL + '/bigmodel/api/model-api/sse-invoke';
     }
@@ -184,7 +184,7 @@ export class BigModelApi implements LLMApi {
           }
           const chatMode = useChatStore.getState().chatMode;
           if (chatMode === 'LOCAL') {
-            await api.post('takai/api/dialog/save', data);
+            await api.post('deepseek/api/dialog/save', data);
           } else {
             await api.post('bigmodel/api/dialog/save', data);
           }

+ 4 - 4
app/components/chat.tsx

@@ -622,7 +622,7 @@ export function ChatActions(props: {
       }
       let url = '';
       if (chatStore.chatMode === 'LOCAL') {
-        url = '/takai/api/async/completions';
+        url = '/deepseek/api/async/completions';
       } else {
         url = '/bigmodel/api/async/completions';
       }
@@ -1009,7 +1009,7 @@ function _Chat() {
       let url = null;
       console.log('selectedFruit', selectedFruit);
       if (selectedFruit === 'LOCAL') {
-        url = '/takai/api/application/list';
+        url = '/deepseek/api/application/list';
       } else {
         url = '/bigmodel/api/application/list';
       }
@@ -1051,7 +1051,7 @@ function _Chat() {
     try {
       let url = null;
       if (selectedFruit === 'LOCAL') {
-        url = '/takai/api/presets';
+        url = '/deepseek/api/presets';
       } else {
         url = '/bigmodel/api/presets';
       }
@@ -1626,7 +1626,7 @@ function _Chat() {
                 ))}
               </Select>
               {
-                appList.length > 1 ?
+                appList.length > 0 ?
                   <Select
                     style={{ width: '100%', height: 38, marginRight: 5 }}
                     placeholder='请选择'

+ 5 - 5
app/components/sidebar.tsx

@@ -223,7 +223,7 @@ export const SideBar = (props: { className?: string }) => {
         const appId = globalStore.selectedAppId;
         if (appId) {
           if (chatMode === 'LOCAL') {
-            url = `/takai/api/dialog/list/${appId}`;
+            url = `/deepseek/api/dialog/list/${appId}`;
           } else {
             url = `/bigmodel/api/dialog/list/${appId}`;
           }
@@ -261,7 +261,7 @@ export const SideBar = (props: { className?: string }) => {
                       let blob = null;
                       if (getType() === 'bigModel') {
                         if (chatMode === 'LOCAL') {
-                          blob = await api.post(`/takai/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
+                          blob = await api.post(`/deepseek/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
                         } else {
                           blob = await api.post(`/bigmodel/api/dialog/export/${child.key}`, {}, { responseType: 'blob' });
                         }
@@ -285,7 +285,7 @@ export const SideBar = (props: { className?: string }) => {
                     try {
                       if (getType() === 'bigModel') {
                         if (chatMode === 'LOCAL') {
-                          await api.delete(`/takai/api/dialog/del/${child.key}`);
+                          await api.delete(`/deepseek/api/dialog/del/${child.key}`);
                           await fetchChatList(chatMode);
                         } else {
                           await api.delete(`/bigmodel/api/dialog/del/${child.key}`);
@@ -414,7 +414,7 @@ export const SideBar = (props: { className?: string }) => {
           let url = ``;
           if (getType() === 'bigModel') {
             if (chatStore.chatMode === 'LOCAL') {
-              url = `/takai/api/dialog/detail/${key}`;
+              url = `/deepseek/api/dialog/detail/${key}`;
             } else {
               url = `/bigmodel/api/dialog/detail/${key}`;
             }
@@ -472,7 +472,7 @@ export const SideBar = (props: { className?: string }) => {
             try {
               if (getType() === 'bigModel') {
                 if (chatStore.chatMode === 'LOCAL') {
-                  await api.put(`/takai/api/dialog/update`, {
+                  await api.put(`/deepseek/api/dialog/update`, {
                     id: values.dialogId,
                     dialogName: values.dialogName
                   });