Skip to content

Commit 07fadb6

Browse files
Fix the incorrect string formatting and ensure the subcategories variable is embedded in the prompt (#1770)
1 parent b5c4ab2 commit 07fadb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/How_to_combine_GPT4o_with_RAG_Outfit_Assistant.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,16 @@
331331
" \"content\": [\n",
332332
" {\n",
333333
" \"type\": \"text\",\n",
334-
" \"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",
334+
" \"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",
335335
" Use your understanding of fashion trends, styles, and gender preferences to provide accurate and relevant suggestions for how to complete the outfit.\n",
336336
" 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",
337337
" The category needs to be chosen between the types in this list: {subcategories}.\n",
338338
" You have to choose between the genders in this list: [Men, Women, Boys, Girls, Unisex]\n",
339339
" Do not include the description of the item in the picture. Do not include the ```json ``` tag in the output.\n",
340-
" \n",
340+
"\n",
341341
" Example Input: An image representing a black leather jacket.\n",
342342
"\n",
343-
" Example Output: {\"items\": [\"Fitted White Women's T-shirt\", \"White Canvas Sneakers\", \"Women's Black Skinny Jeans\"], \"category\": \"Jackets\", \"gender\": \"Women\"}\n",
343+
" Example Output: {{\"items\": [\"Fitted White Women's T-shirt\", \"White Canvas Sneakers\", \"Women's Black Skinny Jeans\"], \"category\": \"Jackets\", \"gender\": \"Women\"}}\n",
344344
" \"\"\",\n",
345345
" },\n",
346346
" {\n",

0 commit comments

Comments
 (0)