mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
added /models cmd
This commit is contained in:
parent
e610e5bd0a
commit
050d35790e
3 changed files with 26 additions and 12 deletions
|
@ -409,6 +409,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>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue