Skip to content

Commit

Permalink
Merge branch 'feat/workflow-backend' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
takatost committed Mar 17, 2024
2 parents e46381a + a2b3096 commit 4cffcc0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions api/core/app/apps/advanced_chat/generate_task_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,22 @@ def _process_blocking_response(self) -> ChatbotAppBlockingResponse:
self._save_message()

return self._to_blocking_response()
elif isinstance(event, QueueTextChunkEvent):
delta_text = event.text
if delta_text is None:
continue

if not self._is_stream_out_support(
event=event
):
continue

# handle output moderation chunk
should_direct_answer = self._handle_output_moderation_chunk(delta_text)
if should_direct_answer:
continue

self._task_state.answer += delta_text
else:
continue

Expand Down

0 comments on commit 4cffcc0

Please sign in to comment.