tunght commited on
Commit
c531a8f
·
1 Parent(s): cab320e

add length to structure

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -116,7 +116,8 @@ default_model = "gemini-2.0-flash-thinking-exp-01-21"
116
  openai.api_key = os.environ["OPENAI_API_KEY"]
117
 
118
  struct_copy_prompt = """Generate {nversions} versions of the product description for a product with the following information.
119
- For each version, write at least {min_length} words and at most {max_length} words.
 
120
  Make sure that the structure of each output follows the reference structure. Do not add any additional sentences or structures that are not in the reference structure.
121
  Make sure to use the tone of voice, rythm, cadence and style of the reference copy for each output.
122
  Use markdown format for each output.
@@ -190,8 +191,8 @@ Make sure that the output is in JSON format, no extra text should be included in
190
 
191
 
192
  copy_prompt = """Generate {nversions} versions of the product description for a product with the following information.
193
- For each version, write at least {min_length} words and at most {max_length} words.
194
- Make sure that the structure of each output follows the structure of the reference copy.
195
  Make sure to use the tone of voice, rythm, cadence and style of the reference copy for each output.
196
  Use markdown format for each output.
197
  Make sure that the structure of each output follows the structure of the reference copy.
@@ -257,8 +258,8 @@ Make sure that the output is in JSON format, no extra text should be included in
257
 
258
 
259
  struct_prompt = """Generate {nversions} versions of the product description for a product with the following information.
260
- For each version, write at least {min_length} words and at most {max_length} words.
261
- Make sure that the structure of each output follows the reference structure. Do not add any additional sentences or structures that are not in the reference structure.
262
  Use markdown format for each output.
263
  Do not include any part of the reference structure in the output.
264
  Make sure that the structure of each output follows the reference structure.
 
116
  openai.api_key = os.environ["OPENAI_API_KEY"]
117
 
118
  struct_copy_prompt = """Generate {nversions} versions of the product description for a product with the following information.
119
+ If the structure does not specify the length of the output, then write at least {min_length} words and at most {max_length} words.
120
+ If the structure specifies the length of the output, then write according to the specified length.
121
  Make sure that the structure of each output follows the reference structure. Do not add any additional sentences or structures that are not in the reference structure.
122
  Make sure to use the tone of voice, rythm, cadence and style of the reference copy for each output.
123
  Use markdown format for each output.
 
191
 
192
 
193
  copy_prompt = """Generate {nversions} versions of the product description for a product with the following information.
194
+ If the structure does not specify the length of the output, then write at least {min_length} words and at most {max_length} words.
195
+ If the structure specifies the length of the output, then write according to the specified length.Make sure that the structure of each output follows the structure of the reference copy.
196
  Make sure to use the tone of voice, rythm, cadence and style of the reference copy for each output.
197
  Use markdown format for each output.
198
  Make sure that the structure of each output follows the structure of the reference copy.
 
258
 
259
 
260
  struct_prompt = """Generate {nversions} versions of the product description for a product with the following information.
261
+ If the structure does not specify the length of the output, then write at least {min_length} words and at most {max_length} words.
262
+ If the structure specifies the length of the output, then write according to the specified length.Make sure that the structure of each output follows the reference structure. Do not add any additional sentences or structures that are not in the reference structure.
263
  Use markdown format for each output.
264
  Do not include any part of the reference structure in the output.
265
  Make sure that the structure of each output follows the reference structure.