Fix type exception when use office ppt database (#679)

Fix type exception when use office ppt database
This commit is contained in:
magic.chen
2023-10-19 11:19:38 +08:00
committed by GitHub

View File

@@ -92,7 +92,7 @@ class ChatKnowledge(BaseChat):
context = [d.page_content for d in docs]
context = context[: self.max_token]
relations = list(
set([os.path.basename(d.metadata.get("source", "")) for d in docs])
set([os.path.basename(str(d.metadata.get("source", ""))) for d in docs])
)
input_values = {
"context": context,