Skip to content

Commit

Permalink
add lecture chat path to pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
isabellagessl authored and sebastianloose committed Nov 11, 2024
1 parent 326de7e commit fa72a17
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions app/web/routers/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
CourseChatPipelineExecutionDTO,
CompetencyExtractionPipelineExecutionDTO,
)
from app.domain.chat.lecture_chat.lecture_chat_pipeline_execution_dto import LectureChatPipelineExecutionDTO
from app.web.status.status_update import (
ExerciseChatStatusCallback,
CourseChatStatusCallback,
Expand Down Expand Up @@ -132,6 +133,16 @@ def run_text_exercise_chat_pipeline(
thread = Thread(target=run_text_exercise_chat_pipeline_worker, args=(dto, variant))
thread.start()

@router.post(
"/lecture-chat/{variant}/run",
status_code=status.HTTP_202_ACCEPTED,
dependencies=[Depends(TokenValidator())],
)
def run_lecture_chat_pipeline(
variant: str, dto: LectureChatPipelineExecutionDTO
):
thread = Thread(target=run_lecture_chat_pipeline, args=(dto, variant))
thread.start()

def run_competency_extraction_pipeline_worker(
dto: CompetencyExtractionPipelineExecutionDTO, _variant: str
Expand Down Expand Up @@ -225,5 +236,13 @@ def get_pipeline(feature: str):
description="Default lecture ingestion variant.",
)
]
case "LECTURE_CHAT":
return [
FeatureDTO(
id="default",
name="Default Variant",
description="Default lecture chat variant.",
)
]
case _:
return Response(status_code=status.HTTP_400_BAD_REQUEST)

0 comments on commit fa72a17

Please sign in to comment.