mezoAgent 0.4.0__py3-none-any.whl → 0.4.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.4.0.dist-info → mezoAgent-0.4.2.dist-info}/METADATA +1 -1
- {mezoAgent-0.4.0.dist-info → mezoAgent-0.4.2.dist-info}/RECORD +6 -6
- mezo_agent/__init__.py +8 -2
- mezo_agent/chat.py +5 -10
- {mezoAgent-0.4.0.dist-info → mezoAgent-0.4.2.dist-info}/WHEEL +0 -0
- {mezoAgent-0.4.0.dist-info → mezoAgent-0.4.2.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
|
-
mezo_agent/__init__.py,sha256
|
1
|
+
mezo_agent/__init__.py,sha256=PRFZfcq8B68pQI2toci1ACM_SPcu7suy9D3OD8IvZeI,450
|
2
2
|
mezo_agent/characters.py,sha256=wub7y9BrAAdAKWwcNAdgrvhRi2zHMaZNzTr2y3qtbsw,515
|
3
|
-
mezo_agent/chat.py,sha256=
|
3
|
+
mezo_agent/chat.py,sha256=ZtNurUDV7UzJjbFyU96DNGy37hO3gl0osn19mRu7ER8,859
|
4
4
|
mezo_agent/config.py,sha256=1PWeaHdQPKqKPraE-tM81CwRKeBiCbz5C_8iZTEiCgo,2148
|
5
5
|
mezo_agent/parsing.py,sha256=rolPVE8r_RS6BqKe25r1nyZQ47rvTPG2Hv09Kxxfv4c,2821
|
6
6
|
mezo_agent/swap_musd_btc.py,sha256=Co-XcfK73spm94VC6qzGY0VYoGwsMDKKHM8ToGh2JxU,4289
|
7
7
|
mezo_agent/transaction.py,sha256=YpfWrkEaf0YGM_Kc4cFwlT9GmBGZkeJHWm0VGHs9Gks,4199
|
8
8
|
mezo_agent/data/new_router.json,sha256=A8U-NVfe1F-hDyR90_SuH8jDAxmzyyHWdJW62j9TZsc,26756
|
9
|
-
mezoAgent-0.4.
|
10
|
-
mezoAgent-0.4.
|
11
|
-
mezoAgent-0.4.
|
12
|
-
mezoAgent-0.4.
|
9
|
+
mezoAgent-0.4.2.dist-info/METADATA,sha256=YEbcKgTvvW13zDdNJKRz47odDmCOX73-Bl_KTa3Qn_k,273
|
10
|
+
mezoAgent-0.4.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
11
|
+
mezoAgent-0.4.2.dist-info/top_level.txt,sha256=rrAci_NyTR9z6w_BrQhQrAhzMW_A0NYhVa0x2USl0nQ,11
|
12
|
+
mezoAgent-0.4.2.dist-info/RECORD,,
|
mezo_agent/__init__.py
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
from .transaction import mezo_agent_transaction_btc, mezo_agent_musd_transaction
|
2
2
|
from .swap_musd_btc import mezo_agent_swap_musd_btc
|
3
|
-
from .chat import
|
3
|
+
from .chat import mezo_character_chat # Corrected function name
|
4
4
|
from .characters import get_character_prompt
|
5
5
|
|
6
|
-
__all__ = [
|
6
|
+
__all__ = [
|
7
|
+
"mezo_agent_transaction_btc",
|
8
|
+
"mezo_agent_musd_transaction",
|
9
|
+
"mezo_agent_swap_musd_btc",
|
10
|
+
"mezo_character_chat", # Corrected function name
|
11
|
+
"get_character_prompt"
|
12
|
+
]
|
mezo_agent/chat.py
CHANGED
@@ -1,12 +1,13 @@
|
|
1
|
-
from mezo_agent.config import Config # Use existing config file
|
2
1
|
from mezo_agent.characters import get_character_prompt # Import character selection
|
3
2
|
from langchain_openai import ChatOpenAI
|
4
|
-
from langchain.tools import
|
3
|
+
from langchain.tools import tool
|
4
|
+
from .config import OPENAI_API_KEY
|
5
5
|
|
6
6
|
# Initialize OpenAI Chat Model
|
7
|
-
llm = ChatOpenAI(temperature=0, openai_api_key=
|
7
|
+
llm = ChatOpenAI(temperature=0, openai_api_key=OPENAI_API_KEY)
|
8
8
|
|
9
|
-
|
9
|
+
@tool
|
10
|
+
def mezo_character_chat(prompt: str, character: str = "DigAIJoe") -> str:
|
10
11
|
"""
|
11
12
|
Generates a chatbot response based on the user's input and the selected AI character.
|
12
13
|
|
@@ -19,9 +20,3 @@ def mezo_chat(prompt: str, character: str = "crypto_native") -> str:
|
|
19
20
|
response = llm.invoke(query)
|
20
21
|
return response.content.strip()
|
21
22
|
|
22
|
-
# Define the chat tool for LangChain
|
23
|
-
mezo_agent_chat_tool = Tool(
|
24
|
-
name="Mezo Chat Tool",
|
25
|
-
func=mezo_chat,
|
26
|
-
description="Chat with an AI character that responds based on a selected personality."
|
27
|
-
)
|
File without changes
|
File without changes
|