Build and run agents you can see, understand and trust.
Python agentchatbotlarge-language-modelsllmllm-agentmcpmulti-agentmulti-modalreact-agentrealtime-agentvoice-agentvoice-assistant
feat(toolkit): add `original_name` field in `RegisteredToolFunction` class (#1028)
qbc80714633e275
diff --git a/src/agentscope/tool/_toolkit.py b/src/agentscope/tool/_toolkit.pyindex 60abbb1c1..13e499172 100644--- a/src/agentscope/tool/_toolkit.py+++ b/src/agentscope/tool/_toolkit.py@@ -425,6 +425,7 @@ Check "{dir}/SKILL.md" for how to use this skill""")# Replace the function name with the new one+ func_obj.original_name = func_namefunc_obj.name = new_func_namefunc_obj.json_schema["function"]["name"] = new_func_namediff --git a/src/agentscope/tool/_types.py b/src/agentscope/tool/_types.pyindex 4c7cef8a8..7d8a52d54 100644--- a/src/agentscope/tool/_types.py+++ b/src/agentscope/tool/_types.py@@ -31,6 +31,8 @@ class RegisteredToolFunction:)"""The preset keyword arguments, which won't be presented in the JSONschema and exposed to the user."""+ original_name: str | None = None+ """The original name of the tool function when it has been renamed."""extended_model: Type[BaseModel] | None = None"""The base model used to extend the JSON schema of the original toolfunction, so that we can dynamically adjust the tool function."""