ollama / ollama-python

Ollama Python library
https://ollama.com
MIT License
4.08k stars 342 forks source link

Getting ConnectError: [Errno 111] Connection refused #200

Closed MDABUSAYED closed 2 months ago

MDABUSAYED commented 3 months ago

After installing Ollama Python library when I execute this code import ollama response = ollama.chat(model='llama3', messages=[ { 'role': 'user', 'content': 'Why is the sky blue?', }, ]) print(response['message']['content'])

Get following error previously -> "ConnectError: [Errno 111] Connection refused" Now error change to -> "ResponseError: model 'llama3' not found, try pulling it first" My python version 3.8.10

ankitdata commented 2 months ago

@MDABUSAYED , Are you able to resolve this issue.

MDABUSAYED commented 2 months ago

Yes.

DanielAbdelNour commented 1 month ago

@MDABUSAYED how did you resolve it?