mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-16 08:04:10 +00:00
chore: use StringContent() to convert response to text
This commit is contained in:
@@ -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())
|
||||||
|
Reference in New Issue
Block a user