Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ui/src/views/application/component/GeneratePromptDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ const getWrite = (reader: any) => {
if (split) {
for (const index in split) {
const chunk = JSON?.parse(split[index].replace('data:', ''))
if (chunk.error) {
loading.value = false
stopStreaming()
middleAnswer.content = chunk.error
return Promise.reject(new Error(chunk.error))
}
if (!chunk.is_end) {
// 实时将新接收的内容添加到完整内容中
fullContent.value += chunk.content
Expand Down
Loading