mezoAgent 0.7.0__py3-none-any.whl → 0.7.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mezoAgent-0.7.0.dist-info → mezoAgent-0.7.2.dist-info}/METADATA +1 -1
- {mezoAgent-0.7.0.dist-info → mezoAgent-0.7.2.dist-info}/RECORD +5 -5
- mezo_agent/twitter_client.py +11 -9
- {mezoAgent-0.7.0.dist-info → mezoAgent-0.7.2.dist-info}/WHEEL +0 -0
- {mezoAgent-0.7.0.dist-info → mezoAgent-0.7.2.dist-info}/top_level.txt +0 -0
@@ -8,11 +8,11 @@ mezo_agent/token_balance_tool.py,sha256=n5xkHWGhkJdQZILN0fDe-n4NHgXSHTSloEHJfkLM
|
|
8
8
|
mezo_agent/token_price_tool.py,sha256=vD-ukq0D_4zmjIy9bZ9qL44nGctf-hWzkQuTd-0wy2U,930
|
9
9
|
mezo_agent/token_utils.py,sha256=3NH_Z_vbZ0uupuuGjEbmwsbUkubluQbL-0xR9kia7nU,1118
|
10
10
|
mezo_agent/transaction.py,sha256=YpfWrkEaf0YGM_Kc4cFwlT9GmBGZkeJHWm0VGHs9Gks,4199
|
11
|
-
mezo_agent/twitter_client.py,sha256=
|
11
|
+
mezo_agent/twitter_client.py,sha256=Va8ZQaK5lZjJUq3-bhIJWnDmX4Mmt4kWRW3aKSGbLq8,3248
|
12
12
|
mezo_agent/twitter_manager.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
mezo_agent/utils.py,sha256=hsGtL_iXvUVGnY5aHPQ0v6Jejxd4P4qw0yOtS1omToU,1397
|
14
14
|
mezo_agent/data/new_router.json,sha256=A8U-NVfe1F-hDyR90_SuH8jDAxmzyyHWdJW62j9TZsc,26756
|
15
|
-
mezoAgent-0.7.
|
16
|
-
mezoAgent-0.7.
|
17
|
-
mezoAgent-0.7.
|
18
|
-
mezoAgent-0.7.
|
15
|
+
mezoAgent-0.7.2.dist-info/METADATA,sha256=UmaWJ9SG3FkEPtKYQ2AYlAu28Dm8vqyyENlVLanIsYM,273
|
16
|
+
mezoAgent-0.7.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
17
|
+
mezoAgent-0.7.2.dist-info/top_level.txt,sha256=rrAci_NyTR9z6w_BrQhQrAhzMW_A0NYhVa0x2USl0nQ,11
|
18
|
+
mezoAgent-0.7.2.dist-info/RECORD,,
|
mezo_agent/twitter_client.py
CHANGED
@@ -11,10 +11,10 @@ load_dotenv()
|
|
11
11
|
|
12
12
|
class TwitterClient:
|
13
13
|
"""
|
14
|
-
A modular Twitter client for MezoAgent that allows characters to tweet automatically.
|
14
|
+
A modular Twitter client for MezoAgent that allows characters to tweet automatically with personality.
|
15
15
|
"""
|
16
16
|
|
17
|
-
def __init__(self, character_name: str, api_key: str, api_secret: str, access_token: str, access_secret: str):
|
17
|
+
def __init__(self, character_name: str, api_key: str, api_secret: str, access_token: str, access_secret: str, personality: str):
|
18
18
|
"""
|
19
19
|
Initializes the Twitter client for a given character.
|
20
20
|
|
@@ -23,8 +23,10 @@ class TwitterClient:
|
|
23
23
|
:param api_secret: Twitter API Secret Key.
|
24
24
|
:param access_token: Twitter Access Token.
|
25
25
|
:param access_secret: Twitter Access Token Secret.
|
26
|
+
:param personality: Custom personality description for AI-generated tweets.
|
26
27
|
"""
|
27
28
|
self.character_name = character_name
|
29
|
+
self.personality = personality # ✅ Store personality
|
28
30
|
|
29
31
|
# Authenticate with Twitter API
|
30
32
|
auth = tweepy.OAuthHandler(api_key, api_secret)
|
@@ -36,17 +38,17 @@ class TwitterClient:
|
|
36
38
|
|
37
39
|
def generate_tweet(self) -> str:
|
38
40
|
"""
|
39
|
-
Generates a tweet using AI for the character.
|
41
|
+
Generates a tweet using AI for the character based on its personality.
|
40
42
|
This function can be modified to pull from AI-generated content.
|
41
43
|
|
42
44
|
:return: A string containing the tweet.
|
43
45
|
"""
|
44
46
|
tweet_templates = [
|
45
|
-
f"{self.character_name}
|
46
|
-
f"
|
47
|
-
f"On-chain or it didn't happen!
|
48
|
-
f"{self.character_name}
|
49
|
-
f"
|
47
|
+
f"{self.character_name} - {self.personality}: \"Thinking about the future of DeFi... 🚀\"",
|
48
|
+
f"{self.character_name} - {self.personality}: \"GM! Stay bullish today. 🌞\"",
|
49
|
+
f"{self.character_name} - {self.personality}: \"On-chain or it didn't happen! ⛓️\"",
|
50
|
+
f"{self.character_name} - {self.personality}: \"Stacking sats and stacking wisdom. 💡\"",
|
51
|
+
f"{self.character_name} - {self.personality}: \"Wen moon? HODL tight! 🌙\""
|
50
52
|
]
|
51
53
|
return random.choice(tweet_templates)
|
52
54
|
|
@@ -75,4 +77,4 @@ class TwitterClient:
|
|
75
77
|
time.sleep(sleep_time)
|
76
78
|
|
77
79
|
thread = Thread(target=tweet_scheduler, daemon=True)
|
78
|
-
thread.start()
|
80
|
+
thread.start()
|
File without changes
|
File without changes
|