From b4e7957a007ef43e07293e096a429070282ecb81 Mon Sep 17 00:00:00 2001 From: Michael Poluektov Date: Fri, 22 Nov 2024 20:51:16 +0000 Subject: [PATCH] docstring quickfix --- backend/open_webui/utils/tools.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 2c6d53e3b..3cdcf15bf 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -109,9 +109,12 @@ def parse_docstring(docstring): for line in docstring.splitlines(): match = param_pattern.match(line.strip()) - if match: - param_name, param_description = match.groups() - param_descriptions[param_name] = param_description + if not match: + continue + param_name, param_description = match.groups() + if param_name.startswith("__"): + continue + param_descriptions[param_name] = param_description return param_descriptions