Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -786,9 +786,6 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
|
|
786 |
|
787 |
completion = chain.invoke({"question":prompt})
|
788 |
|
789 |
-
print("completion text from invoke on line 787")
|
790 |
-
#print(completion[3][1])
|
791 |
-
#print(completion[3][3])
|
792 |
|
793 |
|
794 |
|
@@ -803,12 +800,12 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
|
|
803 |
print("completion text")
|
804 |
|
805 |
for document in completion['content']['source_documents']:
|
806 |
-
#
|
807 |
-
|
808 |
metadata = document.metadata # Use dot notation to access an attribute
|
809 |
print("Metadata:", metadata)
|
810 |
-
|
811 |
-
|
812 |
|
813 |
|
814 |
|
|
|
786 |
|
787 |
completion = chain.invoke({"question":prompt})
|
788 |
|
|
|
|
|
|
|
789 |
|
790 |
|
791 |
|
|
|
800 |
print("completion text")
|
801 |
|
802 |
for document in completion['content']['source_documents']:
|
803 |
+
page_content = document.page_content # Use dot notation to access an attribute
|
804 |
+
print("Page_content:", page_content)
|
805 |
metadata = document.metadata # Use dot notation to access an attribute
|
806 |
print("Metadata:", metadata)
|
807 |
+
similarity_score = document.query_similarity_score # Use dot notation to access an attribute
|
808 |
+
print("Similarity_score:", similarity_score)
|
809 |
|
810 |
|
811 |
|