Skip to content

Commit

Permalink
Remove the missing arg name from create_tool() in client.py
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
azinasg authored Feb 12, 2025
1 parent 83ee41f commit 823db3f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion letta/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 = []

Expand Down

0 comments on commit 823db3f

Please sign in to comment.