Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
Fix type checker
Magnus Müllerfa977bccb653
diff --git a/examples/custom-functions/file_upload.py b/examples/custom-functions/file_upload.pyindex fc1d28cd7..f147b3166 100644--- a/examples/custom-functions/file_upload.py+++ b/examples/custom-functions/file_upload.py@@ -9,6 +9,8 @@ import loggingimport osimport sys+import aiofiles+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))from dotenv import load_dotenv@@ -81,8 +83,8 @@ async def main():# Create test files if they don't existfor file_path in available_file_paths:if not os.path.exists(file_path):- with open(file_path, 'w') as f:- f.write('Test file content for upload example')+ async with aiofiles.open(file_path, 'w') as f:+ await f.write('Test file content for upload example')# Create the agent with file upload capabilityagent = Agent(