Remove back quotes when receiving a function response

This commit is contained in:
HardAndHeavy 2024-12-01 01:10:27 +03:00
parent 1367d95750
commit 33da359c6d

View File

@ -168,6 +168,7 @@ And answer according to the language of the user's question.""",
response = r.json()
content = response["choices"][0]["message"]["content"]
content = content[content.find('{'):content.rfind('}') + 1]
# Parse the function response
if content != "":