Spaces:
Runtime error
Runtime error
feat: implement chatbot engine for project idea and feature generation
Browse files
src/recommendation_engine/chatbot_engine.py
CHANGED
|
@@ -1231,6 +1231,10 @@ Choose what you want:
|
|
| 1231 |
|
| 1232 |
if is_question and "other" not in text_lower:
|
| 1233 |
# Answer conversational question directly via LLM
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1234 |
prompt = build_chat_prompt(state)
|
| 1235 |
full_prompt = (
|
| 1236 |
f"{prompt}\n\n"
|
|
|
|
| 1231 |
|
| 1232 |
if is_question and "other" not in text_lower:
|
| 1233 |
# Answer conversational question directly via LLM
|
| 1234 |
+
history_text = "\n".join(
|
| 1235 |
+
f"User: {h.get('user', '')}\nBot: {h.get('bot', '')}"
|
| 1236 |
+
for h in history[-3:]
|
| 1237 |
+
)
|
| 1238 |
prompt = build_chat_prompt(state)
|
| 1239 |
full_prompt = (
|
| 1240 |
f"{prompt}\n\n"
|