Update src/aidgaf/aidgaf_server/idgaf.py

This commit is contained in:
Adam Outler 2024-11-16 00:55:52 +00:00
parent 3444bc50ad
commit b5805c658f

View File

@ -50,8 +50,10 @@ def parse_idgaf_request(idgaf_command) -> [int, dict]:
response = get_gpt_response(the_data)
try:
response_text = response.json()['choices'][0]['message']["content"].strip()
except KeyError:
response_text = response.text
print(response_text)
obj = get_response_base_object(response_text)
return [response.status_code, obj]