@@ -68,10 +68,6 @@ def __init__(
6868 self .twitter_channel = twitter_channel
6969 self .infe_channel = inference_channel
7070 self .env = SocialEnvironment (SocialAction (agent_id , twitter_channel ))
71- self .system_message = BaseMessage .make_assistant_message (
72- role_name = "User" ,
73- content = self .user_info .to_system_message (action_space_prompt ),
74- )
7571 self .model_type = model_type
7672 self .is_openai_model = is_openai_model
7773 if self .is_openai_model :
@@ -93,7 +89,7 @@ def __init__(
9389 )
9490 self .memory = ChatHistoryMemory (context_creator , window_size = 5 )
9591 self .system_message = BaseMessage .make_assistant_message (
96- role_name = "system " ,
92+ role_name = "A Humorous Twitter User " ,
9793 content = self .user_info .to_system_message (
9894 action_space_prompt ), # system prompt
9995 )
@@ -114,7 +110,7 @@ async def perform_action_by_llm(self):
114110 # Get posts:
115111 env_prompt = await self .env .to_text_prompt ()
116112 user_msg = BaseMessage .make_user_message (
117- role_name = "User" ,
113+ role_name = "A Humorous Twitter User" ,
118114 # content=(
119115 # f"Please perform social media actions after observing the "
120116 # f"platform environments. Notice that don't limit your "
@@ -146,14 +142,15 @@ async def perform_action_by_llm(self):
146142 "role" : self .system_message .role_name ,
147143 "content" : self .system_message .content ,
148144 }] + [user_msg .to_openai_user_message ()]
149- agent_log .info (
150- f"Agent { self .agent_id } is running with prompt: { openai_messages } " )
145+ # agent_log.info(
146+ # f"Agent {self.agent_id} is running with prompt: "
147+ # f"{openai_messages}")
151148
152149 if self .is_openai_model :
153150 try :
154151 response = await self .model_backend ._arun (
155152 openai_messages , tools = self .full_tool_schemas )
156- agent_log .info (f"Agent { self .agent_id } response: { response } " )
153+ # agent_log.info(f"Agent {self.agent_id} response: {response}")
157154 content = response
158155 for tool_call in response .choices [0 ].message .tool_calls :
159156 action_name = tool_call .function .name
0 commit comments