ollama/ollama/model.py
Michael Yang 1ae91f75f0 refactor
2023-06-27 13:36:30 -07:00

9 lines
270 B
Python

from os import walk, path
def models(models_home='.', *args, **kwargs):
for root, _, files in walk(models_home):
for file in files:
base, ext = path.splitext(file)
if ext == '.bin':
yield base, path.join(root, file)