Skip to content

Commit b0e2a8c

Browse files
committed
fixes
1 parent 48574d9 commit b0e2a8c

File tree

4 files changed

+25
-17
lines changed

4 files changed

+25
-17
lines changed

articles/ai-foundry/model-inference/includes/use-chat-multi-modal/csharp.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ client = new ChatCompletionsClient(
6262

6363
Some models can reason across text and images and generate text completions based on both kinds of input. In this section, you explore the capabilities of Some models for vision in a chat fashion:
6464

65-
> [!IMPORTANT]
66-
> Some models support only one image for each turn in the chat conversation and only the last image is retained in context. If you add multiple images, it results in an error.
67-
6865
To see this capability, download an image and encode the information as `base64` string. The resulting data should be inside of a [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs):
6966

7067

@@ -126,6 +123,9 @@ Usage:
126123

127124
Images are broken into tokens and submitted to the model for processing. When referring to images, each of those tokens is typically referred as *patches*. Each model may break down a given image on a different number of patches. Read the model card to learn the details.
128125

126+
> [!IMPORTANT]
127+
> Some models support only one image for each turn in the chat conversation and only the last image is retained in context. If you add multiple images, it results in an error.
128+
129129
## Use chat completions with audio
130130

131131
Some models can reason across text and audio inputs. The following example shows how you can send audio context to chat completions models that also supports audio. Use `InputAudio` to load the content of the audio file into the payload. The content is encoded in `base64` data and sent over the payload.
@@ -157,12 +157,12 @@ Console.WriteLine($"\tCompletion tokens: {response.Value.Usage.CompletionTokens}
157157
```
158158

159159
```console
160-
ASSISTANT: The chart illustrates that larger models tend to perform better in quality, as indicated by their size in billions of parameters. However, there are exceptions to this trend, such as Phi-3-medium and Phi-3-small, which outperform smaller models in quality. This suggests that while larger models generally have an advantage, there might be other factors at play that influence a model's performance.
161-
Model: Phi-4-multimodal-instruct
162-
Usage:
163-
Prompt tokens: 2380
164-
Completion tokens: 126
165-
Total tokens: 2506
160+
ASSISTANT: Hola. ¿Cómo estás?
161+
Model: speech
162+
Usage:
163+
Prompt tokens: 77
164+
Completion tokens: 7
165+
Total tokens: 84
166166
```
167167

168168
The model can read the content from an **accessible cloud location** by passing the URL as an input. The Python SDK doesn't provide a direct way to do it, but you can indicate the payload as follows:
@@ -194,12 +194,12 @@ Console.WriteLine($"\tCompletion tokens: {response.Value.Usage.CompletionTokens}
194194
```
195195

196196
```console
197-
ASSISTANT: The chart illustrates that larger models tend to perform better in quality, as indicated by their size in billions of parameters. However, there are exceptions to this trend, such as Phi-3-medium and Phi-3-small, which outperform smaller models in quality. This suggests that while larger models generally have an advantage, there might be other factors at play that influence a model's performance.
198-
Model: Phi-4-multimodal-instruct
199-
Usage:
200-
Prompt tokens: 2380
201-
Completion tokens: 126
202-
Total tokens: 2506
197+
ASSISTANT: Hola. ¿Cómo estás?
198+
Model: speech
199+
Usage:
200+
Prompt tokens: 77
201+
Completion tokens: 7
202+
Total tokens: 84
203203
```
204204

205-
205+
Audio is broken into tokens and submitted to the model for processing. Some models may operate directly over audio tokens while other may use internal modules to perform speech-to-text, resulting in different strategies to compute tokens. Read the model card for details about how each model operates.

articles/ai-foundry/model-inference/includes/use-chat-multi-modal/javascript.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Usage:
127127
Total tokens: 2506
128128
```
129129

130+
Images are broken into tokens and submitted to the model for processing. When referring to images, each of those tokens is typically referred as *patches*. Each model may break down a given image on a different number of patches. Read the model card to learn the details.
131+
130132
> [!IMPORTANT]
131133
> Some models support only one image for each turn in the chat conversation and only the last image is retained in context. If you add multiple images, it results in an error.
132134
@@ -238,3 +240,5 @@ const response = await client.path("/chat/completions").post({
238240
},
239241
});
240242
```
243+
244+
Audio is broken into tokens and submitted to the model for processing. Some models may operate directly over audio tokens while other may use internal modules to perform speech-to-text, resulting in different strategies to compute tokens. Read the model card for details about how each model operates.

articles/ai-foundry/model-inference/includes/use-chat-multi-modal/python.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,3 +213,5 @@ response = client.complete(
213213
}
214214
)
215215
```
216+
217+
Audio is broken into tokens and submitted to the model for processing. Some models may operate directly over audio tokens while other may use internal modules to perform speech-to-text, resulting in different strategies to compute tokens. Read the model card for details about how each model operates.

articles/ai-foundry/model-inference/includes/use-chat-multi-modal/rest.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,6 @@ The response is as follows, where you can see the model's usage statistics:
240240
"total_tokens": 84
241241
}
242242
}
243-
```
243+
```
244+
245+
Audio is broken into tokens and submitted to the model for processing. Some models may operate directly over audio tokens while other may use internal modules to perform speech-to-text, resulting in different strategies to compute tokens. Read the model card for details about how each model operates.

0 commit comments

Comments
 (0)