chips commited on
Commit
e3195a7
·
1 Parent(s): 5a3318a

format changed to replace

Browse files
Files changed (1) hide show
  1. app/services/service_openai.py +3 -3
app/services/service_openai.py CHANGED
@@ -74,12 +74,12 @@ class OpenAIService(BaseAttributionService):
74
  ) -> Dict[str, Any]:
75
 
76
  print("Prompt: ")
77
- print(prompts.EXTRACT_INFO_HUMAN_MESSAGE ).format(product_data=product_data_to_str(product_data))
78
 
79
  text_content = [
80
  {
81
  "type": "text",
82
- "text": prompts.EXTRACT_INFO_HUMAN_MESSAGE.format(product_data=product_data_to_str(product_data)),
83
  },
84
  ]
85
  if img_urls is not None:
@@ -156,7 +156,7 @@ class OpenAIService(BaseAttributionService):
156
  text_content = [
157
  {
158
  "type": "text",
159
- "text": prompts.FOLLOW_SCHEMA_HUMAN_MESSAGE.format(json_info=data),
160
  },
161
  ]
162
 
 
74
  ) -> Dict[str, Any]:
75
 
76
  print("Prompt: ")
77
+ print(prompts.EXTRACT_INFO_HUMAN_MESSAGE.replace("{product_data}", product_data_to_str(product_data)))
78
 
79
  text_content = [
80
  {
81
  "type": "text",
82
+ "text": prompts.EXTRACT_INFO_HUMAN_MESSAGE.replace("{product_data}", product_data_to_str(product_data)),
83
  },
84
  ]
85
  if img_urls is not None:
 
156
  text_content = [
157
  {
158
  "type": "text",
159
+ "text": prompts.FOLLOW_SCHEMA_HUMAN_MESSAGE.replace("{json_info}", json.dumps(data)),
160
  },
161
  ]
162