From 7e048e49f6bc6de4da05f3f274f504789d91ff96 Mon Sep 17 00:00:00 2001 From: marcus-ny Date: Wed, 25 Sep 2024 04:11:37 +0800 Subject: [PATCH] feat: add endpoint for gp question point gen --- backend/src/user_questions/router.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/user_questions/router.py b/backend/src/user_questions/router.py index 097e1fc5..5ea9e994 100644 --- a/backend/src/user_questions/router.py +++ b/backend/src/user_questions/router.py @@ -10,6 +10,7 @@ from src.notes.models import Note from src.user_questions.models import Answer, Point, UserQuestion from src.user_questions.schemas import CreateUserQuestion, UserQuestionMiniDTO +from src.lm.generate_points import get_relevant_analyses router = APIRouter(prefix="/user-questions", tags=["user-questions"]) @@ -91,3 +92,8 @@ def create_user_question( session.commit() session.refresh(user_question) return user_question + + +@router.get("/ask-gp-question") +def ask_gp_question(question: str): + return get_relevant_analyses(question)