Skip to content

Commit 1143480

Browse files
committed
Ollama model list fix and a typo
1 parent 6ee0586 commit 1143480

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

interpreter/terminal_interface/local_setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def download_model(models_dir, models, interpreter):
7272
},
7373
{
7474
"name": "Mistral-7B-Instruct",
75-
"file_name": "Mistral-7B-Instruct-v0.3.Q5_K_M.llamafile",
75+
"file_name": "Mistral-7B-Instruct-v0.3.Q4_K_M.llamafile",
7676
"size": 4.40,
7777
"url": "https://huggingface.co/Mozilla/Mistral-7B-Instruct-v0.3-llamafile/resolve/main/Mistral-7B-Instruct-v0.3.Q4_K_M.llamafile?download=true",
7878
},
@@ -241,10 +241,11 @@ def download_model(models_dir, models, interpreter):
241241
["ollama", "list"], capture_output=True, text=True, check=True
242242
)
243243
lines = result.stdout.split("\n")
244+
244245
names = [
245246
line.split()[0].replace(":latest", "")
246-
for line in lines[1:]
247-
if line.strip()
247+
for line in lines
248+
if line.strip() and not line.startswith("failed to get console mode") and not line.startswith("NAME")
248249
] # Extract names, trim out ":latest", skip header
249250

250251
if "llama3" in names:

0 commit comments

Comments
 (0)