Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
49e5fc3e
authored
May 04, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:【AI 大模型】fetchEventSource 失败时,无限重试的问题
parent
47c2e742
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
src/views/ai/chat/index/index.vue
+2
-0
src/views/ai/mindmap/index/index.vue
+2
-0
src/views/ai/write/index/index.vue
+4
-2
No files found.
src/views/ai/chat/index/index.vue
View file @
49e5fc3e
...
@@ -462,6 +462,8 @@ const doSendMessageStream = async (userMessage: ChatMessageVO) => {
...
@@ -462,6 +462,8 @@ const doSendMessageStream = async (userMessage: ChatMessageVO) => {
(
error
)
=>
{
(
error
)
=>
{
message
.
alert
(
`对话异常!
${
error
}
`
)
message
.
alert
(
`对话异常!
${
error
}
`
)
stopStream
()
stopStream
()
// 需要抛出异常,禁止重试
throw
error
},
},
()
=>
{
()
=>
{
stopStream
()
stopStream
()
...
...
src/views/ai/mindmap/index/index.vue
View file @
49e5fc3e
...
@@ -80,6 +80,8 @@ const submit = (data: AiMindMapGenerateReqVO) => {
...
@@ -80,6 +80,8 @@ const submit = (data: AiMindMapGenerateReqVO) => {
onError
(
err
)
{
onError
(
err
)
{
console
.
error
(
'生成思维导图失败'
,
err
)
console
.
error
(
'生成思维导图失败'
,
err
)
stopStream
()
stopStream
()
// 需要抛出异常,禁止重试
throw
error
},
},
ctrl
:
ctrl
.
value
ctrl
:
ctrl
.
value
})
})
...
...
src/views/ai/write/index/index.vue
View file @
49e5fc3e
...
@@ -57,9 +57,11 @@ const submit = (data: WriteVO) => {
...
@@ -57,9 +57,11 @@ const submit = (data: WriteVO) => {
},
},
ctrl
:
abortController
.
value
,
ctrl
:
abortController
.
value
,
onClose
:
stopStream
,
onClose
:
stopStream
,
onError
:
(
...
er
r
)
=>
{
onError
:
(
erro
r
)
=>
{
console
.
error
(
'写作异常'
,
...
er
r
)
console
.
error
(
'写作异常'
,
erro
r
)
stopStream
()
stopStream
()
// 需要抛出异常,禁止重试
throw
error
}
}
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment