mirror of
https://github.com/OMGeeky/gpt-pilot.git
synced 2026-02-13 21:18:14 +01:00
linting
This commit is contained in:
@@ -118,7 +118,7 @@ def create_gpt_chat_completion(messages: List[dict], req_type, min_tokens=MIN_TO
|
||||
|
||||
# Check if the error message is related to token limit
|
||||
if "context_length_exceeded" in error_message.lower():
|
||||
raise Exception(f'Too many tokens in the request. Please try to continue the project with some previous development step.')
|
||||
raise Exception('Too many tokens in the request. Please try to continue the project with some previous development step.')
|
||||
else:
|
||||
print('The request to OpenAI API failed. Here is the error message:')
|
||||
print(e)
|
||||
@@ -157,7 +157,7 @@ def retry_on_exception(func):
|
||||
time.sleep(wait_duration)
|
||||
continue
|
||||
|
||||
print(colored(f'There was a problem with request to openai API:', 'red'))
|
||||
print(colored('There was a problem with request to openai API:', 'red'))
|
||||
print(err_str)
|
||||
|
||||
user_message = questionary.text(
|
||||
|
||||
Reference in New Issue
Block a user