From f919ae0d2c931e9ad078bfb914377e851c9cdffb Mon Sep 17 00:00:00 2001 From: Amjith Ramanujam Date: Sun, 29 Dec 2024 08:41:12 -0800 Subject: [PATCH 1/3] Show the default model when listing all available models. --- llm/cli.py | 1 + 1 file changed, 1 insertion(+) diff --git a/llm/cli.py b/llm/cli.py index f4a9d32c..5d56d31c 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -1078,6 +1078,7 @@ def models(): @click.option("async_", "--async", is_flag=True, help="List async models") def models_list(options, async_): "List available models" + click.echo(f"Default: {get_default_model()}") models_that_have_shown_options = set() for model_with_aliases in get_models_with_aliases(): if async_ and not model_with_aliases.async_model: From cf8e3e3bc852500c0ea89b1e6ec9f9816ea547b7 Mon Sep 17 00:00:00 2001 From: Amjith Ramanujam Date: Sun, 29 Dec 2024 11:15:28 -0800 Subject: [PATCH 2/3] Update docs. --- docs/usage.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage.md b/docs/usage.md index 4ac07e85..4e18fefb 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -265,6 +265,7 @@ result = CliRunner().invoke(cli, ["models", "list", "--options"]) cog.out("```\n{}\n```".format(result.output)) ]]] --> ``` +Default: gpt-4o-mini OpenAI Chat: gpt-4o (aliases: 4o) Options: temperature: float From 00c91b60f13e362e05a92bad5db7c4db19fbf051 Mon Sep 17 00:00:00 2001 From: Amjith Ramanujam Date: Sun, 29 Dec 2024 11:48:25 -0800 Subject: [PATCH 3/3] Switch default to the end. --- docs/usage.md | 2 +- llm/cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 4e18fefb..e1a4bb3f 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -265,7 +265,6 @@ result = CliRunner().invoke(cli, ["models", "list", "--options"]) cog.out("```\n{}\n```".format(result.output)) ]]] --> ``` -Default: gpt-4o-mini OpenAI Chat: gpt-4o (aliases: 4o) Options: temperature: float @@ -518,6 +517,7 @@ OpenAI Completion: gpt-3.5-turbo-instruct (aliases: 3.5-instruct, chatgpt-instru Integer seed to attempt to sample deterministically logprobs: int Include the log probabilities of most likely N per token +Default: gpt-4o-mini ``` diff --git a/llm/cli.py b/llm/cli.py index 5d56d31c..31936676 100644 --- a/llm/cli.py +++ b/llm/cli.py @@ -1078,7 +1078,6 @@ def models(): @click.option("async_", "--async", is_flag=True, help="List async models") def models_list(options, async_): "List available models" - click.echo(f"Default: {get_default_model()}") models_that_have_shown_options = set() for model_with_aliases in get_models_with_aliases(): if async_ and not model_with_aliases.async_model: @@ -1122,6 +1121,7 @@ def models_list(options, async_): ) output += "\n Attachment types:\n{}".format(wrapper.fill(attachment_types)) click.echo(output) + click.echo(f"Default: {get_default_model()}") @models.command(name="default")