chore: Tweak composio log levels (#1976)

This commit is contained in:
Matthew Zhou
2024-11-03 11:42:01 -08:00
committed by GitHub
parent 564f0ace0f
commit a3f26519c3
2 changed files with 4 additions and 3 deletions

View File

@@ -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"

View File

@@ -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: