Spaces:
Sleeping
Sleeping
# ai_agnet_realestate.py | |
def process_user_input(user_input, chat_history, retriever=None): | |
""" | |
Processes the user's input and generates a response. | |
""" | |
if retriever: | |
context = retriever.retrieve(user_input) | |
response = f"π Based on documents: {context} \n\nπ€ Answer: This is a sample answer for '{user_input}'" | |
else: | |
response = f"π€ This is a default answer for '{user_input}'" | |
return response | |