client: improve error messaging on connection failure (#398)

*iImprove error messaging on connection failure
This commit is contained in:
Parth Sareen
2025-01-16 13:55:17 -08:00
committed by GitHub
parent 12d6842f32
commit 967fd657f1
4 changed files with 46 additions and 9 deletions
+4 -4
View File
@@ -2,9 +2,9 @@ from ollama import Client
client = Client()
response = client.create(
model='my-assistant',
from_='llama3.2',
system="You are mario from Super Mario Bros.",
stream=False
model='my-assistant',
from_='llama3.2',
system='You are mario from Super Mario Bros.',
stream=False,
)
print(response.status)