Skip to content

Commit 4d54d08

Browse files
committed
Updated the Vision Example in README
1 parent 1e626d9 commit 4d54d08

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ This repository contains example code to demonstrate how to connect MATLAB to th
55
The functionality shown here serves as an interface to the ChatGPT and DALL·E APIs. To start using the OpenAI APIs, you first need to obtain OpenAI API keys. You are responsible for any fees OpenAI may charge for the use of their APIs. You should be familiar with the limitations and risks associated with using this technology, and you agree that you shall be solely responsible for full compliance with any terms that may apply to your use of the OpenAI APIs.
66

77
Some of the current LLMs supported are:
8-
- gpt-3.5-turbo, gpt-3.5-turbo-1106
9-
- gpt-4, gpt-4-1106-preview
10-
- gpt-4-vision-preview (a.k.a. GPT-4 Turbo with Vision)
8+
- gpt-3.5-turbo, gpt-3.5-turbo-1106, gpt-3.5-turbo-0125
9+
- gpt-4-turbo, gpt-4-turbo-2024-04-09 (capable of Vision)
10+
- gpt-4, gpt-4-0613
1111
- dall-e-2, dall-e-3
12-
12+
1313
For details on the specification of each model, check the official [OpenAI documentation](https://platform.openai.com/docs/models).
1414

1515
## Setup
@@ -280,11 +280,11 @@ You can extract the arguments and write the data to a table, for example.
280280
281281
You can use gpt-4-vision-preview to experiment with image understanding.
282282
```matlab
283-
chat = openAIChat("You are an AI assistant.", ModelName="gpt-4-vision-preview");
283+
chat = openAIChat("You are an AI assistant.", ModelName="gpt-4-turbo",StopSequences="stop");
284284
image_path = "peppers.png";
285285
messages = openAIMessages;
286286
messages = addUserMessageWithImages(messages,"What is in the image?",image_path);
287-
[txt,response] = generate(chat,messages);
287+
[txt,response] = generate(chat,messages,MaxNumTokens=4096);
288288
% Should output the description of the image
289289
```
290290

0 commit comments

Comments
 (0)