Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
debymf authored Jan 27, 2024
1 parent a451efb commit 510002a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ txt = generate(chat,"What is Model-Based Design and how is it related to Digital
### Calling MATLAB functions with the API
The optional parameter `Tools` 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.
Optionally, `Tools=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.
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.

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:
Expand Down Expand Up @@ -337,4 +337,4 @@ The license is available in the license.txt file in this GitHub repository.
## Community Support
[MATLAB Central](https://www.mathworks.com/matlabcentral)
Copyright 2023-2024 The MathWorks, Inc.
Copyright 2023-2024 The MathWorks, Inc.

0 comments on commit 510002a

Please sign in to comment.