mezoAgent 0.5.0__py3-none-any.whl → 0.5.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mezoAgent
3
- Version: 0.5.0
3
+ Version: 0.5.2
4
4
  Summary: A Python package for Mezo Agent transactions with LangChain tools
5
5
  Author: Dreadwulf, Duck, Digi
6
6
  Requires-Dist: python-dotenv
@@ -2,13 +2,13 @@ mezo_agent/__init__.py,sha256=naG5ZIXKDWTRlqdx2oi1zJcRZpJBO9ugVkW0MaPkZuk,497
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=LgMTntnzXrY7giGXy6JZqhPwPxxMpWWOgc2Ah6g3Y48,3017
5
- mezo_agent/parsing.py,sha256=6g0U4x8nQaOkwIPon1UlKlnVX6-S2Tf4LKqdY1ZGyiY,4000
5
+ mezo_agent/parsing.py,sha256=v5AiLfZ8Rvm46gek7QX2OmeLFO8xhvQOH_yCc6GNlLA,3850
6
6
  mezo_agent/swap_musd_btc.py,sha256=Co-XcfK73spm94VC6qzGY0VYoGwsMDKKHM8ToGh2JxU,4289
7
- mezo_agent/token_balance_tool.py,sha256=GQsZnM6zwIdCL5fRISd_KAdc8RNVOTa0LYHPhPIdW1g,1304
7
+ mezo_agent/token_balance_tool.py,sha256=MxvHzMLWbcwnJ34LDiefEz3_hHTKd6asNOEhdVs8VCY,1335
8
8
  mezo_agent/transaction.py,sha256=YpfWrkEaf0YGM_Kc4cFwlT9GmBGZkeJHWm0VGHs9Gks,4199
9
9
  mezo_agent/utils.py,sha256=Kdq3YRj6fOnAmDjI6vktvOvN0vAR8U7TgoTGqcA2KcI,973
10
10
  mezo_agent/data/new_router.json,sha256=A8U-NVfe1F-hDyR90_SuH8jDAxmzyyHWdJW62j9TZsc,26756
11
- mezoAgent-0.5.0.dist-info/METADATA,sha256=ZfVWkIcivB8L4OlUGNFpwhg-SQXFqHp8wkFg-Ugh4W0,273
12
- mezoAgent-0.5.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
13
- mezoAgent-0.5.0.dist-info/top_level.txt,sha256=rrAci_NyTR9z6w_BrQhQrAhzMW_A0NYhVa0x2USl0nQ,11
14
- mezoAgent-0.5.0.dist-info/RECORD,,
11
+ mezoAgent-0.5.2.dist-info/METADATA,sha256=LLnjBY0JDYmk47bpPph-4hGrEE78T7ZW3hR8fP3S9ZU,273
12
+ mezoAgent-0.5.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
13
+ mezoAgent-0.5.2.dist-info/top_level.txt,sha256=rrAci_NyTR9z6w_BrQhQrAhzMW_A0NYhVa0x2USl0nQ,11
14
+ mezoAgent-0.5.2.dist-info/RECORD,,
mezo_agent/parsing.py CHANGED
@@ -85,15 +85,10 @@ Your output must be a valid JSON object with no additional text.
85
85
  )
86
86
 
87
87
  def extract_balance_details(prompt: str):
88
- """
89
- Parses a balance query and extracts the token symbol.
90
-
91
- :param prompt: User input asking for a token balance.
92
- :return: Dictionary containing the token symbol or an error message.
93
- """
88
+ formatted_prompt = balance_prompt_template.format(input=prompt)
89
+ response = llm.invoke(formatted_prompt)
90
+ print("LLM raw balance response:", response.content)
94
91
  try:
95
- formatted_prompt = balance_prompt_template.format(input=prompt)
96
- response = balance_output_parser.parse(formatted_prompt)
97
- return response
92
+ return balance_output_parser.parse(response.content)
98
93
  except Exception as e:
99
- return f"Failed to extract balance details: {str(e)}"
94
+ return f"Failed to extract balance details: {str(e)}"
@@ -1,5 +1,6 @@
1
1
  from langchain.tools import tool
2
- from mezo_agent.config import web3_instance, sender_address, extract_balance_details, ERC20_ABI
2
+ from mezo_agent.config import web3_instance, sender_address, ERC20_ABI
3
+ from mezo_agent.parsing import extract_balance_details
3
4
  from mezo_agent.utils import get_token_address_by_symbol
4
5
 
5
6
  @tool