realestateagent / ai_agnet_realestate.py
tarek29910's picture
Upload 3 files
4b19884 verified
raw
history blame contribute delete
455 Bytes
# 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