Skip to content

Commit dff582b

Browse files
committed
Merge branch 'mlx_examples' into 'main'
Mlx examples See merge request dferreir/llms-with-matlab!8
2 parents 56ac9b4 + 71c4783 commit dff582b

File tree

7 files changed

+4
-282
lines changed

7 files changed

+4
-282
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ history = addUserMessage(history,"Generate MATLAB code that computes that");
119119
### Calling MATLAB functions with the API
120120
121121
The optional parameter `functions` can be used to provide function specifications to the API. The purpose of this is to enable models to generate function arguments which adhere to the provided specifications.
122-
Note that the API is not able to directly call any function, so you should call the function and pass the values to the API directly. This process can be automated as shown in [ExampleFunctionCalling.m](/examples/ExampleFunctionCalling.m), but it's important to consider that ChatGPT can hallucinate function names, so avoid executing any arbitrary generated functions and only allow the execution of functions that you have defined.
122+
Note that the API is not able to directly call any function, so you should call the function and pass the values to the API directly. This process can be automated as shown in [ExampleFunctionCalling.mlx](/examples/ExampleFunctionCalling.mlx), but it's important to consider that ChatGPT can hallucinate function names, so avoid executing any arbitrary generated functions and only allow the execution of functions that you have defined.
123123

124124
For example, if you want to use the API for mathematical operations such as `sind`, instead of letting the model generate the result and risk running into hallucinations, you can give the model direct access to the function as follows:
125125

@@ -237,9 +237,9 @@ You can extract the arguments and write the data to a table, for example.
237237
## Examples
238238
To learn how to use this in your workflows, see [Examples](/examples/).
239239

240-
- [ExampleSummarization.m](/examples/ExampleSummarization.m): Learn to create concise summaries of long texts with ChatGPT. (Requires Text Analytics Toolbox™)
241-
- [ExampleChatBot.m](/examples/ExampleChatBot.m): Build a conversational chatbot capable of handling various dialogue scenarios using ChatGPT. (Requires Text Analytics Toolbox)
242-
- [ExampleFunctionCalling.m](/examples/ExampleFunctionCalling.m): Learn how to create agents capable of executing MATLAB functions.
240+
- [ExampleSummarization.mlx](/examples/ExampleSummarization.mlx): Learn to create concise summaries of long texts with ChatGPT. (Requires Text Analytics Toolbox™)
241+
- [ExampleChatBot.mlx](/examples/ExampleChatBot.mlx): Build a conversational chatbot capable of handling various dialogue scenarios using ChatGPT. (Requires Text Analytics Toolbox)
242+
- [ExampleFunctionCalling.mlx](/examples/ExampleFunctionCalling.mlx): Learn how to create agents capable of executing MATLAB functions.
243243

244244
## License
245245

examples/ExampleChatBot.m

Lines changed: 0 additions & 74 deletions
This file was deleted.

examples/ExampleChatBot.mlx

4.78 KB
Binary file not shown.

examples/ExampleFunctionCalling.m

Lines changed: 0 additions & 108 deletions
This file was deleted.
7.75 KB
Binary file not shown.

examples/ExampleSummarization.m

Lines changed: 0 additions & 96 deletions
This file was deleted.

examples/ExampleSummarization.mlx

6.58 KB
Binary file not shown.

0 commit comments

Comments
 (0)