fix annotation reply (#2127)

Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
Jyong 2024-01-22 17:39:19 +08:00 committed by GitHub
parent 0f5d4fd11b
commit 741079f317
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -493,6 +493,10 @@ class GenerateTaskPipeline:
'score': resource['score'],
'content': resource['content'],
})
# show annotation reply
if 'annotation_reply' in self._task_state.metadata:
if self._application_generate_entity.invoke_from in [InvokeFrom.DEBUGGER, InvokeFrom.SERVICE_API]:
metadata['annotation_reply'] = self._task_state.metadata['annotation_reply']
# show usage
if self._application_generate_entity.invoke_from in [InvokeFrom.DEBUGGER, InvokeFrom.SERVICE_API]: