Skip to content

Commit 00c23ad

Browse files
committed
Lints
1 parent 99f1d13 commit 00c23ad

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/apps/msg-use/scheduler.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ async def send_message(contact, message):
145145
async def auto_respond_to_unread():
146146
"""Click unread tab and respond to messages"""
147147
print('\nAuto-responding to unread messages...')
148-
148+
149149
llm = ChatGoogle(model='gemini-2.0-flash-exp', temperature=0.3, api_key=GOOGLE_API_KEY)
150-
150+
151151
task = """
152152
1. Go to https://web.whatsapp.com
153153
2. Wait for page to load
@@ -159,13 +159,13 @@ async def auto_respond_to_unread():
159159
- Move to next unread chat
160160
5. Report how many messages were responded to
161161
"""
162-
162+
163163
browser = BrowserSession(
164164
headless=not args.debug,
165165
user_data_dir=str(USER_DATA_DIR),
166166
storage_state=str(STORAGE_STATE_FILE) if STORAGE_STATE_FILE.exists() else None,
167167
)
168-
168+
169169
agent = Agent(task=task, llm=llm, browser_session=browser)
170170
result = await agent.run()
171171
print('✅ Auto-response complete')
@@ -185,16 +185,16 @@ async def main():
185185
if args.auto:
186186
print('AUTO MODE - Responding to unread messages every ~30 minutes')
187187
print('Press Ctrl+C to stop.\n')
188-
188+
189189
while True:
190190
try:
191191
await auto_respond_to_unread()
192-
192+
193193
# Wait 30 minutes +/- 5 minutes randomly
194194
wait_minutes = 30 + random.randint(-5, 5)
195195
print(f'\n⏰ Next check in {wait_minutes} minutes...')
196196
await asyncio.sleep(wait_minutes * 60)
197-
197+
198198
except KeyboardInterrupt:
199199
print('\n\nAuto mode stopped by user')
200200
break

0 commit comments

Comments
 (0)