zenaight commited on
Commit ·
582cc74
1
Parent(s): 62054ce
Update transaction_type normalization in extract_and_update_intent function
Browse files- Changed the normalization guideline for the transaction_type field from 'buy' to 'sale' to better reflect terminology consistency.
- This update enhances the clarity of intent handling related to transaction types, ensuring more accurate user interactions.
- ai_chat.py +1 -1
ai_chat.py
CHANGED
|
@@ -256,7 +256,7 @@ async def extract_and_update_intent(state):
|
|
| 256 |
- If adding: Include both existing and new items in the array
|
| 257 |
- If changing: Replace with new requirements
|
| 258 |
- If clarifying: Update with more specific versions
|
| 259 |
-
3. For transaction_type field: Normalize to either 'lease' or '
|
| 260 |
- 'rent', 'rental', 'lease', 'leasing', 'to rent' → 'rent'
|
| 261 |
- 'buy', 'purchase', 'buying', 'sale', 'for sale', 'to buy' → 'buy'
|
| 262 |
4. If the user is asking a definition or clarification (e.g. 'What does square metre mean?'), answer that question fully and do not update the intent.
|
|
|
|
| 256 |
- If adding: Include both existing and new items in the array
|
| 257 |
- If changing: Replace with new requirements
|
| 258 |
- If clarifying: Update with more specific versions
|
| 259 |
+
3. For transaction_type field: Normalize to either 'lease' or 'sale':
|
| 260 |
- 'rent', 'rental', 'lease', 'leasing', 'to rent' → 'rent'
|
| 261 |
- 'buy', 'purchase', 'buying', 'sale', 'for sale', 'to buy' → 'buy'
|
| 262 |
4. If the user is asking a definition or clarification (e.g. 'What does square metre mean?'), answer that question fully and do not update the intent.
|