Skip to content

Commit 46012c7

Browse files
authored
Simple renamings and new code generation (Azure#50013)
* Simple renamings and new code generation * Joun clients for the Vector store * Fix generaged tests * Regenerate code * Re record tests
1 parent 7882e55 commit 46012c7

File tree

45 files changed

+640
-782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+640
-782
lines changed

sdk/ai/Azure.AI.Agents.Persistent/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVector
251251
name: "sample_vector_store"
252252
);
253253

254-
VectorStoreFileBatch vctFile = await client.VectorStoreFileBatches.CreateVectorStoreFileBatchAsync(
254+
VectorStoreFileBatch vctFile = await client.VectorStores.CreateVectorStoreFileBatchAsync(
255255
vectorStoreId: vectorStore.Id,
256256
dataSources: [ ds ]
257257
);
@@ -834,7 +834,7 @@ OpenApiToolDefinition openapiTool = new(
834834
name: "get_weather",
835835
description: "Retrieve weather information for a location",
836836
spec: BinaryData.FromBytes(System.IO.File.ReadAllBytes(file_path)),
837-
auth: oaiAuth,
837+
openApiAuthentication: oaiAuth,
838838
defaultParams: [ "format" ]
839839
);
840840

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs

Lines changed: 53 additions & 72 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs

Lines changed: 53 additions & 72 deletions
Large diffs are not rendered by default.

sdk/ai/Azure.AI.Agents.Persistent/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "net",
44
"TagPrefix": "net/ai/Azure.AI.Agents.Persistent",
5-
"Tag": "net/ai/Azure.AI.Agents.Persistent_1595ec3be5"
5+
"Tag": "net/ai/Azure.AI.Agents.Persistent_8be9900d95"
66
}

sdk/ai/Azure.AI.Agents.Persistent/samples/Sample10_PersistentAgents_Vector_Store_Batch_File_Search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Dictionary<string, string> dtReferences = new()
1919
{file.Id, Path.GetFileName(file.Filename)}
2020
};
2121

22-
var uploadTask = client.VectorStoreFileBatches.CreateVectorStoreFileBatch(
22+
var uploadTask = client.VectorStores.CreateVectorStoreFileBatch(
2323
vectorStoreId: vectorStore.Id,
2424
fileIds: [file.Id]
2525
);
@@ -54,7 +54,7 @@ Dictionary<string, string> dtReferences = new()
5454
{file.Id, Path.GetFileName(file.Filename)}
5555
};
5656

57-
VectorStoreFileBatch uploadTask = await client.VectorStoreFileBatches.CreateVectorStoreFileBatchAsync(
57+
VectorStoreFileBatch uploadTask = await client.VectorStores.CreateVectorStoreFileBatchAsync(
5858
vectorStoreId: vectorStore.Id,
5959
fileIds: [file.Id]
6060
);

sdk/ai/Azure.AI.Agents.Persistent/samples/Sample13_PersistentAgents_OpenAPI.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ OpenApiToolDefinition openapiTool = new(
2626
name: "get_weather",
2727
description: "Retrieve weather information for a location",
2828
spec: BinaryData.FromBytes(System.IO.File.ReadAllBytes(file_path)),
29-
auth: oaiAuth,
29+
openApiAuthentication: oaiAuth,
3030
defaultParams: ["format"]
3131
);
3232

@@ -45,7 +45,7 @@ OpenApiToolDefinition openapiTool = new(
4545
name: "get_weather",
4646
description: "Retrieve weather information for a location",
4747
spec: BinaryData.FromBytes(System.IO.File.ReadAllBytes(file_path)),
48-
auth: oaiAuth,
48+
openApiAuthentication: oaiAuth,
4949
defaultParams: [ "format" ]
5050
);
5151

sdk/ai/Azure.AI.Agents.Persistent/samples/Sample15_PersistentAgents_Vector_Store_Batch_Enterprise_File_Search.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PersistentAgentsVectorStore vectorStore = client.VectorStores.CreateVectorStore(
2020
name: "sample_vector_store"
2121
);
2222

23-
VectorStoreFileBatch vctFile = client.VectorStoreFileBatches.CreateVectorStoreFileBatch(
23+
VectorStoreFileBatch vctFile = client.VectorStores.CreateVectorStoreFileBatch(
2424
vectorStoreId: vectorStore.Id,
2525
dataSources: [ds]
2626
);
@@ -39,7 +39,7 @@ PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVector
3939
name: "sample_vector_store"
4040
);
4141

42-
VectorStoreFileBatch vctFile = await client.VectorStoreFileBatches.CreateVectorStoreFileBatchAsync(
42+
VectorStoreFileBatch vctFile = await client.VectorStores.CreateVectorStoreFileBatchAsync(
4343
vectorStoreId: vectorStore.Id,
4444
dataSources: [ ds ]
4545
);
@@ -166,7 +166,7 @@ Pageable<PersistentThreadMessage> messages = client.Messages.GetMessages(
166166
);
167167
// Build the map of file IDs to file names.
168168
Dictionary<string, string> dtFiles = [];
169-
Pageable<VectorStoreFile> storeFiles = client.VectorStoreFiles.GetVectorStoreFiles(
169+
Pageable<VectorStoreFile> storeFiles = client.VectorStores.GetVectorStoreFiles(
170170
vectorStoreId: vectorStore.Id
171171
);
172172
foreach (VectorStoreFile fle in storeFiles)
@@ -202,7 +202,7 @@ List<PersistentThreadMessage> messages = await client.Messages.GetMessagesAsync(
202202
).ToListAsync();
203203
// Build the map of file IDs to file names.
204204
Dictionary<string, string> dtFiles = [];
205-
AsyncPageable<VectorStoreFile> storeFiles = client.VectorStoreFiles.GetVectorStoreFilesAsync(
205+
AsyncPageable<VectorStoreFile> storeFiles = client.VectorStores.GetVectorStoreFilesAsync(
206206
vectorStoreId: vectorStore.Id
207207
);
208208
await foreach (VectorStoreFile fle in storeFiles)

sdk/ai/Azure.AI.Agents.Persistent/samples/Sample5_PersistentAgents_Enterprise_File_Search.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Pageable<PersistentThreadMessage> messages = client.Messages.GetMessages(
129129
);
130130
// Build the map of file IDs to file names.
131131
Dictionary<string, string> dtFiles = [];
132-
Pageable<VectorStoreFile> storeFiles = client.VectorStoreFiles.GetVectorStoreFiles(
132+
Pageable<VectorStoreFile> storeFiles = client.VectorStores.GetVectorStoreFiles(
133133
vectorStoreId: vectorStore.Id
134134
);
135135
foreach (VectorStoreFile fle in storeFiles)
@@ -149,7 +149,7 @@ List<PersistentThreadMessage> messages = await client.Messages.GetMessagesAsync(
149149
).ToListAsync();
150150
// Build the map of file IDs to file names.
151151
Dictionary<string, string> dtFiles = [];
152-
AsyncPageable<VectorStoreFile> storeFiles = client.VectorStoreFiles.GetVectorStoreFilesAsync(
152+
AsyncPageable<VectorStoreFile> storeFiles = client.VectorStores.GetVectorStoreFilesAsync(
153153
vectorStoreId: vectorStore.Id
154154
);
155155
await foreach (VectorStoreFile fle in storeFiles)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
namespace Azure.AI.Agents.Persistent
5+
{
6+
public partial class AISearchIndexResource
7+
{
8+
/// <summary> An index connection id in an IndexResource attached to this agent. </summary>
9+
public string IndexConnectionId { get;}
10+
/// <summary> The name of an index in an IndexResource attached to this agent. </summary>
11+
public string IndexName { get;}
12+
}
13+
}

sdk/ai/Azure.AI.Agents.Persistent/src/Custom/AzureAISearchResource.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ public AzureAISearchResource(
1818
queryType ??= AzureAISearchQueryType.Simple;
1919

2020
// Initialize properties or perform other logic here
21-
var indexList = new AISearchIndexResource
21+
var indexList = new AISearchIndexResource(
22+
indexConnectionId: indexConnectionId,
23+
indexName: indexName
24+
)
2225
{
23-
IndexConnectionId = indexConnectionId,
24-
IndexName = indexName,
2526
TopK = topK,
2627
Filter = filter,
2728
QueryType = queryType

0 commit comments

Comments
 (0)