Skip to content

Commit

Permalink
fix: fix PaLM2 not billed
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jul 22, 2023
1 parent 8f721d6 commit e6938bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controller/relay-palm.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func palmStreamHandler(c *gin.Context, resp *http.Response) (*OpenAIErrorWithSta
fullTextResponse := streamResponsePaLM2OpenAI(&palmResponse)
fullTextResponse.Id = responseId
fullTextResponse.Created = createdTime
if len(palmResponse.Candidates) > 0 {
responseText = palmResponse.Candidates[0].Content
}
jsonResponse, err := json.Marshal(fullTextResponse)
if err != nil {
common.SysError("error marshalling stream response: " + err.Error())
Expand Down

0 comments on commit e6938bd

Please sign in to comment.