fix: Assignment exception (#8663)

Co-authored-by: fum <fum@investoday.com.cn>
pull/8682/head^2
haike-1213 2 years ago committed by GitHub
parent 3618a97c20
commit 4c7beb9d7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save