Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -123,9 +123,9 @@ def respond(message, history):
|
|
| 123 |
response = client_gemma.chat_completion(func_caller, max_tokens=200)
|
| 124 |
response = str(response)
|
| 125 |
try:
|
| 126 |
-
response = response[int(response.find("{")):
|
| 127 |
except:
|
| 128 |
-
|
| 129 |
response = response.replace("\\n", "")
|
| 130 |
response = response.replace("\\'", "'")
|
| 131 |
response = response.replace('\\"', '"')
|
|
|
|
| 123 |
response = client_gemma.chat_completion(func_caller, max_tokens=200)
|
| 124 |
response = str(response)
|
| 125 |
try:
|
| 126 |
+
response = response[int(response.find("{")):int(response.rindex("</"))]
|
| 127 |
except:
|
| 128 |
+
response = response[int(response.find("{")):(int(response.rfind("}"))+1)]
|
| 129 |
response = response.replace("\\n", "")
|
| 130 |
response = response.replace("\\'", "'")
|
| 131 |
response = response.replace('\\"', '"')
|