Skip to content

Commit

Permalink
fix: stream check格式修正 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkkunny authored Feb 23, 2025
1 parent 1158136 commit 0c70d8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/chat_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func chatCompletionsWithStream(reqCtx echo.Context, msgID string, convInfo *dto.
if err != nil {
return err
}
_, err = stlerr.ErrorWith(fmt.Fprint(writer, "data: "+string(data)+"\n"))
_, err = stlerr.ErrorWith(fmt.Fprint(writer, "data: "+string(data)+"\n\n"))
if err != nil {
return err
}
Expand Down Expand Up @@ -241,7 +241,7 @@ func chatCompletionsWithStream(reqCtx echo.Context, msgID string, convInfo *dto.
if err != nil {
return err
}
_, err = stlerr.ErrorWith(fmt.Fprint(writer, "data: "+string(data)+"\n"))
_, err = stlerr.ErrorWith(fmt.Fprint(writer, "data: "+string(data)+"\n\n"))
if err != nil {
return err
}
Expand Down

0 comments on commit 0c70d8f

Please sign in to comment.