mezoAgent 0.6.2__py3-none-any.whl → 0.6.4__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.6.2.dist-info → mezoAgent-0.6.4.dist-info}/METADATA +1 -1
- {mezoAgent-0.6.2.dist-info → mezoAgent-0.6.4.dist-info}/RECORD +8 -7
- mezo_agent/__init__.py +4 -0
- mezo_agent/token_balance_tool.py +2 -4
- mezo_agent/token_price_tool.py +1 -0
- mezo_agent/token_utils.py +0 -0
- {mezoAgent-0.6.2.dist-info → mezoAgent-0.6.4.dist-info}/WHEEL +0 -0
- {mezoAgent-0.6.2.dist-info → mezoAgent-0.6.4.dist-info}/top_level.txt +0 -0
@@ -1,15 +1,16 @@
|
|
1
|
-
mezo_agent/__init__.py,sha256=
|
1
|
+
mezo_agent/__init__.py,sha256=8QYgneMYLO5-VzBT-4YiIJ_o1rgGq1EJDVrwvLi9hsQ,707
|
2
2
|
mezo_agent/characters.py,sha256=wub7y9BrAAdAKWwcNAdgrvhRi2zHMaZNzTr2y3qtbsw,515
|
3
3
|
mezo_agent/chat.py,sha256=ZtNurUDV7UzJjbFyU96DNGy37hO3gl0osn19mRu7ER8,859
|
4
4
|
mezo_agent/config.py,sha256=6xFgk80eiBLTasKGW73Ne8hNhMtx8BbQ_Ef79YOyDlc,3233
|
5
5
|
mezo_agent/parsing.py,sha256=dnS5Qw9V8qvSA_IPgn6nCUnyEfZP9TphO8DnH8oUuiM,5080
|
6
6
|
mezo_agent/swap_musd_btc.py,sha256=Co-XcfK73spm94VC6qzGY0VYoGwsMDKKHM8ToGh2JxU,4289
|
7
|
-
mezo_agent/token_balance_tool.py,sha256=
|
8
|
-
mezo_agent/token_price_tool.py,sha256=
|
7
|
+
mezo_agent/token_balance_tool.py,sha256=DoNuHLr_b8P-g3AGYO3_D80Z6tDd9LR-kRdxcKAPN38,1448
|
8
|
+
mezo_agent/token_price_tool.py,sha256=9oayEJm_-lS7SXEcvoKPyJOEVY7EiUO3t_IzKrutgx8,1042
|
9
|
+
mezo_agent/token_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
10
|
mezo_agent/transaction.py,sha256=YpfWrkEaf0YGM_Kc4cFwlT9GmBGZkeJHWm0VGHs9Gks,4199
|
10
11
|
mezo_agent/utils.py,sha256=XRq--PRJbWlG9kpz99QHWu7mLpYY4MYblm38U1xK4YE,2381
|
11
12
|
mezo_agent/data/new_router.json,sha256=A8U-NVfe1F-hDyR90_SuH8jDAxmzyyHWdJW62j9TZsc,26756
|
12
|
-
mezoAgent-0.6.
|
13
|
-
mezoAgent-0.6.
|
14
|
-
mezoAgent-0.6.
|
15
|
-
mezoAgent-0.6.
|
13
|
+
mezoAgent-0.6.4.dist-info/METADATA,sha256=Qoep4c59KYhXpQJIO3G_DKBuQ9zgueA2RIpIdqbUses,273
|
14
|
+
mezoAgent-0.6.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
15
|
+
mezoAgent-0.6.4.dist-info/top_level.txt,sha256=rrAci_NyTR9z6w_BrQhQrAhzMW_A0NYhVa0x2USl0nQ,11
|
16
|
+
mezoAgent-0.6.4.dist-info/RECORD,,
|
mezo_agent/__init__.py
CHANGED
@@ -3,6 +3,8 @@ from .swap_musd_btc import mezo_agent_swap_musd_btc
|
|
3
3
|
from .chat import mezo_character_chat
|
4
4
|
from .characters import get_character_prompt
|
5
5
|
from .token_balance_tool import mezo_agent_token_balance_tool
|
6
|
+
from .token_price_tool import mezo_agent_token_price_tool
|
7
|
+
from .token_utils import get_token_address_by_symbol # ✅ Expose new module
|
6
8
|
|
7
9
|
__all__ = [
|
8
10
|
"mezo_agent_transaction_btc",
|
@@ -10,5 +12,7 @@ __all__ = [
|
|
10
12
|
"mezo_agent_swap_musd_btc",
|
11
13
|
"mezo_character_chat",
|
12
14
|
"mezo_agent_token_balance_tool",
|
15
|
+
"mezo_agent_token_price_tool",
|
16
|
+
"get_token_address_by_symbol",
|
13
17
|
"get_character_prompt"
|
14
18
|
]
|
mezo_agent/token_balance_tool.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from langchain.tools import tool
|
2
2
|
from mezo_agent.config import web3_instance, sender_address, ERC20_ABI
|
3
3
|
from mezo_agent.parsing import extract_balance_details
|
4
|
+
from mezo_agent.token_utils import get_token_address_by_symbol # ✅ Import from new module
|
4
5
|
|
5
6
|
@tool
|
6
7
|
def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
@@ -10,8 +11,6 @@ def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
|
10
11
|
:param balance_prompt: User query containing the token symbol.
|
11
12
|
:return: Token balance for the sender's address.
|
12
13
|
"""
|
13
|
-
from mezo_agent.utils import get_token_address_by_symbol # ✅ Import moved inside function
|
14
|
-
|
15
14
|
details = extract_balance_details(balance_prompt)
|
16
15
|
|
17
16
|
if isinstance(details, str): # Handle extraction errors
|
@@ -25,7 +24,6 @@ def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
|
25
24
|
# Get the contract address dynamically
|
26
25
|
token_address = get_token_address_by_symbol(token_symbol)
|
27
26
|
print(f"✅ Using token address: {token_address}") # Debugging
|
28
|
-
print(f"✅ Using ABI: {ERC20_ABI}")
|
29
27
|
|
30
28
|
token_contract = web3_instance.eth.contract(address=token_address, abi=ERC20_ABI)
|
31
29
|
|
@@ -34,4 +32,4 @@ def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
|
34
32
|
balance = web3_instance.from_wei(balance_wei, "ether")
|
35
33
|
return f"✅ {token_symbol.upper()} Balance: {balance}"
|
36
34
|
except Exception as e:
|
37
|
-
return f"❌ Failed to fetch balance: {str(e)}"
|
35
|
+
return f"❌ Failed to fetch balance: {str(e)}"
|
mezo_agent/token_price_tool.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
from langchain.tools import tool
|
2
2
|
from mezo_agent.config import query_graph
|
3
3
|
from mezo_agent.parsing import extract_price_details
|
4
|
+
from mezo_agent.token_utils import get_token_address_by_symbol # ✅ Import from new module
|
4
5
|
|
5
6
|
@tool
|
6
7
|
def mezo_agent_token_price_tool(price_prompt: str) -> str:
|
File without changes
|
File without changes
|
File without changes
|