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 {
|
type GenerateResponse struct {
|
||||||
Response string `json:"response"`
|
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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
resp := api.TokenResponse{
|
resp := api.GenerateResponse{
|
||||||
Choices: []api.TokenResponseChoice{
|
Response: token,
|
||||||
{
|
|
||||||
Text: token,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bts, err := json.Marshal(resp)
|
bts, err := json.Marshal(resp)
|
||||||
|
|
Loading…
Reference in a new issue