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
493fe562
Commit
493fe562
authored
Jun 17, 2024
by
Timothy J. Baek
Browse files
refac
parent
b1d83fc4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
backend/utils/task.py
backend/utils/task.py
+6
-0
src/lib/components/workspace/Models/ToolsSelector.svelte
src/lib/components/workspace/Models/ToolsSelector.svelte
+2
-2
No files found.
backend/utils/task.py
View file @
493fe562
...
...
@@ -24,10 +24,16 @@ def prompt_template(
if
user_name
:
# Replace {{USER_NAME}} in the template with the user's name
template
=
template
.
replace
(
"{{USER_NAME}}"
,
user_name
)
else
:
# Replace {{USER_NAME}} in the template with "Unknown"
template
=
template
.
replace
(
"{{USER_NAME}}"
,
"Unknown"
)
if
user_location
:
# Replace {{USER_LOCATION}} in the template with the current location
template
=
template
.
replace
(
"{{USER_LOCATION}}"
,
user_location
)
else
:
# Replace {{USER_LOCATION}} in the template with "Unknown"
template
=
template
.
replace
(
"{{USER_LOCATION}}"
,
"Unknown"
)
return
template
...
...
src/lib/components/workspace/Models/ToolsSelector.svelte
View file @
493fe562
...
...
@@ -33,9 +33,9 @@
<div class="flex flex-col">
{#if tools.length > 0}
<div class=" flex items-center
gap-2 mt-2
">
<div class=" flex items-center
mt-2 flex-wrap
">
{#each Object.keys(_tools) as tool, toolIdx}
<div class=" flex items-center gap-2">
<div class=" flex items-center gap-2
mr-3
">
<div class="self-center flex items-center">
<Checkbox
state={_tools[tool].selected ? 'checked' : 'unchecked'}
...
...
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