chore: use StringContent() to convert response to text
This commit is contained in:
parent
ef88497f25
commit
04b49aa0ec
@ -274,7 +274,7 @@ func StreamHandler(c *gin.Context, resp *http.Response) (*model.ErrorWithStatusC
|
|||||||
if response == nil {
|
if response == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
responseText += fmt.Sprintf("%v", response.Choices[0].Delta.Content)
|
responseText += response.Choices[0].Delta.StringContent()
|
||||||
jsonResponse, err := json.Marshal(response)
|
jsonResponse, err := json.Marshal(response)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.SysError("error marshalling stream response: " + err.Error())
|
logger.SysError("error marshalling stream response: " + err.Error())
|
||||||
|
Loading…
Reference in New Issue
Block a user