Skip to content

Commit 59e2ba2

Browse files
Merge pull request #4163 from santiagxf/santiagxf-patch-1
Image embeddings fix
2 parents 7cd91e7 + 87f02f7 commit 59e2ba2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

articles/ai-foundry/model-inference/includes/use-image-embeddings/csharp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ First, create the client to consume the model. The following code uses an endpoi
3636

3737

3838
```csharp
39-
EmbeddingsClient client = new EmbeddingsClient(
39+
ImageEmbeddingsClient client = new ImageEmbeddingsClient(
4040
new Uri("https://<resource>.services.ai.azure.com/models"),
4141
new AzureKeyCredential(Environment.GetEnvironmentVariable("AZURE_INFERENCE_CREDENTIAL"))
4242
);
@@ -51,7 +51,7 @@ BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolic
5151

5252
clientOptions.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry);
5353

54-
client = new EmbeddingsClient(
54+
ImageEmbeddingsClient client = new ImageEmbeddingsClient(
5555
new Uri("https://<resource>.services.ai.azure.com/models"),
5656
credential,
5757
clientOptions

articles/ai-foundry/model-inference/includes/use-image-embeddings/javascript.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ var image_path = "sample1.png";
9999
var image_data = fs.readFileSync(image_path);
100100
var image_data_base64 = Buffer.from(image_data).toString("base64");
101101

102-
var response = await client.path("images/embeddings").post({
102+
var response = await client.path("/images/embeddings").post({
103103
body: {
104104
input: [
105105
{
@@ -120,7 +120,7 @@ The following example shows how to create embeddings that are used to create an
120120

121121

122122
```javascript
123-
var response = await client.path("/embeddings").post({
123+
var response = await client.path("/images/embeddings").post({
124124
body: {
125125
input: [ { image: image_data_base64 } ],
126126
input_type: "document",
@@ -133,7 +133,7 @@ When you work on a query to retrieve such a document, you can use the following
133133

134134

135135
```javascript
136-
var response = await client.path("/embeddings").post({
136+
var response = await client.path("/images/embeddings").post({
137137
body: {
138138
input: [ { image: image_data_base64 } ],
139139
input_type: "query",

0 commit comments

Comments
 (0)