File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 119
119
120
120
parameters.stream = ~isempty(nvp .StreamFun );
121
121
122
- if ~isempty(functions ) && ~strcmp( nvp . ModelName , ' gpt-4-vision-preview ' )
122
+ if ~isempty(functions )
123
123
parameters.tools = functions ;
124
124
end
125
125
126
- if ~isempty(nvp .ToolChoice ) && ~strcmp( nvp . ModelName , ' gpt-4-vision-preview ' )
126
+ if ~isempty(nvp .ToolChoice )
127
127
parameters.tool_choice = nvp .ToolChoice ;
128
128
end
129
129
130
- if ismember(nvp .ModelName ,[" gpt-3.5-turbo-1106" ," gpt-4-1106-preview" ])
131
- if strcmp(nvp .ResponseFormat ," json" )
132
- parameters.response_format = struct(' type' ,' json_object' );
133
- end
130
+ if strcmp(nvp .ResponseFormat ," json" )
131
+ parameters.response_format = struct(' type' ,' json_object' );
134
132
end
135
133
136
134
if ~isempty(nvp .Seed )
142
140
dict = mapNVPToParameters ;
143
141
144
142
nvpOptions = keys(dict );
145
- if strcmp(nvp .ModelName ,' gpt-4-vision-preview' )
146
- nvpOptions(ismember(nvpOptions ," StopSequences" )) = [];
147
- end
148
143
149
144
for opt = nvpOptions .'
150
145
if isfield(nvp , opt )
You can’t perform that action at this time.
0 commit comments