Skip to content

Commit b17b268

Browse files
committed
fix: 修复流检查中的错误处理未返回问题
当发生错误时直接返回错误而不是继续处理
1 parent a840c83 commit b17b268

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

usecase/modelkit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func streamCheck(ctx context.Context, chatModel *model.BaseChatModel) (string, e
335335
break
336336
}
337337
if err != nil {
338-
// 错误处理
338+
return "", err
339339
}
340340
// 响应片段处理
341341
res += chunk.Content

0 commit comments

Comments
 (0)