From 1f68bae4830fc040e7e01f97bc3bd1f84df2c241 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 11 Jan 2024 09:35:10 -0800 Subject: [PATCH] wording --- ollama/_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ollama/_client.py b/ollama/_client.py index 35f6f2c..14608ba 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -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'):