Skip to content

Commit

Permalink
wording
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed Jan 11, 2024
1 parent d2ea72a commit 1f68bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ollama/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def chat(

for message in messages or []:
if not isinstance(message, dict):
raise TypeError('messages must be a list of strings')
raise TypeError('messages must be a list of Message or dict-like objects')
if not (role := message.get('role')) or role not in ['system', 'user', 'assistant']:
raise RequestError('messages must contain a role and it must be one of "system", "user", or "assistant"')
if not message.get('content'):
Expand Down

0 comments on commit 1f68bae

Please sign in to comment.