Derfel2025 commited on
Commit
cc965d9
·
1 Parent(s): ec8f868

switched to prompt2, only two condition choices, for ebay api compatability

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -56,12 +56,15 @@ def product_identification_response(image_path=r"C:\Users\JoeJo\Downloads\XyAaqB
56
  The condition of the product must be one of the following: (*) New, (*) Like New, (*) Good or (*) Poor.
57
  Use the data from {response} as the source for your response
58
  """
 
 
 
59
 
60
  chat_completion = client.chat.completions.create(
61
  messages=[
62
  {
63
  "role": "system",
64
- "content": prompt
65
  },
66
  {
67
  "role": "user",
 
56
  The condition of the product must be one of the following: (*) New, (*) Like New, (*) Good or (*) Poor.
57
  Use the data from {response} as the source for your response
58
  """
59
+ prompt2 = f"""Your task is to returned structured JSON of product and condition in the following format: {{ "product": "the identity of the product", "condition": "the condition of the product"}}.
60
+ The condition of the product must be one of the following: (*) New or (*) Used.
61
+ Use the data from {response} as the source for your response"""
62
 
63
  chat_completion = client.chat.completions.create(
64
  messages=[
65
  {
66
  "role": "system",
67
+ "content": prompt2
68
  },
69
  {
70
  "role": "user",