Spaces:
Sleeping
Sleeping
cdupland
commited on
Commit
·
59af68e
1
Parent(s):
ae06536
Add log for retrieved chunks
Browse files
rag.py
CHANGED
|
@@ -123,6 +123,8 @@ def get_retreive_answer(enterprise_id,prompt,index,common_id):
|
|
| 123 |
|
| 124 |
if enterprise_context:
|
| 125 |
print("found enterprise context")
|
|
|
|
|
|
|
| 126 |
else:
|
| 127 |
print("no enterprise context")
|
| 128 |
|
|
@@ -135,6 +137,10 @@ def get_retreive_answer(enterprise_id,prompt,index,common_id):
|
|
| 135 |
)
|
| 136 |
|
| 137 |
commun_context = retriever_commun.invoke(prompt)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
if commun_context:
|
| 139 |
print("found commun context")
|
| 140 |
else:
|
|
|
|
| 123 |
|
| 124 |
if enterprise_context:
|
| 125 |
print("found enterprise context")
|
| 126 |
+
for chunk in enterprise_context:
|
| 127 |
+
print(chunk.metadata)
|
| 128 |
else:
|
| 129 |
print("no enterprise context")
|
| 130 |
|
|
|
|
| 137 |
)
|
| 138 |
|
| 139 |
commun_context = retriever_commun.invoke(prompt)
|
| 140 |
+
|
| 141 |
+
for chunk in commun_context:
|
| 142 |
+
print(chunk.metadata)
|
| 143 |
+
|
| 144 |
if commun_context:
|
| 145 |
print("found commun context")
|
| 146 |
else:
|