Skip to content

Commit df0a44b

Browse files
authored
修复 LLMRequest Prompt 使用错误接收器的BUG (#323)
1 parent 6e4b579 commit df0a44b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

internal/ai/internal/domain/llm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type LLMRequest struct {
2323
prompt string
2424
}
2525

26-
func (req LLMRequest) Prompt() string {
26+
func (req *LLMRequest) Prompt() string {
2727
if req.prompt == "" {
2828
args := slice.Map(req.Input, func(idx int, src string) any {
2929
return src

internal/question/internal/web/examine_handler.go

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ func NewExamineHandler(svc service.ExamineService) *ExamineHandler {
3737

3838
func (h *ExamineHandler) MemberRoutes(server *gin.Engine) {
3939
g := server.Group("/question/examine")
40+
// 暂时保留一年,因为后期 AI 的变化难以预测
4041
g.POST("", ginx.BS(h.Examine))
4142
// 觉得 AI 的评价不准确,那么可以调用这个接口来修正,这是直接暴露给用户使用的
4243
g.POST("/correct", ginx.BS[CorrectReq](h.Correct))

0 commit comments

Comments
 (0)