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
7237da97
authored
May 21, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【bug】解决 AI chat stream 返回 content === '' 会结束对话问题
parent
3634fca8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
+1
-6
src/views/ai/chat/index.vue
+1
-6
No files found.
src/views/ai/chat/index.vue
View file @
7237da97
...
...
@@ -308,13 +308,8 @@ const doSendStream = async (userMessage: ChatMessageVO) => {
conversationInAbortController
.
value
,
async
(
message
)
=>
{
const
data
=
JSON
.
parse
(
message
.
data
)
// TODO 芋艿:类型处理;
// debugger
// 如果没有内容结束链接
// 如果内容为空,就不处理。
if
(
data
.
receive
.
content
===
''
)
{
// 标记对话结束
conversationInProgress
.
value
=
false
// 结束 stream 对话
conversationInAbortController
.
value
.
abort
()
return
}
// 首次返回需要添加一个 message 到页面,后面的都是更新
...
...
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