package controller import ( v1 "aiChat/api/v1" "aiChat/internal/model" "context" "github.com/gogf/gf/v2/frame/g" ) var ( GuessQuestion = cGuessQuestion{} ) type cGuessQuestion struct{} func (c *cGuessQuestion) Method(ctx context.Context, req *v1.GuessQuestionReq) (res *v1.QuestionRes, err error) { var list []string list, err = model.Question.GetGuessQuestion(ctx, g.Config().MustGet(ctx, "chat.usuallyProblem", 5).Int()) return &v1.QuestionRes{Data: list}, nil }