Skip to content

Commit

Permalink
fix: bad print in common cli (#2200)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacker authored Dec 9, 2024
1 parent 8633c7b commit 061b662
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion letta/orm/sqlalchemy_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def hard_delete(self, db_session: "Session", actor: Optional["User"] = None) ->
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}")
Expand Down
6 changes: 6 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 061b662

Please sign in to comment.