From 1e22f2e118a895b0a098ca64ad4757548970775b Mon Sep 17 00:00:00 2001 From: jmorganca Date: Sat, 23 Nov 2024 18:22:38 -0800 Subject: [PATCH] add test case for explicit None --- ollama/_types.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ollama/_types.py b/ollama/_types.py index 89a74f0..5be4850 100644 --- a/ollama/_types.py +++ b/ollama/_types.py @@ -45,6 +45,9 @@ class SubscriptableBaseModel(BaseModel): >>> msg['tool_calls'] = [Message.ToolCall(function=Message.ToolCall.Function(name='foo', arguments={}))] >>> 'tool_calls' in msg True + >>> msg['tool_calls'] = None + >>> 'tool_calls' in msg + True >>> tool = Tool() >>> 'type' in tool True