fix: bad print in common cli (#2200)

This commit is contained in:
Charles Packer
2024-12-08 23:14:18 -08:00
committed by GitHub
parent 059177bb72
commit fffdf1cc74
2 changed files with 7 additions and 1 deletions

View File

@@ -187,7 +187,7 @@ class SqlalchemyBase(CommonSqlalchemyMetaMixins, Base):
logger.exception(f"Failed to hard delete {self.__class__.__name__} with ID {self.id}")
raise ValueError(f"Failed to hard delete {self.__class__.__name__} with ID {self.id}: {e}")
else:
logger.info(f"{self.__class__.__name__} with ID {self.id} successfully hard deleted")
logger.debug(f"{self.__class__.__name__} with ID {self.id} successfully hard deleted")
def update(self, db_session: "Session", actor: Optional["User"] = None) -> Type["SqlalchemyBase"]:
logger.debug(f"Updating {self.__class__.__name__} with ID: {self.id} with actor={actor}")

View File

@@ -292,6 +292,12 @@ def test_messages(client: Union[LocalClient, RESTClient], agent: AgentState):
assert len(messages_response) > 0, "Retrieving messages failed"
def test_send_system_message(client: Union[LocalClient, RESTClient], agent: AgentState):
"""Important unit test since the Letta API exposes sending system messages, but some backends don't natively support it (eg Anthropic)"""
send_system_message_response = client.send_message(agent_id=agent.id, message="Event occured: The user just logged off.", role="system")
assert send_system_message_response, "Sending message failed"
@pytest.mark.asyncio
async def test_send_message_parallel(client: Union[LocalClient, RESTClient], agent: AgentState, request):
"""