diff --git a/app/pipeline/chat/course_chat_pipeline.py b/app/pipeline/chat/course_chat_pipeline.py index a8969bc..31b5a8c 100644 --- a/app/pipeline/chat/course_chat_pipeline.py +++ b/app/pipeline/chat/course_chat_pipeline.py @@ -434,17 +434,18 @@ def lecture_content_retrieval() -> str: self.callback.done("Response created", final_result=out, tokens=self.tokens) # try: - # # if out: - # # suggestion_dto = InteractionSuggestionPipelineExecutionDTO() - # # suggestion_dto.chat_history = dto.chat_history - # # suggestion_dto.last_message = out - # # suggestions = self.suggestion_pipeline(suggestion_dto) - # # self.callback.done(final_result=None, suggestions=suggestions) - # # else: - # # # This should never happen but whatever - # # self.callback.skip( - # # "Skipping suggestion generation as no output was generated." - # # ) + # self.callback.skip("Skipping suggestion generation.") + # if out: + # suggestion_dto = InteractionSuggestionPipelineExecutionDTO() + # suggestion_dto.chat_history = dto.chat_history + # suggestion_dto.last_message = out + # suggestions = self.suggestion_pipeline(suggestion_dto) + # self.callback.done(final_result=None, suggestions=suggestions) + # else: + # # This should never happen but whatever + # self.callback.skip( + # "Skipping suggestion generation as no output was generated." + # ) # except Exception as e: # logger.error( # "An error occurred while running the course chat interaction suggestion pipeline", diff --git a/app/web/status/status_update.py b/app/web/status/status_update.py index 874c588..39ea350 100644 --- a/app/web/status/status_update.py +++ b/app/web/status/status_update.py @@ -125,6 +125,9 @@ def done( if start_next_stage: self.stage.state = StageStateEnum.IN_PROGRESS self.on_status_update() + self.status.result = None + if hasattr(self.status, "suggestions"): + self.status.suggestions = None def error( self, message: str, exception=None, tokens: Optional[List[TokenUsageDTO]] = None