Merge branch 'main' into gemini-editblock-and-examples

This commit is contained in:
Paul Gauthier 2024-05-03 13:17:23 -07:00
commit 921c7ceb80
21 changed files with 323 additions and 91 deletions

View file

@ -431,6 +431,20 @@ def fuzzy_match_models(name):
return list(zip(matching_models, matching_models))
def print_matching_models(io, search):
matches = fuzzy_match_models(search)
if matches:
io.tool_output(f'Models which match "{search}":')
for model in matches:
fq, m = model
if fq == m:
io.tool_output(f"- {m}")
else:
io.tool_output(f"- {m} ({fq})")
else:
io.tool_output(f'No models match "{search}".')
def main():
if len(sys.argv) != 2:
print("Usage: python models.py <model_name>")