Skip to content

Commit f774734

Browse files
committed
Updating readme
1 parent a0f599b commit f774734

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ If you would like to use it with MATLAB Desktop, proceed with the following step
3030
addpath('path/to/llms-with-matlab');
3131
```
3232

33-
4. Set up your OpenAI API key. You can either:
34-
- Pass it directly to the `openAIChat` class, using the nvp `ApiKey`
35-
- Or set it as an environment variable using [`setenv`](https://www.mathworks.com/help/matlab/ref/setenv.html) or [`loadenv`](https://www.mathworks.com/help/matlab/ref/loadenv.html):
36-
```matlab
37-
setenv("OPENAI_API_KEY","your key here")
33+
4. Set up your OpenAI API key. Create a `.env` file in the project root directory with the following content.
34+
3835
```
39-
or
36+
OPENAI_API_KEY=<your key>
37+
```
38+
39+
Then load your `.env` file as follows:
40+
4041
```matlab
41-
loadenv(filename)
42+
loadenv(".env")
4243
```
4344

4445
### MathWorks Products (https://www.mathworks.com)
@@ -240,6 +241,7 @@ To learn how to use this in your workflows, see [Examples](/examples/).
240241
- [ExampleSummarization.mlx](/examples/ExampleSummarization.mlx): Learn to create concise summaries of long texts with ChatGPT. (Requires Text Analytics Toolbox™)
241242
- [ExampleChatBot.mlx](/examples/ExampleChatBot.mlx): Build a conversational chatbot capable of handling various dialogue scenarios using ChatGPT. (Requires Text Analytics Toolbox)
242243
- [ExampleFunctionCalling.mlx](/examples/ExampleFunctionCalling.mlx): Learn how to create agents capable of executing MATLAB functions.
244+
- [ExampleRetrievalAugmentedGeneration.mlx](/examples/ExampleRetrievalAugmentedGeneration.mlx): Learn about retrieval augmented generation with a simple use case. (Requires Text Analytics Toolbox™)
243245

244246
## License
245247

0 commit comments

Comments
 (0)