Commit History
-
Merge branch 'main' of hf.co:spaces/Zenaight/PropAgent
zenaight45ae1af -
Refactor property selection logic and enhance user context analysis
zenaight- Removed the outdated check for existing properties in the `extract_and_search_properties` function to streamline property request handling. - Introduced a new mechanism in the `handle_image_request` function to analyze recent user messages for specific property selections, improving the AI's ability to respond to user preferences. - Updated the ordering of the query in `search_properties` to prioritize featured properties and price, enhancing search efficiency. - These changes aim to improve the responsiveness and accuracy of property selections based on user interactions, ultimately enhancing the overall user experience.f7aa5b7 -
Update main.py
Verified signature4401f4f -
Update Dockerfile
Verified signature0ea3bfe -
Update Dockerfile
Verified signature98e519f -
Update Dockerfile
Verified signature60fd5ed -
Enhance property handling and update server configuration
zenaight- Updated the `extract_and_search_properties` function to utilize existing properties in the state for specific classification requests, improving efficiency in handling user inquiries. - Removed outdated property selection logic from the `handle_image_request` function to streamline the code and enhance clarity. - Modified the server port in `main.py` from 7860 to 8000 to align with new configuration settings. - Updated the README to reflect the new server port and ensure accurate setup instructions for users. - These changes aim to improve the responsiveness and accuracy of property selections while providing clear guidance for application setup.0854d25 -
Update README to reflect server port change from 8000 to 7860
zenaight- Modified the README file to update the command for running the application, changing the server port to 7860 to align with recent configuration updates. - This change ensures that users have the correct instructions for launching the application with the new port settings.4f58a18 -
Update server port and enhance dependencies in requirements
zenaight- Changed the server port from 8000 to 7860 in the `main.py` file to accommodate new configuration settings. - Added `Pillow`, `requests`, and `aiofiles` to the `requirements.txt` file to support additional functionality and improve project capabilities. - These updates aim to ensure the application runs on the correct port and has the necessary libraries for enhanced performance and features.ef1eb82 -
Refactor property selection logic and enhance conversation context handling
zenaight- Removed the previous check for existing properties in the `extract_and_search_properties` function to streamline property request handling. - Introduced a new mechanism in the `handle_image_request` function to analyze recent user messages for specific property selections, improving the AI's ability to respond to user preferences. - Added debug statements to track user-selected options and property mentions, enhancing traceability during property inquiries. - These changes aim to improve the responsiveness and accuracy of property selections based on user interactions, ultimately enhancing the overall user experience.b7f1d5f -
Enhance property request handling and conversation context in AI chat
zenaight- Updated the `extract_and_search_properties` function to utilize existing properties in the state for specific classification requests, improving efficiency in handling user inquiries. - Enhanced the `handle_image_request` function to analyze recent conversation history for property mentions, allowing for more contextually relevant property selections when multiple options are available. - Added debug statements to track property mentions and selections, improving traceability and user experience during property inquiries. - These changes aim to streamline user interactions by leveraging existing data and conversation context, ensuring more accurate and responsive AI behavior.c62a5af -
Refactor intent extraction and flow control for improved user interaction
zenaight- Updated the `extract_and_update_intent` function to set the response directly in the state when prompting users for location during property searches, enhancing clarity and flow. - Modified the `should_continue` function to improve readability and debugging by explicitly checking for the presence of a response, ensuring better control over the conversation flow. - These changes aim to streamline user interactions by ensuring that location preferences are addressed effectively and that the decision-making process in the chat flow is more transparent.f692b71 -
Add conditional edges for chat flow control
zenaight- Introduced a `should_continue` function to determine whether to proceed to the next node based on the response state, enhancing the decision-making process in the chat flow. - Replaced direct edges with conditional edges for `intent_update`, `property_search`, and `exit_check`, allowing for more dynamic control of the conversation based on user responses. - These changes aim to improve the responsiveness and adaptability of the AI chat system, ensuring a smoother user experience by managing the flow of conversation more effectively.3fdf3b6 -
Enhance property inquiry handling in intent extraction
zenaight- Updated the `extract_and_update_intent` and `extract_and_search_properties` functions to prompt users for location when requesting property listings without a specified location, improving the AI's responsiveness and user experience. - Added debug statements to clarify the flow of intent processing related to property searches, ensuring better traceability. - These changes aim to streamline user interactions by ensuring that location preferences are addressed before proceeding with property searches.440c7f4 -
Enhance intent classification to include request_details
zenaight- Updated the classification logic in `extract_and_update_intent` and `extract_and_search_properties` to recognize "request_details" as a valid classification, allowing the system to handle specific property inquiries more effectively. - Expanded the documentation to clarify the intent classification options and provided examples for better user understanding. - These changes aim to improve the AI chat's responsiveness to user requests for detailed property information, enhancing overall user experience.11f5f36 -
Enhance classification handling in intent extraction and property search
zenaight- Updated the return structure of `extract_and_update_intent` and `extract_and_search_properties` to include the classification information, improving the context provided for subsequent processing. - Added debug print statements in `receive_message` to log the classification being processed, enhancing traceability during image request handling. - These changes aim to improve the clarity and responsiveness of the AI chat system by ensuring that classification data is consistently available and logged throughout the interaction flow.69d3b80 -
Add debug statements to handle_image_request for improved traceability
zenaight- Introduced additional debug print statements in the `handle_image_request` function to log the classification, properties count, property identifier, selected property, and images found. - These changes aim to enhance the debugging process by providing clearer insights into the image request handling flow, ultimately improving the maintainability and clarity of the code.f817f6b -
Refine intent classification and image request handling in AI chat
zenaight- Enhanced the `extract_and_update_intent` function to streamline the classification of user requests, allowing for more efficient handling of inquiries related to property listings, images, and addresses. - Updated the `handle_image_request` function to improve property selection based on user identifiers, ensuring that the AI can accurately respond to image requests with relevant property images. - Adjusted the `receive_message` function to correctly identify image requests, enhancing the system's responsiveness to user inquiries about images and photos. - These changes aim to improve user interaction by providing clearer and more accurate responses to property and image requests, ultimately enhancing the overall user experience.9900964 -
Enhance property data handling and intent classification in AI chat
zenaight- Updated the `chat_with_session_memory` function to include address data for AI use while ensuring it is not displayed in listings unless requested, improving user privacy and clarity. - Modified the intent classification logic to recognize requests for addresses, allowing the system to respond appropriately to user inquiries about property locations. - Adjusted the database schema in `supabase_setup.sql` to add an address field to the properties table and create an index for efficient querying, enhancing data organization and retrieval. - These changes aim to improve user interaction by providing more comprehensive responses regarding property details while maintaining privacy and clarity in communication.df9de2d -
Enhance image request handling and intent classification in AI chat
zenaight- Updated the `chat_with_session_memory` function to clarify the inclusion of property data without image URLs, improving user understanding of available information. - Modified the `extract_and_update_intent` function to recognize requests for images, allowing the system to handle both property and image inquiries more effectively. - Adjusted the `process_message` function to check for image requests based on user input, ensuring appropriate responses are generated when users ask for images or photos. - These changes aim to improve user interaction by providing clearer communication regarding available listings and enhancing the system's ability to respond to image requests.b418dc7 -
Implement image handling in AI chat and enhance WhatsApp messaging
zenaight- Introduced a new `handle_image_request` function to process user requests for property images, allowing the AI to respond with relevant image messages when triggered. - Updated the `process_message` function to return both the AI response and associated property details, facilitating image requests. - Enhanced the WhatsApp messaging functionality with a new `send_multiple_messages` function to handle sending both text and image messages, including delays to avoid rate limiting. - These changes aim to improve user interaction by providing a more comprehensive response to image requests while maintaining clarity in communication.a35f267 -
Refactor property search logic to support flexible ranges
zenaight- Updated the `search_properties` function to allow for flexible budget and size ranges, enabling searches within ±50% of the specified values. - Removed the must-have features from the database search, shifting the responsibility to the chat response logic for better user interaction. - Simplified the `extract_and_search_properties` function by eliminating multiple fallback passes, streamlining the property search process and improving response clarity. - These changes aim to enhance the user experience by providing more relevant property listings while maintaining clear communication regarding search results.729c393 -
Enhance intent classification and debugging in AI chat
zenaight- Added debug print statements in `extract_and_update_intent` to log missing intent fields and the classification check, improving traceability during intent processing. - Updated the return structure of `extract_and_update_intent` to include the classification result, enhancing the information provided for subsequent processing. - These changes aim to refine the intent extraction logic and provide better insights into the classification process, ultimately improving user interactions.e2c07e6 -
Enhance intent extraction logic to handle property inquiries
zenaight- Added a classification check in `extract_and_update_intent` to determine if the user is asking for property listings, allowing the system to skip preference questions when appropriate. - Updated the state graph to reorder the processing flow, ensuring intent classification occurs before intent extraction, improving the overall logic and efficiency of user interactions. - These changes aim to refine the user experience by providing more relevant responses based on user intent, while maintaining clarity in the conversation flow.b92bfbc -
Add debug statements to persona and intent extraction functions
zenaight- Introduced debug print statements in `extract_and_update_persona`, `extract_and_update_intent`, and `classify_user_intent` to log the start of processing and responses generated, enhancing traceability during execution. - Updated `extract_and_search_properties` to include a debug statement for classification checks, improving visibility into the property search process. - These changes aim to facilitate debugging and provide better insights into the state of the application during user interactions.0e649c6 -
Enhance intent extraction and debugging in AI chat
zenaight- Updated the normalization instructions for abbreviations and common terms to improve clarity and user understanding. - Added debug print statements to log intent extraction results, errors, and classification checks, enhancing traceability during the intent processing. - Refined the property search logic to utilize the extracted classification more effectively, ensuring that searches are only conducted when appropriate.0d86ec7 -
Refactor AI chat property handling and intent classification
zenaight- Streamlined the `chat_with_session_memory` function to enhance the system message with available property details and search status, improving user interaction. - Introduced a new `classify_user_intent` function to determine user intent regarding property searches, ensuring that property searches are only initiated when relevant. - Updated the database schema in `supabase_setup.sql` to include new tables for user personas and intents, along with properties, enhancing data organization and retrieval. - Added triggers for automatic timestamp updates on user personas, intents, and properties, ensuring data integrity and accuracy. - Included sample property data for testing purposes, facilitating easier development and validation of property-related functionalities.2860609
-
Enhance property search and response logic in AI chat
zenaight- Updated the conditions in `chat_with_session_memory` to prevent direct summary responses for simple greetings, ensuring more relevant interactions. - Introduced checks in `extract_and_search_properties` to only initiate property searches when the user explicitly asks for them, improving the clarity of responses and user experience. - Added debug logging for user messages to aid in tracing user intent during property searches.54bbcba -
Refine direct summary trigger logic in chat_with_session_memory
zenaight- Updated the conditions for triggering a direct summary response to only activate for general area searches, enhancing the relevance of responses to user queries. - This change aims to improve user experience by ensuring that specific requests do not inadvertently prompt a summary, thereby providing clearer and more contextually appropriate information.1e1a0a5 -
Add direct summary response for property listings in chat_with_session_memory
zenaight- Implemented logic to provide a direct summary of property listings when the user queries for available options, enhancing user interaction and experience. - The summary includes key property details such as title, location, size, and price, along with links to listings, improving the clarity of responses. - Updated the response structure to ensure users receive relevant information promptly when specific triggers are detected in their queries.2d19bd0 -
Enhance debugging and property search logic in AI chat
zenaight- Added debug print statements in `chat_with_session_memory` and `extract_and_search_properties` to log the number of properties found, specific property details, and search filters applied, improving traceability during the property search process. - Implemented logic to clear restrictive filters for general area searches, enhancing the flexibility of property recommendations based on user intent. - Refined the property search query in `search_properties` to prioritize city matches before falling back to location searches, optimizing the search process and improving user experience.22f2680 -
Add end chat detection functionality in AI chat
zenaight- Introduced a new asynchronous function `detect_end_chat` to identify user intent to end the chat session based on specific phrases. - Integrated this function into the chat state graph, allowing for a graceful termination of the session with a user-friendly response. - This enhancement aims to improve user experience by providing clear communication when the chat session is concluded.9dfa030 -
Add debug print statement for property listing URLs in chat_with_session_memory
zenaight- Introduced a print statement to log the property listing URLs being processed, enhancing traceability during the property listing generation. - This addition aims to facilitate debugging and provide better insights into the state of the application, following previous enhancements in logging for improved user experience.c452b29 -
Refactor property listing summary in chat_with_session_memory
zenaight- Introduced a direct summary response for property listings, bypassing the LLM when properties are available, to enhance user experience. - Consolidated the logic for building the response text, including search status and property details, improving readability and maintainability. - Removed redundant code related to listing details in the system message, ensuring clarity in the response structure. - Updated instructions for handling unavailable property details to improve user communication.383dff9 -
Update AI chat functionality to improve property recommendation responses
zenaight- Modified the system message in `chat_with_session_memory` to allow sharing of listing URLs and additional property details, enhancing user interaction. - Added a `search_status_message` to provide context on search results and fallback responses when specific property details are unavailable. - Removed debug print statements from various functions to streamline the code and improve readability, ensuring a cleaner implementation. - Enhanced the property search logic to return relevant status messages, improving communication with users when exact matches are not found.42bd84b -
Add debug logging in chat_with_session_memory for property details
zenaight- Introduced debug print statements in `chat_with_session_memory` to log the number of properties, the first property details, and the property URLs being processed. - These enhancements aim to improve traceability and facilitate debugging during the property listing generation process, ensuring better insights into the state of the application.217b7cf -
Enhance AI chat functionality with property details retrieval
zenaight- Added logic in `chat_with_session_memory` to respond to user queries about images, features, floorplans, and video tours based on the provided properties. - Implemented fallback responses for each property detail type to ensure clear communication when specific information is unavailable. - Updated the system message to inform users about available options for additional property details, improving user interaction and experience.fcb25fc -
Refine property search logic and enhance fallback responses
zenaight- Updated the `extract_and_search_properties` function to improve the property search process by implementing a multi-pass filtering strategy, allowing for more flexible search results based on user preferences. - Enhanced fallback responses to provide clearer communication when no properties match the user's criteria, including suggestions for broader searches and notifications for future availability. - Improved logging to track the filtering process and the state of the search, aiding in debugging and user experience.b77c962 -
Enhance logging in property search functionality
zenaight- Added logging statements in `search_properties` to provide insights into the number of properties in the database, search filters applied, and results obtained. - Improved traceability by logging the execution flow, including city and location filter attempts, budget and size constraints, and must-have features during the property search process.2f6ba3c -
Enhance logging in property search functions
zenaight- Added detailed logging statements in `extract_and_search_properties` and `search_properties` to improve traceability of the property search process. - Included logs for intent data, search filters, and query execution results to facilitate debugging and provide better insights into the search operations.d3f2812 -
Refine property search query ordering in database
zenaight- Updated the property search query in `search_properties` to remove the `desc` parameter for price ordering, aligning with best practices and improving clarity in the query structure.cfb0b1f -
Refine property search query ordering in database
zenaight- Updated the property search query in `search_properties` to use `desc=True` for ordering featured properties, enhancing clarity and aligning with best practices for query construction.7afea51 -
Enhance AI chat responses and database query ordering
zenaight- Updated the system message in `chat_with_session_memory` to emphasize that property recommendations should be based solely on the internal database, avoiding external websites. - Refined the fallback response in `extract_and_search_properties` to suggest broadening the search to nearby areas instead of specific locations. - Modified the property search query in `search_properties` to use `ascending=False` for clarity in ordering featured properties, aligning with best practices.2df7373 -
propety search
zenaightab1535a -
Enhance intent extraction logic in AI chat
zenaight- Updated the `extract_and_update_intent` function to provide clearer instructions for handling the "must_have" field, specifying how to manage additions, changes, and clarifications of requirements. - Improved logging to reflect the LLM's decision-making process regarding the "must_have" field, enhancing traceability during intent updates. - Added detailed context for the current intent state, improving the clarity of intent extraction and user interaction.ba64859 -
Enhance intent field handling in AI chat
zenaight- Updated the `extract_and_update_intent` function to handle the "must_have" field as an array, converting string inputs into an appropriate array format for database storage. - Improved logging to provide clarity on the conversion process and intent updates, ensuring better traceability during intent management. - Refactored the `send_whatsapp_message` function to utilize an asynchronous HTTP client for sending messages, enhancing performance and reliability in message delivery.aca24f6 -
Refactor intent extraction logic in AI chat
zenaight- Moved the check for non-JSON responses to after content cleanup in the `extract_and_update_intent` function, improving clarity and ensuring that the response is properly processed before validation. - Enhanced logging for non-JSON responses to aid in debugging and provide better context for the user experience.a204bcd -
debuggig
zenaight3de6228 -
debugging
zenaight45c2c48 -
Enhance intent extraction and update logging in AI chat
zenaight- Added detailed logging for LLM responses and intent field updates in the `extract_and_update_intent` function to improve traceability and debugging. - Implemented content cleanup for JSON responses to handle markdown formatting, ensuring robust parsing of intent data. - Updated the `update_user_intent` function to include checks for session validity and added logging for successful updates and errors, enhancing error handling and user intent management.2169ed9