mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-28 08:54:46 +00:00
llm models --tools filter
This commit is contained in:
parent
e8894b19f5
commit
288dcb8d46
2 changed files with 5 additions and 1 deletions
|
|
@ -379,6 +379,7 @@ Options:
|
|||
--options Show options for each model, if available
|
||||
--async List async models
|
||||
--schemas List models that support schemas
|
||||
--tools List models that support tools
|
||||
-q, --query TEXT Search for models matching these strings
|
||||
-m, --model TEXT Specific model IDs
|
||||
--help Show this message and exit.
|
||||
|
|
|
|||
|
|
@ -1786,6 +1786,7 @@ _type_lookup = {
|
|||
)
|
||||
@click.option("async_", "--async", is_flag=True, help="List async models")
|
||||
@click.option("--schemas", is_flag=True, help="List models that support schemas")
|
||||
@click.option("--tools", is_flag=True, help="List models that support tools")
|
||||
@click.option(
|
||||
"-q",
|
||||
"--query",
|
||||
|
|
@ -1793,7 +1794,7 @@ _type_lookup = {
|
|||
help="Search for models matching these strings",
|
||||
)
|
||||
@click.option("model_ids", "-m", "--model", help="Specific model IDs", multiple=True)
|
||||
def models_list(options, async_, schemas, query, model_ids):
|
||||
def models_list(options, async_, schemas, tools, query, model_ids):
|
||||
"List available models"
|
||||
models_that_have_shown_options = set()
|
||||
for model_with_aliases in get_models_with_aliases():
|
||||
|
|
@ -1811,6 +1812,8 @@ def models_list(options, async_, schemas, query, model_ids):
|
|||
continue
|
||||
if schemas and not model_with_aliases.model.supports_schema:
|
||||
continue
|
||||
if tools and not model_with_aliases.model.supports_tools:
|
||||
continue
|
||||
extra_info = []
|
||||
if model_with_aliases.aliases:
|
||||
extra_info.append(
|
||||
|
|
|
|||
Loading…
Reference in a new issue