Skip to content

Commit

Permalink
create toolbox packaging infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
ccreutzi committed Aug 14, 2024
1 parent 25a8075 commit 624539e
Show file tree
Hide file tree
Showing 4 changed files with 321 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
*.env
*.asv
*.mltbx
*.mat
!tests/recordings/*.mat
startup.m
papers_to_read.csv
data/*
examples/data/*
examples/mlx-scripts/data/*
toolbox/examples/data/*
toolbox/examples/html/*
._*
.nfs*
.DS_Store
Binary file added images/toolboxPackaging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions toolbox/demos.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<demos><!--This is an autogenerated file, please do not modify-->
<name>LLMs with MATLAB®</name>
<type>toolbox</type>
<icon>HelpIcon.DEMOS</icon>
<website/>
<description>Connect MATLAB® to the OpenAI® Chat Completions API (which powers ChatGPT™), OpenAI Images API (which powers DALL·E™), Azure® OpenAI Service, and both local and nonlocal Ollama™ models.</description>
<demosection>
<label>examples</label>
<demoitem>
<label>AnalyzeScientificPapersUsingFunctionCalls</label>
<type>other</type>
<source>AnalyzeScientificPapersUsingFunctionCalls</source>
<file>examples/html/AnalyzeScientificPapersUsingFunctionCalls.html</file>
</demoitem>
<demoitem>
<label>AnalyzeSentimentinTextUsingChatGPTinJSONMode</label>
<type>other</type>
<source>AnalyzeSentimentinTextUsingChatGPTinJSONMode</source>
<file>examples/html/AnalyzeSentimentinTextUsingChatGPTinJSONMode.html</file>
</demoitem>
<demoitem>
<label>AnalyzeTextDataUsingParallelFunctionCallwithChatGPT</label>
<type>other</type>
<source>AnalyzeTextDataUsingParallelFunctionCallwithChatGPT</source>
<file>examples/html/AnalyzeTextDataUsingParallelFunctionCallwithChatGPT.html</file>
</demoitem>
<demoitem>
<label>CreateSimpleChatBot</label>
<type>other</type>
<source>CreateSimpleChatBot</source>
<file>examples/html/CreateSimpleChatBot.html</file>
</demoitem>
<demoitem>
<label>CreateSimpleOllamaChatBot</label>
<type>other</type>
<source>CreateSimpleOllamaChatBot</source>
<file>examples/html/CreateSimpleOllamaChatBot.html</file>
</demoitem>
<demoitem>
<label>DescribeImagesUsingChatGPT</label>
<type>other</type>
<source>DescribeImagesUsingChatGPT</source>
<file>examples/html/DescribeImagesUsingChatGPT.html</file>
</demoitem>
<demoitem>
<label>InformationRetrievalUsingOpenAIDocumentEmbedding</label>
<type>other</type>
<source>InformationRetrievalUsingOpenAIDocumentEmbedding</source>
<file>examples/html/InformationRetrievalUsingOpenAIDocumentEmbedding.html</file>
</demoitem>
<demoitem>
<label>ProcessGeneratedTextInRealTimeByUsingOllamaInStreamingMode</label>
<type>other</type>
<source>ProcessGeneratedTextInRealTimeByUsingOllamaInStreamingMode</source>
<file>examples/html/ProcessGeneratedTextInRealTimeByUsingOllamaInStreamingMode.html</file>
</demoitem>
<demoitem>
<label>ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode</label>
<type>other</type>
<source>ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode</source>
<file>examples/html/ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode.html</file>
</demoitem>
<demoitem>
<label>RetrievalAugmentedGenerationUsingChatGPTandMATLAB</label>
<type>other</type>
<source>RetrievalAugmentedGenerationUsingChatGPTandMATLAB</source>
<file>examples/html/RetrievalAugmentedGenerationUsingChatGPTandMATLAB.html</file>
</demoitem>
<demoitem>
<label>RetrievalAugmentedGenerationUsingOllamaAndMATLAB</label>
<type>other</type>
<source>RetrievalAugmentedGenerationUsingOllamaAndMATLAB</source>
<file>examples/html/RetrievalAugmentedGenerationUsingOllamaAndMATLAB.html</file>
</demoitem>
<demoitem>
<label>SummarizeLargeDocumentsUsingChatGPTandMATLAB</label>
<type>other</type>
<source>SummarizeLargeDocumentsUsingChatGPTandMATLAB</source>
<file>examples/html/SummarizeLargeDocumentsUsingChatGPTandMATLAB.html</file>
</demoitem>
<demoitem>
<label>UsingDALLEToEditImages</label>
<type>other</type>
<source>UsingDALLEToEditImages</source>
<file>examples/html/UsingDALLEToEditImages.html</file>
</demoitem>
<demoitem>
<label>UsingDALLEToGenerateImages</label>
<type>other</type>
<source>UsingDALLEToGenerateImages</source>
<file>examples/html/UsingDALLEToGenerateImages.html</file>
</demoitem>
</demosection>
</demos>
223 changes: 223 additions & 0 deletions toolboxPackaging.prj
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
<deployment-project plugin="plugin.toolbox" plugin-version="1.0">
<configuration file="/System/Volumes/Data/mathworks/devel/sandbox/ccreutzi/llms-with-matlab/toolboxPackaging.prj" location="/System/Volumes/Data/mathworks/devel/sandbox/ccreutzi/llms-with-matlab" name="toolboxPackaging" target="target.toolbox" target-name="Package Toolbox">
<param.appname>LLMs with MATLAB®</param.appname>
<param.authnamewatermark>MathWorks Text Analytics Toolbox Team</param.authnamewatermark>
<param.email />
<param.company>The MathWorks, Inc.</param.company>
<param.summary>Large Language Models (LLMs) with MATLAB</param.summary>
<param.description>Connect MATLAB® to the OpenAI® Chat Completions API (which powers ChatGPT™), OpenAI Images API (which powers DALL·E™), Azure® OpenAI Service, and both local and nonlocal Ollama™ models.</param.description>
<param.screenshot>${PROJECT_ROOT}/images/toolboxPackaging.png</param.screenshot>
<param.version>3.3.0</param.version>
<param.output>${PROJECT_ROOT}/LLMs with MATLAB®.mltbx</param.output>
<param.products.name />
<param.products.id />
<param.products.version />
<param.platforms />
<param.guid>e1d578f3-4375-4f36-9e04-62c18dbd533f</param.guid>
<param.exclude.filters />
<param.exclude.pcodedmfiles>true</param.exclude.pcodedmfiles>
<param.examples>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;examples&gt;
&lt;exampleCategory name="examples"&gt;
&lt;example name="AnalyzeScientificPapersUsingFunctionCalls" type="html"&gt;
&lt;file type="source"&gt;/examples/html/AnalyzeScientificPapersUsingFunctionCalls.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/AnalyzeScientificPapersUsingFunctionCalls.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="AnalyzeSentimentinTextUsingChatGPTinJSONMode" type="html"&gt;
&lt;file type="source"&gt;/examples/html/AnalyzeSentimentinTextUsingChatGPTinJSONMode.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/AnalyzeSentimentinTextUsingChatGPTinJSONMode.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="AnalyzeTextDataUsingParallelFunctionCallwithChatGPT" type="html"&gt;
&lt;file type="source"&gt;/examples/html/AnalyzeTextDataUsingParallelFunctionCallwithChatGPT.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/AnalyzeTextDataUsingParallelFunctionCallwithChatGPT.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="CreateSimpleChatBot" type="html"&gt;
&lt;file type="source"&gt;/examples/html/CreateSimpleChatBot.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/CreateSimpleChatBot.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="CreateSimpleOllamaChatBot" type="html"&gt;
&lt;file type="source"&gt;/examples/html/CreateSimpleOllamaChatBot.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/CreateSimpleOllamaChatBot.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="DescribeImagesUsingChatGPT" type="html"&gt;
&lt;file type="source"&gt;/examples/html/DescribeImagesUsingChatGPT.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/DescribeImagesUsingChatGPT.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="InformationRetrievalUsingOpenAIDocumentEmbedding" type="html"&gt;
&lt;file type="source"&gt;/examples/html/InformationRetrievalUsingOpenAIDocumentEmbedding.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/InformationRetrievalUsingOpenAIDocumentEmbedding.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="ProcessGeneratedTextInRealTimeByUsingOllamaInStreamingMode" type="html"&gt;
&lt;file type="source"&gt;/examples/html/ProcessGeneratedTextInRealTimeByUsingOllamaInStreamingMode.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/ProcessGeneratedTextInRealTimeByUsingOllamaInStreamingMode.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode" type="html"&gt;
&lt;file type="source"&gt;/examples/html/ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/ProcessGeneratedTextinRealTimebyUsingChatGPTinStreamingMode.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="RetrievalAugmentedGenerationUsingChatGPTandMATLAB" type="html"&gt;
&lt;file type="source"&gt;/examples/html/RetrievalAugmentedGenerationUsingChatGPTandMATLAB.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/RetrievalAugmentedGenerationUsingChatGPTandMATLAB.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="RetrievalAugmentedGenerationUsingOllamaAndMATLAB" type="html"&gt;
&lt;file type="source"&gt;/examples/html/RetrievalAugmentedGenerationUsingOllamaAndMATLAB.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/RetrievalAugmentedGenerationUsingOllamaAndMATLAB.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="SummarizeLargeDocumentsUsingChatGPTandMATLAB" type="html"&gt;
&lt;file type="source"&gt;/examples/html/SummarizeLargeDocumentsUsingChatGPTandMATLAB.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/SummarizeLargeDocumentsUsingChatGPTandMATLAB.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="UsingDALLEToEditImages" type="html"&gt;
&lt;file type="source"&gt;/examples/html/UsingDALLEToEditImages.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/UsingDALLEToEditImages.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;example name="UsingDALLEToGenerateImages" type="html"&gt;
&lt;file type="source"&gt;/examples/html/UsingDALLEToGenerateImages.html&lt;/file&gt;
&lt;file type="main"&gt;/examples/UsingDALLEToGenerateImages.mlx&lt;/file&gt;
&lt;file type="thumbnail"/&gt;
&lt;/example&gt;
&lt;/exampleCategory&gt;
&lt;/examples&gt;</param.examples>
<param.demosxml />
<param.apps />
<param.registered.apps />
<param.docs />
<param.getting.started.guide />
<param.matlabpath.excludes />
<param.javaclasspath.excludes />
<param.exported.on.package>true</param.exported.on.package>
<param.required.addons />
<param.matlab.project.id />
<param.matlab.project.name />
<param.release.start>R2024a</param.release.start>
<param.release.end>latest</param.release.end>
<param.release.current.only>false</param.release.current.only>
<param.compatiblity.windows>true</param.compatiblity.windows>
<param.compatiblity.macos>true</param.compatiblity.macos>
<param.compatiblity.linux>true</param.compatiblity.linux>
<param.compatiblity.matlabonline>true</param.compatiblity.matlabonline>
<param.installation.map />
<param.additional.sw.names />
<param.additional.sw.licenses />
<param.additional.sw.win.url />
<param.additional.sw.mac.url />
<param.additional.sw.linux.url />
<unset>
<param.email />
<param.output />
<param.products.name />
<param.products.id />
<param.products.version />
<param.platforms />
<param.exclude.filters />
<param.exclude.pcodedmfiles />
<param.demosxml />
<param.apps />
<param.registered.apps />
<param.docs />
<param.getting.started.guide />
<param.matlabpath.excludes />
<param.javaclasspath.excludes />
<param.required.addons />
<param.matlab.project.id />
<param.matlab.project.name />
<param.release.current.only />
<param.compatiblity.windows />
<param.compatiblity.macos />
<param.compatiblity.linux />
<param.compatiblity.matlabonline />
<param.installation.map />
<param.additional.sw.names />
<param.additional.sw.licenses />
<param.additional.sw.win.url />
<param.additional.sw.mac.url />
<param.additional.sw.linux.url />
</unset>
<fileset.rootdir>
<file>${PROJECT_ROOT}/toolbox</file>
</fileset.rootdir>
<fileset.rootfiles>
<file>${PROJECT_ROOT}/toolbox/+llms</file>
<file>${PROJECT_ROOT}/toolbox/._azureChat.m</file>
<file>${PROJECT_ROOT}/toolbox/._messageHistory.m</file>
<file>${PROJECT_ROOT}/toolbox/._ollamaChat.m</file>
<file>${PROJECT_ROOT}/toolbox/._openAIChat.m</file>
<file>${PROJECT_ROOT}/toolbox/azureChat.m</file>
<file>${PROJECT_ROOT}/toolbox/demos.xml</file>
<file>${PROJECT_ROOT}/toolbox/examples</file>
<file>${PROJECT_ROOT}/toolbox/extractOpenAIEmbeddings.m</file>
<file>${PROJECT_ROOT}/toolbox/messageHistory.m</file>
<file>${PROJECT_ROOT}/toolbox/ollamaChat.m</file>
<file>${PROJECT_ROOT}/toolbox/openAIChat.m</file>
<file>${PROJECT_ROOT}/toolbox/openAIFunction.m</file>
<file>${PROJECT_ROOT}/toolbox/openAIImages.m</file>
<file>${PROJECT_ROOT}/toolbox/openAIMessages.m</file>
</fileset.rootfiles>
<fileset.depfun.included />
<fileset.depfun.excluded>
<file>${PROJECT_ROOT}/papers_to_read.csv</file>
</fileset.depfun.excluded>
<fileset.package />
<build-deliverables>
<file location="${PROJECT_ROOT}" name="LLMs with MATLAB®.mltbx" optional="false">/System/Volumes/Data/mathworks/devel/sandbox/ccreutzi/llms-with-matlab/LLMs with MATLAB®.mltbx</file>
</build-deliverables>
<workflow />
<matlab>
<root>/System/Volumes/Data/mathworks/devel/jobarchive/Btext/.zfs/snapshot/Btext.2703056.pass.ja1/current/build/matlab</root>
<toolboxes>
<toolbox name="matlabcoder" />
<toolbox name="embeddedcoder" />
<toolbox name="fixedpoint" />
<toolbox name="neuralnetwork" />
</toolboxes>
<toolbox>
<matlabcoder>
<enabled>true</enabled>
</matlabcoder>
</toolbox>
<toolbox>
<embeddedcoder>
<enabled>true</enabled>
</embeddedcoder>
</toolbox>
<toolbox>
<fixedpoint>
<enabled>true</enabled>
</fixedpoint>
</toolbox>
<toolbox>
<neuralnetwork>
<enabled>true</enabled>
</neuralnetwork>
</toolbox>
</matlab>
<platform>
<unix>true</unix>
<mac>true</mac>
<windows>false</windows>
<win2k>false</win2k>
<winxp>false</winxp>
<vista>false</vista>
<linux>false</linux>
<solaris>false</solaris>
<osver>14.5</osver>
<os32>true</os32>
<os64>false</os64>
<arch>maci64</arch>
<matlab>true</matlab>
</platform>
</configuration>
</deployment-project>

0 comments on commit 624539e

Please sign in to comment.