Skip to content

Commit

Permalink
cli: Add default to interactive flow in new command (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
eyurtsev authored Nov 12, 2024
1 parent 2bcf1c0 commit cb10437
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libs/cli/langgraph_cli/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ def _choose_template() -> str:
click.secho(template_name, fg="cyan", nl=False)
click.secho(f" - {template_info['description']}", fg="white")

# Get the template choice from user
template_choice: int = click.prompt(
"Enter the number of your template choice", type=int
# Get the template choice from the user, defaulting to the first template if blank
template_choice: Optional[int] = click.prompt(
"Enter the number of your template choice (default is 1)",
type=int,
default=1,
show_default=False,
)

template_keys = list(TEMPLATES.keys())
Expand Down

0 comments on commit cb10437

Please sign in to comment.