Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -67,12 +67,14 @@ def respond(
|
|
67 |
# Retrieve context (CPU operation)
|
68 |
docs = db.similarity_search(message, k=2)
|
69 |
context = "\n".join([doc.page_content for doc in docs])
|
|
|
70 |
|
71 |
# Format prompt
|
72 |
formatted_prompt = prompt_template.format(
|
73 |
context=context,
|
74 |
question=message
|
75 |
)
|
|
|
76 |
|
77 |
# Stream response (GPU operation)
|
78 |
response = ""
|
|
|
67 |
# Retrieve context (CPU operation)
|
68 |
docs = db.similarity_search(message, k=2)
|
69 |
context = "\n".join([doc.page_content for doc in docs])
|
70 |
+
print(f"Retrieved context: {context[:200]}...")
|
71 |
|
72 |
# Format prompt
|
73 |
formatted_prompt = prompt_template.format(
|
74 |
context=context,
|
75 |
question=message
|
76 |
)
|
77 |
+
print(f"Full prompt: {formatted_prompt}")
|
78 |
|
79 |
# Stream response (GPU operation)
|
80 |
response = ""
|