Update src/aidgaf/aidgaf_server/idgaf.py
This commit is contained in:
parent
3444bc50ad
commit
b5805c658f
@ -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]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user