Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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}]
|