diff --git a/src/comai/ollama.py b/src/comai/ollama.py new file mode 100644 index 0000000..8a1d99a --- /dev/null +++ b/src/comai/ollama.py @@ -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