try without logger.error(str, e)

This commit is contained in:
Nicholas Albion
2023-10-04 14:56:16 +11:00
parent a63aedb2b1
commit 0d8a4c7fee

View File

@@ -105,7 +105,7 @@ def create_gpt_chat_completion(messages: List[dict], req_type, project,
except TokenLimitError as e:
raise e
except Exception as e:
logger.error(f'The request to {os.getenv("ENDPOINT")} API failed: %s', e)
# logger.error(f'The request to {os.getenv("ENDPOINT")} API failed: %s', e)
print(f'The request to {os.getenv("ENDPOINT")} API failed. Here is the error message:')
print(e)
return {} # https://github.com/Pythagora-io/gpt-pilot/issues/130 - may need to revisit how we handle this