File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
playground/assistant_actions Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 103
103
for i in range (1000 ):
104
104
print (f"Tick { i + 1 } " )
105
105
tree .tick ()
106
- time .sleep (10 ) # Simulate time between ticks
106
+ time .sleep (300 ) # Simulate time between ticks
Original file line number Diff line number Diff line change 4
4
from playground .actions_manager import agent_action
5
5
6
6
7
- @agent_action
8
- def post_to_twitter (content ):
9
- """Post a tweet to Twitter."""
7
+ def create_twitter_account ():
8
+ """Create a Twitter account."""
10
9
email = os .getenv ("X_EMAIL" )
11
10
username = os .getenv ("X_USERNAME" )
12
11
password = os .getenv ("X_PASSWORD" )
13
12
account = Account (email , username , password )
13
+ return account
14
+
15
+
16
+ account = create_twitter_account ()
14
17
18
+
19
+ @agent_action
20
+ def post_to_twitter (content ):
21
+ """Post a tweet to Twitter."""
15
22
account .tweet (content )
You can’t perform that action at this time.
0 commit comments