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) { return &v1.QuestionRes{Data: model.Question.GetProblem(model.GetScenario(req.Href), 1, g.Config().MustGet(ctx, "chat.usuallyProblem", 5).Int())}, nil }