"server/vscode:/vscode.git/clone" did not exist on "f91e9d282d73e09cdb876924412f2ed66212d736"
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 {
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)
......
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