Skip to content

Commit

Permalink
Updated the Vision Example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
toshiakit committed Apr 13, 2024
1 parent 1e626d9 commit 4d54d08
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ This repository contains example code to demonstrate how to connect MATLAB to th
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.

Some of the current LLMs supported are:
- gpt-3.5-turbo, gpt-3.5-turbo-1106
- gpt-4, gpt-4-1106-preview
- gpt-4-vision-preview (a.k.a. GPT-4 Turbo with Vision)
- gpt-3.5-turbo, gpt-3.5-turbo-1106, gpt-3.5-turbo-0125
- gpt-4-turbo, gpt-4-turbo-2024-04-09 (capable of Vision)
- gpt-4, gpt-4-0613
- dall-e-2, dall-e-3

For details on the specification of each model, check the official [OpenAI documentation](https://platform.openai.com/docs/models).

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

0 comments on commit 4d54d08

Please sign in to comment.