Browse Source

fix:修复前段写作大模型回复不显示问题

lalala 9 months ago
parent
commit
1676346ee0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/apis/ai.ts

+ 3 - 1
src/apis/ai.ts

@@ -29,7 +29,9 @@ const aiApis = {
         }, {
         }, {
             params: {
             params: {
                 dialogueId: dialogueId
                 dialogueId: dialogueId
-            }
+            },
+             timeout: 60000, // 设置60秒超时(默认通常是0,表示不超时)
+            timeoutErrorMessage: '请求超时,请稍后重试'
         })
         })
     },
     },
     rewrite(assignmentId: number, userId: number) {
     rewrite(assignmentId: number, userId: number) {