Removed dots from logs

This commit is contained in:
Roger Gonzalez 2023-05-17 22:28:48 -03:00
parent 1e52155255
commit 62ad0c1607
Signed by: rogs
GPG Key ID: C7ECE9C6C36EC2E6

View File

@ -51,7 +51,7 @@ async def extract_html_from_chatgpt_response(returned_string: str) -> Union[str,
except Exception:
match = returned_string.split("<html>")
if len(match) > 1:
logging.info("No valid HTML found, trying to parse...")
logging.info("No valid HTML found, trying to parse")
html = "<html>" + match[1]
html_match = html.split("</html>")
possible_html = html_match[0] + "</html>"
@ -86,7 +86,7 @@ async def get_random_topic() -> str:
topics = completion.choices[0].message.content.split(",")
if len(topics) < 5:
logging.info(f"The topics is too short: {topics}. Retrying...")
logging.info(f"The topics is too short: {topics}. Retrying")
return await get_random_topic()
logging.info(f"The topics list is: {topics}")
@ -181,7 +181,7 @@ async def get_chatgpt_html_response(topic: str = None, count: int = 0) -> str:
html = await extract_html_from_chatgpt_response(response)
if not html:
logging.info(f"No HTML was found. The response was {response}. Retrying...")
logging.info(f"No HTML was found. The response was {response}. Retrying")
return await get_chatgpt_html_response(topic, count)
pattern = r'src="([^"]*)"'