From f20d3ba578dfe955fad0df706a46fc83a922db3e Mon Sep 17 00:00:00 2001 From: Vassilis Papanastasiou Date: Wed, 5 Jun 2024 11:42:58 +0100 Subject: [PATCH 1/6] Add testAnalyzeSentimentinTextUsingChatGPTinJSONMode --- tests/texampleTests.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/texampleTests.m b/tests/texampleTests.m index 6a07a3a..72f0483 100644 --- a/tests/texampleTests.m +++ b/tests/texampleTests.m @@ -53,6 +53,10 @@ function testAnalyzeTextDataUsingParallelFunctionCallwithChatGPT(~) function testRetrievalAugmentedGenerationUsingChatGPTandMATLAB(~) RetrievalAugmentedGenerationUsingChatGPTandMATLAB; end + + function testAnalyzeSentimentinTextUsingChatGPTinJSONMode(~) + AnalyzeSentimentinTextUsingChatGPTinJSONMode; + end end end From d8952b43d9f53f42521ea8d4b9475d64068e376f Mon Sep 17 00:00:00 2001 From: Vassilis Papanastasiou Date: Wed, 5 Jun 2024 11:51:24 +0100 Subject: [PATCH 2/6] Edit UsingDALLEToEditImages --- tests/texampleTests.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/texampleTests.m b/tests/texampleTests.m index 72f0483..6d574c8 100644 --- a/tests/texampleTests.m +++ b/tests/texampleTests.m @@ -57,6 +57,10 @@ function testRetrievalAugmentedGenerationUsingChatGPTandMATLAB(~) function testAnalyzeSentimentinTextUsingChatGPTinJSONMode(~) AnalyzeSentimentinTextUsingChatGPTinJSONMode; end + + function testUsingDALLEToEditImages(~) + UsingDALLEToEditImages; + end end end From 0b623f9dbc83dc094cf445fd2d34322158dec3ae Mon Sep 17 00:00:00 2001 From: Vassilis Papanastasiou Date: Wed, 5 Jun 2024 11:57:25 +0100 Subject: [PATCH 3/6] Update texampleTests.m --- tests/texampleTests.m | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/texampleTests.m b/tests/texampleTests.m index 6d574c8..8585e81 100644 --- a/tests/texampleTests.m +++ b/tests/texampleTests.m @@ -57,10 +57,6 @@ function testRetrievalAugmentedGenerationUsingChatGPTandMATLAB(~) function testAnalyzeSentimentinTextUsingChatGPTinJSONMode(~) AnalyzeSentimentinTextUsingChatGPTinJSONMode; end - - function testUsingDALLEToEditImages(~) - UsingDALLEToEditImages; - end end end @@ -69,4 +65,4 @@ function iCloseAll() % Close all opened figures allFig = findall(0, 'type', 'figure'); close(allFig) -end \ No newline at end of file +end From d0e4c937580a12dcf22f3e9cb7fad23d0d0921ef Mon Sep 17 00:00:00 2001 From: Vassilis Papanastasiou Date: Wed, 5 Jun 2024 13:44:36 +0100 Subject: [PATCH 4/6] Update errorMessageCatalog.m --- +llms/+utils/errorMessageCatalog.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/+llms/+utils/errorMessageCatalog.m b/+llms/+utils/errorMessageCatalog.m index fe13f0d..aba7f37 100644 --- a/+llms/+utils/errorMessageCatalog.m +++ b/+llms/+utils/errorMessageCatalog.m @@ -5,7 +5,7 @@ properties(Constant) %CATALOG dictionary mapping error ids to error msgs - Catalog = buildErrorMessageCatalog; + Catalog = buildErrorMessageCatalog(); end methods(Static) @@ -31,7 +31,7 @@ end end -function catalog = buildErrorMessageCatalog +function catalog = buildErrorMessageCatalog() catalog = dictionary("string", "string"); catalog("llms:mustBeUnique") = "Values must be unique."; catalog("llms:mustBeVarName") = "Parameter name must begin with a letter and contain not more than 'namelengthmax' characters."; @@ -56,4 +56,4 @@ catalog("llms:warningJsonInstruction") = "When using JSON mode, you must also prompt the model to produce JSON yourself via a system or user message."; catalog("llms:apiReturnedError") = "OpenAI API Error: {1}"; catalog("llms:dimensionsMustBeSmallerThan") = "Dimensions must be less than or equal to {1}."; -end \ No newline at end of file +end From 53ca67399a633a525082f86b3b5e4afb1c37ddf9 Mon Sep 17 00:00:00 2001 From: Vassilis Papanastasiou Date: Wed, 5 Jun 2024 14:22:50 +0100 Subject: [PATCH 5/6] Revert errorMessageCatalog --- +llms/+utils/errorMessageCatalog.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/+llms/+utils/errorMessageCatalog.m b/+llms/+utils/errorMessageCatalog.m index aba7f37..f3d57c7 100644 --- a/+llms/+utils/errorMessageCatalog.m +++ b/+llms/+utils/errorMessageCatalog.m @@ -5,7 +5,7 @@ properties(Constant) %CATALOG dictionary mapping error ids to error msgs - Catalog = buildErrorMessageCatalog(); + Catalog = buildErrorMessageCatalog; end methods(Static) @@ -31,7 +31,7 @@ end end -function catalog = buildErrorMessageCatalog() +function catalog = buildErrorMessageCatalog catalog = dictionary("string", "string"); catalog("llms:mustBeUnique") = "Values must be unique."; catalog("llms:mustBeVarName") = "Parameter name must begin with a letter and contain not more than 'namelengthmax' characters."; From ab8847414c561745ff78673d24e26283e4106470 Mon Sep 17 00:00:00 2001 From: Vassilis Papanastasiou Date: Wed, 5 Jun 2024 14:46:26 +0100 Subject: [PATCH 6/6] Revert errorMessageCatalog.m