fix message

This commit is contained in:
mertunsall
2025-07-15 13:52:28 +02:00
parent 3263e6751f
commit e46e60f802

View File

@@ -3562,11 +3562,13 @@ class BrowserSession(BaseModel):
if is_new_tab_page(page.url):
self.logger.warning(
f'▫️ Sending LLM 1px placeholder instead of real screenshot of: {_log_pretty_url(page.url)} (page empty)'
f'▫️ Sending LLM no screenshot instead of real screenshot of: {_log_pretty_url(page.url)} (page empty)'
)
# Not an exception because there's no point in retrying if we hit this, its always pointless to screenshot about:blank
# Originally returned a 1x1 white PNG to avoid wasting tokens, but groq LLaMa models do not accept this
# So we return None instead, which the LLM can handle more reliably
# TODO: this should be decided on an LLM level - now take_screenshot doesnt give you the screenshot if the page is empty
# this might be weird behavior for the library overall
return None
# Always bring page to front before rendering, otherwise it crashes in some cases, not sure why