mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-11-30 02:08:37 +08:00
fix: Assignment exception (#8663)
Co-authored-by: fum <fum@investoday.com.cn>
This commit is contained in:
parent
3618a97c20
commit
4c7beb9d7b
@ -75,10 +75,10 @@ class AppGenerateResponseConverter(ABC):
|
||||
:return:
|
||||
"""
|
||||
# show_retrieve_source
|
||||
updated_resources = []
|
||||
if "retriever_resources" in metadata:
|
||||
metadata["retriever_resources"] = []
|
||||
for resource in metadata["retriever_resources"]:
|
||||
metadata["retriever_resources"].append(
|
||||
updated_resources.append(
|
||||
{
|
||||
"segment_id": resource["segment_id"],
|
||||
"position": resource["position"],
|
||||
@ -87,6 +87,7 @@ class AppGenerateResponseConverter(ABC):
|
||||
"content": resource["content"],
|
||||
}
|
||||
)
|
||||
metadata["retriever_resources"] = updated_resources
|
||||
|
||||
# show annotation reply
|
||||
if "annotation_reply" in metadata:
|
||||
|
Loading…
Reference in New Issue
Block a user