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
commit b185a61cbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ class ChatKnowledge(BaseChat):
context = [d.page_content for d in docs] context = [d.page_content for d in docs]
context = context[: self.max_token] context = context[: self.max_token]
relations = list( 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 = { input_values = {
"context": context, "context": context,