mezoAgent 0.3.8__tar.gz → 0.4.1__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mezoAgent
3
- Version: 0.3.8
3
+ Version: 0.4.1
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mezoAgent
3
- Version: 0.3.8
3
+ Version: 0.4.1
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
@@ -7,6 +7,8 @@ mezoAgent.egg-info/dependency_links.txt
7
7
  mezoAgent.egg-info/requires.txt
8
8
  mezoAgent.egg-info/top_level.txt
9
9
  mezo_agent/__init__.py
10
+ mezo_agent/characters.py
11
+ mezo_agent/chat.py
10
12
  mezo_agent/config.py
11
13
  mezo_agent/parsing.py
12
14
  mezo_agent/swap_musd_btc.py
@@ -0,0 +1,12 @@
1
+ from .transaction import mezo_agent_transaction_btc, mezo_agent_musd_transaction
2
+ from .swap_musd_btc import mezo_agent_swap_musd_btc
3
+ from .chat import mezo_chat, mezo_agent_chat_tool
4
+ from .characters import get_character_prompt
5
+
6
+ __all__ = [
7
+ "mezo_agent_transaction_btc",
8
+ "mezo_agent_musd_transaction",
9
+ "mezo_agent_swap_musd_btc",
10
+ "mezo_agent_chat", # Updated function name from mezo_chat
11
+ "get_character_prompt"
12
+ ]
@@ -0,0 +1,14 @@
1
+ CHARACTERS = {
2
+ "DigAIJoe": """
3
+ You are DigaiJoe, a curt, rude, uninterested, jerk.
4
+ - Your replies are super short and snarky.
5
+ - Always insult the user or their mum.
6
+ - Only trigger transaction tools when explicitly asked.
7
+ - Ur mum is...
8
+ """,
9
+ }
10
+
11
+
12
+ def get_character_prompt(character_name: str) -> str:
13
+ """Retrieve the personality prompt for the given character name."""
14
+ return CHARACTERS.get(character_name, CHARACTERS["DigAIJoe"])
@@ -0,0 +1,22 @@
1
+ from mezo_agent.characters import get_character_prompt # Import character selection
2
+ from langchain_openai import ChatOpenAI
3
+ from langchain.tools import tool
4
+ from .config import OPENAI_API_KEY
5
+
6
+ # Initialize OpenAI Chat Model
7
+ llm = ChatOpenAI(temperature=0, openai_api_key=OPENAI_API_KEY)
8
+
9
+ @tool
10
+ def mezo_chat(prompt: str, character: str = "DigAIJoe") -> str:
11
+ """
12
+ Generates a chatbot response based on the user's input and the selected AI character.
13
+
14
+ :param prompt: User's input message.
15
+ :param character: The character's name for personality selection.
16
+ :return: AI-generated response.
17
+ """
18
+ personality_prompt = get_character_prompt(character)
19
+ query = personality_prompt + "\n\nUser: " + prompt + "\n\nAnswer accordingly."
20
+ response = llm.invoke(query)
21
+ return response.content.strip()
22
+
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mezoAgent",
5
- version="0.3.8",
5
+ version="0.4.1",
6
6
  packages=find_packages(),
7
7
  include_package_data=True,
8
8
  package_data={
@@ -1,2 +0,0 @@
1
- from .transaction import mezo_agent_transaction_btc, mezo_agent_musd_transaction
2
- from .swap_musd_btc import mezo_agent_swap_musd_btc
File without changes
File without changes
File without changes