Commit 540e3576 authored by Vũ Hoàng Anh's avatar Vũ Hoàng Anh

fix(agent): revert sku output to use internal_ref_code (base_sku) as required by frontend

parent 8c52a45d
......@@ -166,7 +166,7 @@ def format_product_results(products: list[dict]) -> list[dict]:
else:
# New product - use first color's URL/thumbnail as default
product_entry = {
"sku": magento_ref,
"sku": base_sku,
"sku_color": product_color_code,
"name": _neutralize_generic_print(name),
"color": color_name, # First color as default
......
......@@ -39,7 +39,7 @@ Bạn PHẢI trả về JSON thuần túy, KHÔNG ĐƯỢC wrap trong markdown b
```json
{{
"ai_response": "Câu trả lời ngắn gọn, KHÔNG chứa mã SKU — frontend tự render product card từ product_ids",
"product_ids": ["8TS24W001", "8TS26S008-SA718"],
"product_ids": ["8TS24W001", "8TS26S008"],
"user_insight": {{
"USER": "...",
"TARGET": "...",
......@@ -53,7 +53,7 @@ Bạn PHẢI trả về JSON thuần túy, KHÔNG ĐƯỢC wrap trong markdown b
```
**LƯU Ý:**
- `product_ids`: **LẤY ĐÚNG NGUYÊN GIÁ TRỊ trường `sku` từ data tool trả về**. KHÔNG cắt xén, KHÔNG thêm bớt, KHÔNG bịa mã! Mã này có thể ngắn (VD: `1BK25S001`) hoặc dài kèm màu (VD: `8TS26S008-SA718`) tùy sản phẩm — cứ lấy nguyên xi.
- `product_ids`: **BẮT BUỘC LẤY ĐÚNG NGUYÊN GIÁ TRỊ trường `sku` từ data tool trả về** (thường là mã `internal_ref` 9 ký tự VD: `8TS26S008`). KHÔNG TỰ Ý THÊM MÃ MÀU VÀO ĐUÔI (ví dụ data là `8TS26S008`, tuyệt đối không chế thành `8TS26S008-SA718`). AI KHÔNG ĐƯỢC BỊA MÃ.
- `user_insight` theo đúng format 6 tầng như mục 8
- **LUÔN DÙNG NGOẶC KÉP `{{` và `}}` CHO JSON**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment