diff --git a/api/types.go b/api/types.go index de1dd107..d4eb63ad 100644 --- a/api/types.go +++ b/api/types.go @@ -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"` -} diff --git a/server/routes.go b/server/routes.go index 99c589fd..fdfc22ec 100644 --- a/server/routes.go +++ b/server/routes.go @@ -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)