Parcourir la source

unify moderation and annotation's response behavior in message log of chatflow app with other types of app (#14800)

tags/1.0.1
Qun il y a 8 mois
Parent
révision
f0fb38fed4
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 9 ajouts et 0 suppressions
  1. 9
    0
      api/core/app/apps/advanced_chat/generate_task_pipeline.py

+ 9
- 0
api/core/app/apps/advanced_chat/generate_task_pipeline.py Voir le fichier

session.commit() session.commit()


yield workflow_finish_resp yield workflow_finish_resp
elif event.stopped_by in (
QueueStopEvent.StopBy.INPUT_MODERATION,
QueueStopEvent.StopBy.ANNOTATION_REPLY,
):
# When hitting input-moderation or annotation-reply, the workflow will not start
with Session(db.engine, expire_on_commit=False) as session:
# Save message
self._save_message(session=session)
session.commit()


yield self._message_end_to_stream_response() yield self._message_end_to_stream_response()
break break

Chargement…
Annuler
Enregistrer