Commit Graph

2 Commits

Author SHA1 Message Date
Arsham Mirehvandi
d1569a301f Refactor treatment history handling and enhance product filtering logic
- Updated README.md to clarify the conditions for `last_applied_treatment` and its integration into the advice JSON structure.
- Refactored job.py to utilize a new `TreatmentHistory` class for managing treatment data, improving clarity and efficiency in treatment retrieval.
- Enhanced advice_context.py to conditionally include `last_applied_treatment` based on the treatment history, ensuring no redundant queries are made.
- Modified products.py to implement logic for excluding active ingredients based on the latest treatment's interval, refining the product prefiltering process.
- Updated vector.py to ensure the SQL allowlist is applied correctly, improving the efficiency of product searches.
- Added unit tests to validate the new treatment history functionality and product filtering logic.
2026-09-20 23:38:25 +02:00
Arsham Mirehvandi
253a6d853d Update product retrieval limits in README and vector search logic
- Adjusted the maximum number of recommended products from 6 to 4 in README.md to reflect changes in the product retrieval process.
- Modified vector.py to limit the number of products retrieved per query to 4 for single queries and 2 for multiple queries, ensuring better deduplication and efficiency in product searches.
2026-09-16 23:18:23 +02:00