fix: lint errors
This commit is contained in:
parent
9fbfc0ca82
commit
d727d6b68e
4 changed files with 8 additions and 12 deletions
|
|
@ -67,7 +67,7 @@ func (c *Client) ChatCompletionStream(request ChatRequest) (*ChatResponseStream,
|
|||
}
|
||||
|
||||
if resp.StatusCode() != 200 {
|
||||
defer rbody.Close()
|
||||
defer func() { _ = rbody.Close() }()
|
||||
var respBodyStr string
|
||||
if respBody, err := io.ReadAll(rbody); err == nil {
|
||||
respBodyStr = string(respBody)
|
||||
|
|
@ -83,7 +83,7 @@ func (c *Client) ChatCompletionStream(request ChatRequest) (*ChatResponseStream,
|
|||
}
|
||||
go func() {
|
||||
defer func() {
|
||||
rbody.Close()
|
||||
_ = rbody.Close()
|
||||
close(ret.Stream)
|
||||
close(ret.Done)
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue