1
1
classdef errorMessageCatalog
2
- % This class is undocumented and will change in a future release
3
-
4
2
% errorMessageCatalog Stores the error messages from this repository
5
3
6
- % Copyright 2023 The MathWorks, Inc.
4
+ % Copyright 2023-2024 The MathWorks, Inc.
5
+
7
6
properties (Constant )
8
7
% CATALOG dictionary mapping error ids to error msgs
9
8
Catalog = buildErrorMessageCatalog;
10
9
end
11
10
12
11
methods (Static )
13
12
function msg = getMessage(messageId , slot )
14
- % This function is undocumented and will change in a future release
15
-
16
13
% getMessage returns error message given a messageID and a SLOT.
17
14
% The value in SLOT should be ordered, where the n-th element
18
15
% will replace the value "{n}".
47
44
catalog(" llms:stopSequencesMustHaveMax4Elements" ) = " Number of elements must not be larger than 4." ;
48
45
catalog(" llms:keyMustBeSpecified" ) = " API key not found as environment variable OPENAI_API_KEY and not specified via ApiKey parameter." ;
49
46
catalog(" llms:mustHaveMessages" ) = " Value must contain at least one message in Messages." ;
50
- catalog(" llms:mustSetFunctionsForCall" ) = " When no functions are defined, FunctionCall must not be specified." ;
47
+ catalog(" llms:mustSetFunctionsForCall" ) = " When no functions are defined, ToolChoice must not be specified." ;
51
48
catalog(" llms:mustBeMessagesOrTxt" ) = " Messages must be text with one or more characters or an openAIMessages objects." ;
52
- end
53
-
49
+ catalog(" llms:invalidOptionAndValueForModel" ) = " '{1}' with value '{2}' is not supported for ModelName '{3}'" ;
50
+ catalog(" llms:invalidOptionForModel" ) = " {1} is not supported for ModelName '{2}'" ;
51
+ catalog(" llms:functionNotAvailableForModel" ) = " This function is not supported for ModelName '{1}'" ;
52
+ catalog(" llms:promptLimitCharacter" ) = " Prompt must have a maximum length of {1} characters for ModelName '{2}'" ;
53
+ catalog(" llms:pngExpected" ) = " Argument must be a PNG image." ;
54
+ catalog(" llms:warningJsonInstruction" ) = " When using JSON mode, you must also prompt the model to produce JSON yourself via a system or user message." ;
55
+ end
0 commit comments