Skip to content

Commit 50ffa04

Browse files
committed
add default for depth
1 parent 419aadd commit 50ffa04

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/selectors.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ def prompt_options(self, prompt: dict = {}, step_number: int = 0):
196196
key=f"websearch_{step_number}",
197197
)
198198
if websearch:
199+
try:
200+
default_depth = int(prompt["websearch_depth"])
201+
except:
202+
default_depth = 2
199203
websearch_depth = st.number_input(
200204
"Websearch depth",
201205
min_value=1,
202-
value=(
203-
3
204-
if "websearch_depth" not in prompt
205-
else int(prompt["websearch_depth"])
206-
),
206+
value=int(default_depth),
207207
key=f"websearch_depth_{step_number}",
208208
)
209209
else:

0 commit comments

Comments
 (0)