TASK:mixi;
This commit is contained in:
@@ -743,17 +743,17 @@ public class TAppProductService extends ServiceImpl<TProductMapper, TProduct> {
|
||||
// 创建推荐对象
|
||||
OutfitRecommendation recommendation = new OutfitRecommendation();
|
||||
|
||||
// // 调用ai推荐模型
|
||||
// JSONObject jsonObject = pythonService.getAIRecommend(aiRecommendDTO);
|
||||
//
|
||||
// // 检查jsonObject是否为null
|
||||
// if (jsonObject == null) {
|
||||
// throw new NullPointerException("The response from Python service is null");
|
||||
// }
|
||||
// 调用ai推荐模型
|
||||
JSONObject jsonObject = pythonService.getAIRecommend(aiRecommendDTO);
|
||||
|
||||
// 检查jsonObject是否为null
|
||||
if (jsonObject == null) {
|
||||
throw new NullPointerException("The response from Python service is null");
|
||||
}
|
||||
|
||||
// 从JSON对象中获取output字段
|
||||
// String output = jsonObject.getString("output");
|
||||
String output = "I have a great outfit recommendation for you! Here are the details:\n\n### Recommended Outfit:\n1. **Tailored Navy Blue Blazer**\n - **Description**: A single-breasted design with notched lapels and a slim fit. Features two front flap pockets and a single button closure. Made from a wool blend for a structured yet comfortable feel.\n - \n\n2. **White Silk Blouse**\n - **Description**: A classic collar, button-down front, and long sleeves with buttoned cuffs. Slightly loose fit for a sophisticated and airy look.\n - \n\n3. **High-Waisted Beige Trousers**\n - **Description**: Straight-leg trousers in a light beige color. Clean front with a concealed hook-and-bar closure, side pockets, and a slightly cropped length to show off the ankles.\n - \n\n### Reasons for Recommendation:\n- **Parisian Chic Theme**: Classic and versatile pieces that embody sophistication and elegance.\n- **Navy Blue Blazer**: Adds a touch of structure, perfect for various occasions.\n- **White Silk Blouse**: A timeless staple that pairs well with the blazer.\n- **High-Waisted Beige Trousers**: Neutral base that complements the navy and white, creating a balanced and polished ensemble.\n\nThis combination is ideal for general use and can be dressed up or down depending on the occasion. Enjoy your new look!";
|
||||
String output = jsonObject.getString("output");
|
||||
// String output = "I have a great outfit recommendation for you! Here are the details:\n\n### Recommended Outfit:\n1. **Tailored Navy Blue Blazer**\n - **Description**: A single-breasted design with notched lapels and a slim fit. Features two front flap pockets and a single button closure. Made from a wool blend for a structured yet comfortable feel.\n - \n\n2. **White Silk Blouse**\n - **Description**: A classic collar, button-down front, and long sleeves with buttoned cuffs. Slightly loose fit for a sophisticated and airy look.\n - \n\n3. **High-Waisted Beige Trousers**\n - **Description**: Straight-leg trousers in a light beige color. Clean front with a concealed hook-and-bar closure, side pockets, and a slightly cropped length to show off the ankles.\n - \n\n### Reasons for Recommendation:\n- **Parisian Chic Theme**: Classic and versatile pieces that embody sophistication and elegance.\n- **Navy Blue Blazer**: Adds a touch of structure, perfect for various occasions.\n- **White Silk Blouse**: A timeless staple that pairs well with the blazer.\n- **High-Waisted Beige Trousers**: Neutral base that complements the navy and white, creating a balanced and polished ensemble.\n\nThis combination is ideal for general use and can be dressed up or down depending on the occasion. Enjoy your new look!";
|
||||
|
||||
List<String> urls = extractBracketContents(output);
|
||||
Map<String, String> map = new HashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user