diff --git a/tests/topenAIChat.m b/tests/topenAIChat.m index bdcffe7..92e62db 100644 --- a/tests/topenAIChat.m +++ b/tests/topenAIChat.m @@ -77,6 +77,12 @@ function errorsWhenPassingToolChoiceWithEmptyTools(testCase) testCase.verifyError(@()generate(chat,"input", ToolChoice="bla"), "llms:mustSetFunctionsForCall"); end + function errorsWhenPassingToolChoiceWithNone(testCase) + functions = openAIFunction("funName"); + chat = openAIChat(ApiKey="this-is-not-a-real-key",Tools=functions); + testCase.verifyWarningFree(@()generate(chat,"This is okay","ToolChoice","none")); + end + function invalidInputsConstructor(testCase, InvalidConstructorInput) testCase.verifyError(@()openAIChat(InvalidConstructorInput.Input{:}), InvalidConstructorInput.Error); end