Spaces:
Sleeping
Sleeping
Commit ·
67f3250
1
Parent(s): 0c3749b
debug
Browse files
app.py
CHANGED
|
@@ -120,11 +120,9 @@ def answer(question: str, user_id="demo", history="None"):
|
|
| 120 |
elif history == "All":
|
| 121 |
store = kb[user_id]
|
| 122 |
context = "\n".join(store["texts"])
|
| 123 |
-
|
| 124 |
-
print(f"history: {history}\ncontext: {context}")
|
| 125 |
|
| 126 |
# 2. Build a Qwen-chat prompt (helper defined earlier)
|
| 127 |
-
prompt = build_qwen_prompt(context, question)
|
| 128 |
|
| 129 |
# 3. Generate and strip everything before the assistant tag
|
| 130 |
load_chat()
|
|
|
|
| 120 |
elif history == "All":
|
| 121 |
store = kb[user_id]
|
| 122 |
context = "\n".join(store["texts"])
|
|
|
|
|
|
|
| 123 |
|
| 124 |
# 2. Build a Qwen-chat prompt (helper defined earlier)
|
| 125 |
+
prompt = build_qwen_prompt(history + context, question)
|
| 126 |
|
| 127 |
# 3. Generate and strip everything before the assistant tag
|
| 128 |
load_chat()
|