Skip to content

Commit

Permalink
Rather call done twice instead of skip, as it produces empty results …
Browse files Browse the repository at this point in the history
…sometimes otherwise
  • Loading branch information
wasnertobias committed Jan 17, 2025
1 parent 274f640 commit cdc0430
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/pipeline/chat_gpt_wrapper_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ def __call__(
)

response = (prompt | self.pipeline).invoke({})
self.callback.done()
self.callback.done(final_result=response)
self.callback.skip("Skipping suggestion generation as no output was generated.")
6 changes: 3 additions & 3 deletions app/web/routers/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ def run_exercise_chat_pipeline(
description="Exercise Chat Pipeline Execution DTO"
),
):
if variant == "default":
if variant == "chat-gpt-wrapper":
thread = Thread(target=run_chatgpt_wrapper_pipeline_worker, args=(dto, variant))
else:
thread = Thread(
target=run_exercise_chat_pipeline_worker, args=(dto, variant, event)
)
else:
thread = Thread(target=run_chatgpt_wrapper_pipeline_worker, args=(dto, variant))
thread.start()


Expand Down

0 comments on commit cdc0430

Please sign in to comment.