|
@@ -131,10 +131,10 @@ class R2RFileService(OSSFileService):
|
|
|
# file_key = doc.metadata.file_key
|
|
|
# file_key = doc.metadata.title if file_key is None else file_key
|
|
|
text = doc.text
|
|
|
- if files["text"]:
|
|
|
+ if "text" not in files:
|
|
|
files["text"] += f"\n\n{text}"
|
|
|
else:
|
|
|
- files["text"] = doc.text
|
|
|
+ files["text"] = text
|
|
|
|
|
|
return files
|
|
|
|
|
@@ -189,10 +189,10 @@ class R2RFileService(OSSFileService):
|
|
|
# file_key = doc.metadata.file_key
|
|
|
# file_key = doc.metadata.title if file_key is None else file_key
|
|
|
text = doc.text
|
|
|
- if files["text"]:
|
|
|
+ if "text" not in files:
|
|
|
files["text"] += f"\n\n{text}"
|
|
|
else:
|
|
|
- files["text"] = doc.text
|
|
|
+ files["text"] = text
|
|
|
|
|
|
return files
|
|
|
return {}
|