Skip to content

Commit

Permalink
skip suggestion gen if no output exists
Browse files Browse the repository at this point in the history
  • Loading branch information
bassner committed Jun 22, 2024
1 parent 1e007fa commit 835e342
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/pipeline/chat/course_chat_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,9 @@ def get_competency_list() -> list:
)
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",
Expand Down
3 changes: 3 additions & 0 deletions app/pipeline/chat/exercise_chat_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def __call__(self, dto: ExerciseChatPipelineExecutionDTO):
)
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",
Expand Down

0 comments on commit 835e342

Please sign in to comment.