Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

chore: Tweak composio log levels (#1976)

Matthew Zhoua3f26519c388
diff --git a/letta/schemas/tool.py b/letta/schemas/tool.py
index effbd7926..e7277aa6b 100644
--- a/letta/schemas/tool.py
+++ b/letta/schemas/tool.py
@@ -1,5 +1,6 @@
from typing import Dict, List, Optional
+from composio import LogLevel
from pydantic import Field
from letta.functions.helpers import (
@@ -84,7 +85,7 @@ class ToolCreate(LettaBase):
"""
from composio_langchain import ComposioToolSet
- composio_toolset = ComposioToolSet()
+ composio_toolset = ComposioToolSet(logging_level=LogLevel.ERROR)
composio_tools = composio_toolset.get_tools(actions=[action])
assert len(composio_tools) > 0, "User supplied parameters do not match any Composio tools"
diff --git a/letta/services/tool_manager.py b/letta/services/tool_manager.py
index 7658464cd..cee451df2 100644
--- a/letta/services/tool_manager.py
+++ b/letta/services/tool_manager.py
@@ -12,7 +12,7 @@ from letta.orm.tool import Tool as ToolModel
from letta.schemas.tool import Tool as PydanticTool
from letta.schemas.tool import ToolCreate, ToolUpdate
from letta.schemas.user import User as PydanticUser
-from letta.utils import enforce_types
+from letta.utils import enforce_types, printd
class ToolManager:
@@ -54,7 +54,7 @@ class ToolManager:
if update_data:
self.update_tool_by_id(tool.id, ToolUpdate(**update_data), actor)
else:
- warnings.warn(
+ printd(
f"`create_or_update_tool` was called with user_id={actor.id}, organization_id={actor.organization_id}, name={tool_create.name}, but found existing tool with nothing to update."
)
except NoResultFound: