From 823db3fe0b2e697cfb002a63855335a3f79de775 Mon Sep 17 00:00:00 2001 From: Azin Asgarian <31479845+azinasg@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:23:15 -0500 Subject: [PATCH] Remove the missing arg name from create_tool() in client.py his commit modifies the create_tool method to automatically derive the name of the tool from the function's __name__ attribute instead of requiring it as a parameter. --- letta/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letta/client/client.py b/letta/client/client.py index 485cc6f9c5..07fb48a0e9 100644 --- a/letta/client/client.py +++ b/letta/client/client.py @@ -2968,7 +2968,6 @@ def create_tool( Args: func (callable): The function to create a tool for. - name: (str): Name of the tool (must be unique per-user.) tags (Optional[List[str]], optional): Tags for the tool. Defaults to None. description (str, optional): The description. return_char_limit (int): The character limit for the tool's return value. Defaults to FUNCTION_RETURN_CHAR_LIMIT. @@ -2981,6 +2980,7 @@ def create_tool( # parse source code/schema source_code = parse_source_code(func) source_type = "python" + name = func.__name__ # Initialize name using function's __name__ if not tags: tags = []