Skip to content

Commit 79bf43e

Browse files
committed
Updated to support gpt-4o
1 parent 2eb2199 commit 79bf43e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The functionality shown here serves as an interface to the ChatGPT and DALL·E A
88

99
Some of the current LLMs supported are:
1010
- gpt-3.5-turbo, gpt-3.5-turbo-1106, gpt-3.5-turbo-0125
11+
- gpt-4o, gpt-4o-2024-05-13 (GPT-4 Omini)
1112
- gpt-4-turbo, gpt-4-turbo-2024-04-09 (GPT-4 Turbo with Vision)
1213
- gpt-4, gpt-4-0613
1314
- dall-e-2, dall-e-3
Binary file not shown.

openAIChat.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
arguments
115115
systemPrompt {llms.utils.mustBeTextOrEmpty} = []
116116
nvp.Tools (1,:) {mustBeA(nvp.Tools, "openAIFunction")} = openAIFunction.empty
117-
nvp.ModelName (1,1) {mustBeMember(nvp.ModelName,["gpt-4-turbo", ...
117+
nvp.ModelName (1,1) {mustBeMember(nvp.ModelName,["gpt-4o", ...
118+
"gpt-4o-2024-05-13","gpt-4-turbo", ...
118119
"gpt-4-turbo-2024-04-09","gpt-4","gpt-4-0613", ...
119120
"gpt-3.5-turbo","gpt-3.5-turbo-0125", ...
120121
"gpt-3.5-turbo-1106"])} = "gpt-3.5-turbo"
@@ -217,7 +218,7 @@
217218
end
218219

219220
if iscell(messagesStruct{end}.content) && any(cellfun(@(x) isfield(x,"image_url"), messagesStruct{end}.content))
220-
if ~ismember(this.ModelName,["gpt-4-turbo","gpt-4-turbo-2024-04-09"])
221+
if ~ismember(this.ModelName,["gpt-4-turbo","gpt-4-turbo-2024-04-09","gpt-4o","gpt-4o-2024-05-13"])
221222
error("llms:invalidContentTypeForModel", ...
222223
llms.utils.errorMessageCatalog.getMessage("llms:invalidContentTypeForModel", "Image content", this.ModelName));
223224
end

0 commit comments

Comments
 (0)