Skip to content

Commit e201181

Browse files
authored
Merge pull request #34 from chenxizhang/patch-1
error handling code
2 parents f618a2f + c077b5d commit e201181

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ model = 'does-not-yet-exist'
162162
try:
163163
ollama.chat(model)
164164
except ollama.ResponseError as e:
165-
print('Error:', e.content)
165+
print('Error:', e.error)
166166
if e.status_code == 404:
167167
ollama.pull(model)
168168
```

0 commit comments

Comments
 (0)