add: 添加命令ai model list的逻辑

This commit is contained in:
taylor
2024-10-13 19:23:40 +08:00
parent b934cd399b
commit 5327e9b572
2 changed files with 5 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ class Ollama(Platform):
if response.status != 200:
return []
response_data = await response.json()
return [f"{i + 1}: {model['name']}" for i, model in enumerate(response_data['models'])]
return [f"- {model['model']}" for model in response_data['models']]
def get_type(self) -> str:
return "local_ai"