mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 06:15:23 +00:00
pass docstring to function
This commit is contained in:
parent
528df12bf1
commit
5edc211392
1 changed files with 4 additions and 3 deletions
|
|
@ -60,9 +60,10 @@ def get_tools(
|
||||||
function_name = spec["name"]
|
function_name = spec["name"]
|
||||||
|
|
||||||
# convert to function that takes only model params and inserts custom params
|
# convert to function that takes only model params and inserts custom params
|
||||||
callable = apply_extra_params_to_tool_function(
|
original_func = getattr(module, function_name)
|
||||||
getattr(module, function_name), extra_params
|
callable = apply_extra_params_to_tool_function(original_func, extra_params)
|
||||||
)
|
if hasattr(original_func, "__doc__"):
|
||||||
|
callable.__doc__ = original_func.__doc__
|
||||||
|
|
||||||
# TODO: This needs to be a pydantic model
|
# TODO: This needs to be a pydantic model
|
||||||
tool_dict = {
|
tool_dict = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue