Skip to content

Commit

Permalink
Updated to support gpt-4o
Browse files Browse the repository at this point in the history
  • Loading branch information
toshiakit committed May 14, 2024
1 parent 2eb2199 commit 79bf43e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The functionality shown here serves as an interface to the ChatGPT and DALL·E A

Some of the current LLMs supported are:
- gpt-3.5-turbo, gpt-3.5-turbo-1106, gpt-3.5-turbo-0125
- gpt-4o, gpt-4o-2024-05-13 (GPT-4 Omini)
- gpt-4-turbo, gpt-4-turbo-2024-04-09 (GPT-4 Turbo with Vision)
- gpt-4, gpt-4-0613
- dall-e-2, dall-e-3
Expand Down
Binary file modified examples/RetrievalAugmentedGenerationUsingChatGPTandMATLAB.mlx
Binary file not shown.
5 changes: 3 additions & 2 deletions openAIChat.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@
arguments
systemPrompt {llms.utils.mustBeTextOrEmpty} = []
nvp.Tools (1,:) {mustBeA(nvp.Tools, "openAIFunction")} = openAIFunction.empty
nvp.ModelName (1,1) {mustBeMember(nvp.ModelName,["gpt-4-turbo", ...
nvp.ModelName (1,1) {mustBeMember(nvp.ModelName,["gpt-4o", ...
"gpt-4o-2024-05-13","gpt-4-turbo", ...
"gpt-4-turbo-2024-04-09","gpt-4","gpt-4-0613", ...
"gpt-3.5-turbo","gpt-3.5-turbo-0125", ...
"gpt-3.5-turbo-1106"])} = "gpt-3.5-turbo"
Expand Down Expand Up @@ -217,7 +218,7 @@
end

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

0 comments on commit 79bf43e

Please sign in to comment.