Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
37285b87
Commit
37285b87
authored
Jul 08, 2024
by
Timothy J. Baek
Browse files
fix: do not include reserved params in specs
parent
0a08a4d2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
backend/utils/tools.py
backend/utils/tools.py
+4
-1
No files found.
backend/utils/tools.py
View file @
37285b87
...
@@ -59,7 +59,10 @@ def get_tools_specs(tools) -> List[dict]:
...
@@ -59,7 +59,10 @@ def get_tools_specs(tools) -> List[dict]:
for
param_name
,
param_annotation
in
get_type_hints
(
for
param_name
,
param_annotation
in
get_type_hints
(
function
function
).
items
()
).
items
()
if
param_name
!=
"return"
and
param_name
!=
"__user__"
if
param_name
!=
"return"
and
not
(
param_name
.
startswith
(
"__"
)
and
param_name
.
endswith
(
"__"
)
)
},
},
"required"
:
[
"required"
:
[
name
name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment