Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
javierganan99 committed Oct 15, 2023
1 parent 1fd1cea commit 0320415
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions LLMCode/utils/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ def run_with_timeout(target_function, args=None, timeout=30):
try:
result_value = result.get(timeout=timeout)
return result_value
except (
Exception
) as e: # multiprocessing.TimeoutError or openai.error.ServiceUnavailableError:
except Exception as e:
if isinstance(e, multiprocessing.TimeoutError):
LOGGER.info(
f"{ANSI_CODE['yellow']}\r⚠ The completion could not be done. {target_function} response lasted more than {timeout} seconds, which is the limit."
Expand Down

0 comments on commit 0320415

Please sign in to comment.