diff --git a/stream.go b/stream.go index f11004b..2fd6715 100644 --- a/stream.go +++ b/stream.go @@ -7,7 +7,6 @@ import ( "encoding/json" "errors" "fmt" - "io" "net/http" ) @@ -27,9 +26,7 @@ func (stream *CompletionStream) Recv() (response CompletionResponse, err error) waitForData: line, err := stream.reader.ReadBytes('\n') if err != nil { - if errors.Is(err, io.EOF) { - return - } + return } var headerData = []byte("data: ")