update generate response
This commit is contained in:
parent
2c80eddd71
commit
dd960d1d5e
2 changed files with 2 additions and 14 deletions
|
@ -36,11 +36,3 @@ type GenerateRequest struct {
|
|||
type GenerateResponse struct {
|
||||
Response string `json:"response"`
|
||||
}
|
||||
|
||||
type TokenResponse struct {
|
||||
Choices []TokenResponseChoice `json:"choices"`
|
||||
}
|
||||
|
||||
type TokenResponseChoice struct {
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
|
|
@ -78,12 +78,8 @@ func generate(c *gin.Context) {
|
|||
return false
|
||||
}
|
||||
|
||||
resp := api.TokenResponse{
|
||||
Choices: []api.TokenResponseChoice{
|
||||
{
|
||||
Text: token,
|
||||
},
|
||||
},
|
||||
resp := api.GenerateResponse{
|
||||
Response: token,
|
||||
}
|
||||
|
||||
bts, err := json.Marshal(resp)
|
||||
|
|
Loading…
Reference in a new issue