Skip to content

Commit ad01170

Browse files
committed
fix schema
1 parent b7b33a2 commit ad01170

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/ai-services/openai/includes/gpt-v-rest.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ Create a new Python file named _quickstart.py_. Open the new file in your prefer
6161
endpoint = f"{base_url}/chat/completions?api-version=2023-12-01-preview"
6262
data = {
6363
"messages": [
64-
{ "role": "system", "content": "You are a helpful assistant." }, # Content can be a string, OR
65-
{ "role": "user", "content": [ # It can be an array containing strings and images.
66-
"Describe this picture:",
67-
{ "image": "<base_64_encoded_image>" } # Images are represented like this.
68-
] }
64+
{ "role": "system", "content": "You are a helpful assistant." },
65+
{ "role": "user", "content": [
66+
{ "type": "text", "text": "Describe this picture:" },
67+
{ "type": "image_url", "url": "<URL or base-64-encoded image>" }
68+
] }
6969
],
7070
"max_tokens": 100
7171
}
@@ -136,11 +136,11 @@ The **object grounding** integration brings a new layer to data analysis and use
136136
}
137137
}],
138138
"messages": [
139-
{ "role": "system", "content": "You are a helpful assistant." }, # Content can be a string, OR
140-
{ "role": "user", "content": [ # It can be an array containing strings and images.
141-
"Describe this picture:",
142-
{ "image": "<base_64_encoded_image>" } # Images are represented like this.
143-
]}
139+
{ "role": "system", "content": "You are a helpful assistant." },
140+
{ "role": "user", "content": [
141+
{ "type": "text", "text": "Describe this picture:" },
142+
{ "type": "image_url", "url": "<URL or base-64-encoded image>" }
143+
]}
144144
],
145145
"max_tokens": 100
146146
}

0 commit comments

Comments
 (0)