Skip to content

Commit

Permalink
fix(llm): functions not correctly called
Browse files Browse the repository at this point in the history
  • Loading branch information
creeper12356 committed Sep 24, 2024
1 parent b70b583 commit c345dae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func registerRouter(r *gin.Engine) {

llmGroup := needAuthGroup.Group(("/llm"))
llmGroup.GET("/review/opt", handler.OptCourseReviewHandler)
llmGroup.GET("/course/summary/:courseID", handler.GetCourseDetailHandler)
llmGroup.GET("/course/summary/:courseID", handler.GetCourseSummaryHandler)
llmGroup.GET("/vectorize/:courseID", handler.VectorizeCourseReviewsHandler)
llmGroup.GET("/match", handler.GetMatchCoursesHandler)
}
6 changes: 3 additions & 3 deletions service/llm.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func OptCourseReview(courseName string, reviewContent string) (dto.OptCourseRevi

func GetCourseSummary(ctx context.Context, courseID int64) (*dto.GetCourseSummaryResponse, error) {
courseQuery := repository.NewCourseQuery(dal.GetDBClient())
coursePOs, err := courseQuery.GetCourse(ctx, repository.WithCourseID(courseID))
coursePOs, err := courseQuery.GetCourse(ctx, repository.WithID(courseID))
if err != nil || len(coursePOs) == 0 {
return nil, err
}
Expand Down Expand Up @@ -120,7 +120,7 @@ func GetCourseSummary(ctx context.Context, courseID int64) (*dto.GetCourseSummar

func VectorizeCourseReviews(ctx context.Context, courseID int64) error {
courseQuery := repository.NewCourseQuery(dal.GetDBClient())
coursePOs, err := courseQuery.GetCourse(ctx, repository.WithCourseID(courseID))
coursePOs, err := courseQuery.GetCourse(ctx, repository.WithID(courseID))
if err != nil || len(coursePOs) == 0 {
return err
}
Expand Down Expand Up @@ -204,7 +204,7 @@ func GetMatchCourses(ctx context.Context, description string) ([]model.CourseSum

query := repository.NewCourseQuery(dal.GetDBClient())

coursePOs, err := query.GetCourse(ctx, repository.WithCourseIDs(courseIDs))
coursePOs, err := query.GetCourse(ctx, repository.WithIDs(courseIDs))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c345dae

Please sign in to comment.