Commit dd960d1d authored by Michael Yang's avatar Michael Yang Committed by Jeffrey Morgan
Browse files

update generate response

parent 2c80eddd
...@@ -36,11 +36,3 @@ type GenerateRequest struct { ...@@ -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) { ...@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment