Skip to content

Commit 314f4dc

Browse files
committed
Add Ollama ResponseError message
1 parent 5ddec56 commit 314f4dc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

operate/models/apis.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ def call_ollama_llava(messages):
527527

528528
return content
529529

530+
except ollama.ResponseError as e:
531+
print(
532+
f"{ANSI_GREEN}[Self-Operating Computer]{ANSI_RED}[Operate] Couldn't connect to Ollama. With Ollama installed, run `ollama pull llava` then `ollama serve`{ANSI_RESET}",
533+
e,
534+
)
535+
530536
except Exception as e:
531537
print(
532538
f"{ANSI_GREEN}[Self-Operating Computer]{ANSI_BRIGHT_MAGENTA}[Operate] That did not work. Trying again {ANSI_RESET}",

0 commit comments

Comments
 (0)