From 8a5c55e04537ff4fe7ca4db2d91eeddc8efcfaee Mon Sep 17 00:00:00 2001 From: Yuichi Tanaka Date: Sun, 13 Apr 2025 13:03:52 +0900 Subject: [PATCH] Fix the incorrect string formatting and ensure the subcategories variable is embedded in the prompt --- .../How_to_combine_GPT4o_with_RAG_Outfit_Assistant.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/How_to_combine_GPT4o_with_RAG_Outfit_Assistant.ipynb b/examples/How_to_combine_GPT4o_with_RAG_Outfit_Assistant.ipynb index f1c1860192..a29a52bee4 100644 --- a/examples/How_to_combine_GPT4o_with_RAG_Outfit_Assistant.ipynb +++ b/examples/How_to_combine_GPT4o_with_RAG_Outfit_Assistant.ipynb @@ -331,16 +331,16 @@ " \"content\": [\n", " {\n", " \"type\": \"text\",\n", - " \"text\": \"\"\"Given an image of an item of clothing, analyze the item and generate a JSON output with the following fields: \"items\", \"category\", and \"gender\". \n", + " \"text\": f\"\"\"Given an image of an item of clothing, analyze the item and generate a JSON output with the following fields: \"items\", \"category\", and \"gender\".\n", " Use your understanding of fashion trends, styles, and gender preferences to provide accurate and relevant suggestions for how to complete the outfit.\n", " The items field should be a list of items that would go well with the item in the picture. Each item should represent a title of an item of clothing that contains the style, color, and gender of the item.\n", " The category needs to be chosen between the types in this list: {subcategories}.\n", " You have to choose between the genders in this list: [Men, Women, Boys, Girls, Unisex]\n", " Do not include the description of the item in the picture. Do not include the ```json ``` tag in the output.\n", - " \n", + "\n", " Example Input: An image representing a black leather jacket.\n", "\n", - " Example Output: {\"items\": [\"Fitted White Women's T-shirt\", \"White Canvas Sneakers\", \"Women's Black Skinny Jeans\"], \"category\": \"Jackets\", \"gender\": \"Women\"}\n", + " Example Output: {{\"items\": [\"Fitted White Women's T-shirt\", \"White Canvas Sneakers\", \"Women's Black Skinny Jeans\"], \"category\": \"Jackets\", \"gender\": \"Women\"}}\n", " \"\"\",\n", " },\n", " {\n",