From 5505b32049baa0ec1697703ce567541fabed5611 Mon Sep 17 00:00:00 2001 From: Toshiaki Takeuchi Date: Thu, 29 Feb 2024 17:25:58 -0500 Subject: [PATCH] Fix Typo toolChoice, not ToolChoice --- openAIChat.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openAIChat.m b/openAIChat.m index 55c19a5..aced1cb 100644 --- a/openAIChat.m +++ b/openAIChat.m @@ -311,7 +311,7 @@ function mustBeValidFunctionCall(this, functionCall) if ~isempty(this.Tools) toolChoice = "auto"; end - elseif ~ismember(ToolChoice,["auto","none"]) + elseif ~ismember(toolChoice,["auto","none"]) % if toolChoice is not empty, then it must be "auto", "none" or in the format % {"type": "function", "function": {"name": "my_function"}} toolChoice = struct("type","function","function",struct("name",toolChoice));