Goodnight7 commited on
Commit
0807479
·
verified ·
1 Parent(s): c69e60a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -68,14 +68,14 @@ if prompt :
68
  message_placeholder.markdown(full_response)
69
  if used_docs :
70
  docs_content = "\n\n".join(
71
- [
72
- f"Doc {i+1}:\n"
73
- f"Source: {doc.metadata['source']}\n"
74
- f"Title: {doc.metadata['title']}\n"
75
- f"Content: {doc.page_content}\n"
76
- for i, doc in enumerate(used_docs)
77
- ]
78
- )
79
 
80
 
81
 
 
68
  message_placeholder.markdown(full_response)
69
  if used_docs :
70
  docs_content = "\n\n".join(
71
+ [
72
+ f"Doc {i + 1}:\n"
73
+ f"Source: {doc.metadata.get('source', 'N/A')}\n"
74
+ f"Title: {doc.metadata.get('title', 'N/A')}\n"
75
+ f"Content: {doc.page_content}\n"
76
+ for i, doc in enumerate(used_docs)
77
+ ]
78
+ )
79
 
80
 
81