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
0250f69d
Commit
0250f69d
authored
Jun 23, 2024
by
Timothy J. Baek
Browse files
fix: valves
parent
5f2d37dc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
backend/apps/webui/models/functions.py
backend/apps/webui/models/functions.py
+1
-1
backend/apps/webui/models/tools.py
backend/apps/webui/models/tools.py
+1
-1
No files found.
backend/apps/webui/models/functions.py
View file @
0250f69d
...
@@ -146,7 +146,7 @@ class FunctionsTable:
...
@@ -146,7 +146,7 @@ class FunctionsTable:
def
get_function_valves_by_id
(
self
,
id
:
str
)
->
Optional
[
dict
]:
def
get_function_valves_by_id
(
self
,
id
:
str
)
->
Optional
[
dict
]:
try
:
try
:
function
=
Function
.
get
(
Function
.
id
==
id
)
function
=
Function
.
get
(
Function
.
id
==
id
)
return
function
.
valves
if
"valves"
in
function
and
function
.
valves
else
{}
return
function
.
valves
if
function
.
valves
else
{}
except
Exception
as
e
:
except
Exception
as
e
:
print
(
f
"An error occurred:
{
e
}
"
)
print
(
f
"An error occurred:
{
e
}
"
)
return
None
return
None
...
...
backend/apps/webui/models/tools.py
View file @
0250f69d
...
@@ -117,7 +117,7 @@ class ToolsTable:
...
@@ -117,7 +117,7 @@ class ToolsTable:
def
get_tool_valves_by_id
(
self
,
id
:
str
)
->
Optional
[
dict
]:
def
get_tool_valves_by_id
(
self
,
id
:
str
)
->
Optional
[
dict
]:
try
:
try
:
tool
=
Tool
.
get
(
Tool
.
id
==
id
)
tool
=
Tool
.
get
(
Tool
.
id
==
id
)
return
tool
.
valves
if
"valves"
in
tool
and
tool
.
valves
else
{}
return
tool
.
valves
if
tool
.
valves
else
{}
except
Exception
as
e
:
except
Exception
as
e
:
print
(
f
"An error occurred:
{
e
}
"
)
print
(
f
"An error occurred:
{
e
}
"
)
return
None
return
None
...
...
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