ankush13r commited on
Commit
3aac3b1
·
verified ·
1 Parent(s): 5e54489

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ client = OpenAI(
25
 
26
  def clean_json_string(json_str):
27
  # Strip spaces and '}' from the end, then add back a single '}'
28
- return re.sub(r'[ }\s]+$', '', json_str) + '}'
29
 
30
  def complation(history, model, system_prompt, tools=None):
31
  messages = [{"role": "system", "content": system_prompt}]
 
25
 
26
  def clean_json_string(json_str):
27
  # Strip spaces and '}' from the end, then add back a single '}'
28
+ return re.sub(r'[ ,}\s]+$', '', json_str) + '}'
29
 
30
  def complation(history, model, system_prompt, tools=None):
31
  messages = [{"role": "system", "content": system_prompt}]