Skip to content

Commit

Permalink
add missing file ollama.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ricopinazo committed May 8, 2024
1 parent 3f382cb commit 6e9ae2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/comai/ollama.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import ollama


def get_ollama_model_names() -> list[str]:
models = ollama.list()["models"]
model_names = [model["name"] for model in models]
cleaned_model_names = [name.replace(":latest", "") for name in model_names]
return cleaned_model_names

0 comments on commit 6e9ae2b

Please sign in to comment.