Better placement for the recursion catcher
This commit is contained in:
parent
f1fd170cbd
commit
555ccfb8d1
@ -147,14 +147,14 @@ async def get_chatgpt_html_response(topic: str = None, count: int = 0) -> str:
|
||||
"""
|
||||
count += 1
|
||||
|
||||
if count >= 5:
|
||||
return f"Error! ChatGPT is having problems with this topic: {topic}. Try a new one."
|
||||
|
||||
if topic is None:
|
||||
topic = await get_random_topic()
|
||||
|
||||
html = prompt_html_template.replace("(topic)", topic)
|
||||
|
||||
if count >= 5:
|
||||
return f"Error! ChatGPT is having problems with this topic: {topic}. Try a new one."
|
||||
|
||||
logging.info(f"The topic to generate is {topic}")
|
||||
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user