get_tool_snippet#

Build typed tools from annotations and docstrings. See the guide.

zett_agent.tools.base.get_tool_snippet(function)[源代码]#

Extract the Snippet section from a function docstring.

参数:

function (Callable[[...], Any]) -- Undecorated Python function whose docstring follows the tool documentation format.

返回:

The normalized snippet, or an empty string when the section is absent.

返回类型:

str