Spaces:
Running
on
Zero
Running
on
Zero
printing retrieved documents to see what the model is picking
Browse files
app.py
CHANGED
@@ -66,6 +66,7 @@ def format_prompt(prompt,retrieved_documents,k):
|
|
66 |
def talk(prompt,history):
|
67 |
k = 1 # number of retrieved documents
|
68 |
scores , retrieved_documents = search(prompt, k)
|
|
|
69 |
formatted_prompt = format_prompt(prompt,retrieved_documents,k)
|
70 |
formatted_prompt = formatted_prompt[:2000] # to avoid GPU OOM
|
71 |
messages = [{"role":"system","content":SYS_PROMPT},{"role":"user","content":formatted_prompt}]
|
|
|
66 |
def talk(prompt,history):
|
67 |
k = 1 # number of retrieved documents
|
68 |
scores , retrieved_documents = search(prompt, k)
|
69 |
+
print(retrieved_documents)
|
70 |
formatted_prompt = format_prompt(prompt,retrieved_documents,k)
|
71 |
formatted_prompt = formatted_prompt[:2000] # to avoid GPU OOM
|
72 |
messages = [{"role":"system","content":SYS_PROMPT},{"role":"user","content":formatted_prompt}]
|