You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Find a way to handle nicely the error thrown by openai calls.
To Reproduce
Steps to reproduce the behavior:
Run any generation: py main.py --first-generation --subject "maths"
Expected behavior
Either the error to not appear with some callbacks or whatever to be able to call openai until the work is done.
Or to handle any openai error response.
Screenshots
If applicable, add screenshots to help explain your problem.
Traceback (most recent call last):
File "F:\DOSSIER ULTIME\PROG\02-PYTHON\Organizations\SCRYPT\data-forge\main.py", line 229, in <module>
generator.pipeline(execution_list=args)
File "F:\DOSSIER ULTIME\PROG\02-PYTHON\Organizations\SCRYPT\data-forge\main.py", line 167, in pipeline
self.generate_dataset(identifier=1, subject=execution_list[
File "F:\DOSSIER ULTIME\PROG\02-PYTHON\Organizations\SCRYPT\data-forge\main.py", line 98, in generate_dataset
self.model(prompt_content=dyn_prompt)
File "F:\DOSSIER ULTIME\PROG\02-PYTHON\Organizations\SCRYPT\data-forge\main.py", line 33, in model
self.response = openai.ChatCompletion.create(
File "F:\DOSSIER ULTIME\PROG\pyenv\data-forge\lib\site-packages\openai\api_resources\chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "F:\DOSSIER ULTIME\PROG\pyenv\data-forge\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py", line 155, in create
response, _, api_key = requestor.request(
File "F:\DOSSIER ULTIME\PROG\pyenv\data-forge\lib\site-packages\openai\api_requestor.py", line 289, in request
result = self.request_raw(
File "F:\DOSSIER ULTIME\PROG\pyenv\data-forge\lib\site-packages\openai\api_requestor.py", line 617, in request_raw
raise error.Timeout("Request timed out: {}".format(e)) from e
openai.error.Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=600)
The text was updated successfully, but these errors were encountered:
Describe the bug
Find a way to handle nicely the error thrown by openai calls.
To Reproduce
Steps to reproduce the behavior:
Run any generation:
py main.py --first-generation --subject "maths"
Expected behavior
Either the error to not appear with some callbacks or whatever to be able to call openai until the work is done.
Or to handle any openai error response.
Screenshots
If applicable, add screenshots to help explain your problem.
The text was updated successfully, but these errors were encountered: