File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 88
99 % Define the headers for the API request
1010
11- headers = [matlab .net .http .HeaderField(' Content-Type' , ' application/json' );
11+ headers = [matlab .net .http .HeaderField(' Content-Type' , ' application/json' )...
1212 matlab .net .http .HeaderField(' Authorization' , " Bearer " + token )];
1313 % Define the request message
1414 request = matlab .net .http .RequestMessage(' post' ,headers ,parameters );
Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ function generateAcceptsSingleStringAsInput(testCase)
2828 testCase .verifyWarningFree(@()generate(chat ," This is okay" ));
2929 end
3030
31+ function generateAcceptsMessagesAsInput(testCase )
32+ chat = openAIChat(ApiKey = " this-is-not-a-real-key" );
33+ messages = openAIMessages ;
34+ messages = addUserMessage(messages , " This should be okay." );
35+ testCase .verifyWarningFree(@()generate(chat ,messages ));
36+ end
37+
3138 function keyNotFound(testCase )
3239 testCase .verifyError(@()openAIChat , " llms:keyMustBeSpecified" );
3340 end
You can’t perform that action at this time.
0 commit comments