youngtsai commited on
Commit
55ea5b2
·
1 Parent(s): 76dbf8b

fix generate_points

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -205,6 +205,7 @@ def generate_points(model, max_tokens, sys_content, scenario, eng_level, topic,
205
  "model": model,
206
  "messages": messages,
207
  "max_tokens": max_tokens,
 
208
  }
209
 
210
  try:
@@ -2183,7 +2184,9 @@ with gr.Blocks(theme=THEME, css=CSS) as demo:
2183
  No more explanation either no developing these points into a simple paragraph.
2184
  Output use JSON format
2185
  EXAMPLE:
2186
- "points":["point1", "point2", "point3"]
 
 
2187
  """
2188
  user_generate_points_prompt = gr.Textbox(label="Points Prompt", value=default_generate_points_prompt, visible=False)
2189
  with gr.Row() as points_html:
 
205
  "model": model,
206
  "messages": messages,
207
  "max_tokens": max_tokens,
208
+ "response_format": { "type": "json_object" }
209
  }
210
 
211
  try:
 
2184
  No more explanation either no developing these points into a simple paragraph.
2185
  Output use JSON format
2186
  EXAMPLE:
2187
+ {{
2188
+ "points":["point1", "point2", "point3"]
2189
+ }}
2190
  """
2191
  user_generate_points_prompt = gr.Textbox(label="Points Prompt", value=default_generate_points_prompt, visible=False)
2192
  with gr.Row() as points_html: