mezoAgent 0.6.0__tar.gz → 0.6.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {mezoagent-0.6.0 → mezoagent-0.6.2}/PKG-INFO +1 -1
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezoAgent.egg-info/PKG-INFO +1 -1
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/token_balance_tool.py +3 -3
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/token_price_tool.py +2 -1
- {mezoagent-0.6.0 → mezoagent-0.6.2}/setup.py +1 -1
- {mezoagent-0.6.0 → mezoagent-0.6.2}/MANIFEST.in +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/README.md +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezoAgent.egg-info/SOURCES.txt +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezoAgent.egg-info/dependency_links.txt +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezoAgent.egg-info/requires.txt +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezoAgent.egg-info/top_level.txt +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/__init__.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/characters.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/chat.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/config.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/data/new_router.json +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/parsing.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/swap_musd_btc.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/transaction.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/mezo_agent/utils.py +0 -0
- {mezoagent-0.6.0 → mezoagent-0.6.2}/setup.cfg +0 -0
@@ -1,7 +1,6 @@
|
|
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.utils import get_token_address_by_symbol
|
5
4
|
|
6
5
|
@tool
|
7
6
|
def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
@@ -11,6 +10,8 @@ def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
|
11
10
|
:param balance_prompt: User query containing the token symbol.
|
12
11
|
:return: Token balance for the sender's address.
|
13
12
|
"""
|
13
|
+
from mezo_agent.utils import get_token_address_by_symbol # ✅ Import moved inside function
|
14
|
+
|
14
15
|
details = extract_balance_details(balance_prompt)
|
15
16
|
|
16
17
|
if isinstance(details, str): # Handle extraction errors
|
@@ -24,11 +25,10 @@ def mezo_agent_token_balance_tool(balance_prompt: str) -> str:
|
|
24
25
|
# Get the contract address dynamically
|
25
26
|
token_address = get_token_address_by_symbol(token_symbol)
|
26
27
|
print(f"✅ Using token address: {token_address}") # Debugging
|
27
|
-
print(f"✅ Using ABI: {ERC20_ABI}")
|
28
|
+
print(f"✅ Using ABI: {ERC20_ABI}")
|
28
29
|
|
29
30
|
token_contract = web3_instance.eth.contract(address=token_address, abi=ERC20_ABI)
|
30
31
|
|
31
|
-
|
32
32
|
# Fetch balance
|
33
33
|
balance_wei = token_contract.functions.balanceOf(sender_address).call()
|
34
34
|
balance = web3_instance.from_wei(balance_wei, "ether")
|
@@ -1,6 +1,5 @@
|
|
1
1
|
from langchain.tools import tool
|
2
2
|
from mezo_agent.config import query_graph
|
3
|
-
from mezo_agent.utils import get_token_address_by_symbol, get_token_price
|
4
3
|
from mezo_agent.parsing import extract_price_details
|
5
4
|
|
6
5
|
@tool
|
@@ -11,6 +10,8 @@ def mezo_agent_token_price_tool(price_prompt: str) -> str:
|
|
11
10
|
:param price_prompt: User query containing the token symbol.
|
12
11
|
:return: Token price details.
|
13
12
|
"""
|
13
|
+
from mezo_agent.utils import get_token_price # ✅ Import moved inside function
|
14
|
+
|
14
15
|
details = extract_price_details(price_prompt)
|
15
16
|
|
16
17
|
if isinstance(details, str): # Handle extraction errors
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|