From 493fe562aca7498de1cac0dc27a99093e9e32a9d Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Mon, 17 Jun 2024 14:39:21 -0700 Subject: [PATCH] refac --- backend/utils/task.py | 6 ++++++ src/lib/components/workspace/Models/ToolsSelector.svelte | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/utils/task.py b/backend/utils/task.py index ea277eb0b..053a526a8 100644 --- a/backend/utils/task.py +++ b/backend/utils/task.py @@ -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 diff --git a/src/lib/components/workspace/Models/ToolsSelector.svelte b/src/lib/components/workspace/Models/ToolsSelector.svelte index 584e737c5..5f1b3b482 100644 --- a/src/lib/components/workspace/Models/ToolsSelector.svelte +++ b/src/lib/components/workspace/Models/ToolsSelector.svelte @@ -33,9 +33,9 @@
{#if tools.length > 0} -
+
{#each Object.keys(_tools) as tool, toolIdx} -
+