Skip to content

Commit e4689e2

Browse files
committed
fb
1 parent b7b224c commit e4689e2

File tree

8 files changed

+27
-27
lines changed

8 files changed

+27
-27
lines changed

api/OpenAI.net8.0.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5818,10 +5818,10 @@ public class VectorStoreClient {
58185818
public virtual ClientResult ModifyVectorStore(string vectorStoreId, BinaryContent content, RequestOptions options = null);
58195819
public virtual Task<ClientResult<VectorStore>> ModifyVectorStoreAsync(string vectorStoreId, VectorStoreModificationOptions options, CancellationToken cancellationToken = default);
58205820
public virtual Task<ClientResult> ModifyVectorStoreAsync(string vectorStoreId, BinaryContent content, RequestOptions options = null);
5821-
public virtual ClientResult RemoveFileFromStore(string vectorStoreId, string fileId, RequestOptions options);
5822-
public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
5823-
public virtual Task<ClientResult> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, RequestOptions options);
5824-
public virtual Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
5821+
public virtual ClientResult RemoveFileFromVectorStore(string vectorStoreId, string fileId, RequestOptions options);
5822+
public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromVectorStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
5823+
public virtual Task<ClientResult> RemoveFileFromVectorStoreAsync(string vectorStoreId, string fileId, RequestOptions options);
5824+
public virtual Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromVectorStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
58255825
public virtual ClientResult RetrieveVectorStoreFileContent(string vectorStoreId, string fileId, RequestOptions options);
58265826
public virtual Task<ClientResult> RetrieveVectorStoreFileContentAsync(string vectorStoreId, string fileId, RequestOptions options);
58275827
public virtual ClientResult SearchVectorStore(string vectorStoreId, BinaryContent content, RequestOptions options = null);

api/OpenAI.netstandard2.0.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5148,10 +5148,10 @@ public class VectorStoreClient {
51485148
public virtual ClientResult ModifyVectorStore(string vectorStoreId, BinaryContent content, RequestOptions options = null);
51495149
public virtual Task<ClientResult<VectorStore>> ModifyVectorStoreAsync(string vectorStoreId, VectorStoreModificationOptions options, CancellationToken cancellationToken = default);
51505150
public virtual Task<ClientResult> ModifyVectorStoreAsync(string vectorStoreId, BinaryContent content, RequestOptions options = null);
5151-
public virtual ClientResult RemoveFileFromStore(string vectorStoreId, string fileId, RequestOptions options);
5152-
public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
5153-
public virtual Task<ClientResult> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, RequestOptions options);
5154-
public virtual Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
5151+
public virtual ClientResult RemoveFileFromVectorStore(string vectorStoreId, string fileId, RequestOptions options);
5152+
public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromVectorStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
5153+
public virtual Task<ClientResult> RemoveFileFromVectorStoreAsync(string vectorStoreId, string fileId, RequestOptions options);
5154+
public virtual Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromVectorStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default);
51555155
public virtual ClientResult RetrieveVectorStoreFileContent(string vectorStoreId, string fileId, RequestOptions options);
51565156
public virtual Task<ClientResult> RetrieveVectorStoreFileContentAsync(string vectorStoreId, string fileId, RequestOptions options);
51575157
public virtual ClientResult SearchVectorStore(string vectorStoreId, BinaryContent content, RequestOptions options = null);

specification/client/vector-stores.client.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using Azure.ClientGenerator.Core;
99

1010
@@visibility(VectorStoreObject.metadata, Lifecycle.Read);
1111

12-
@@clientName(VectorStores.deleteVectorStoreFile, "RemoveFileFromStore");
12+
@@clientName(VectorStores.deleteVectorStoreFile, "RemoveFileFromVectorStore");
1313
@@clientName(VectorStores.listVectorStores, "GetVectorStores");
1414
@@clientName(VectorStores.listFilesInVectorStoreBatch, "GetVectorStoreFilesInBatch");
1515
@@clientName(VectorStores.createVectorStoreFile, "AddFileToVectorStore");

src/Custom/VectorStores/VectorStoreClient.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ namespace OpenAI.VectorStores;
1717
[CodeGenSuppress("AddFileToVectorStoreAsync", typeof(string), typeof(InternalCreateVectorStoreFileRequest), typeof(CancellationToken))]
1818
[CodeGenSuppress("AddFileBatchToVectorStore", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest), typeof(CancellationToken))]
1919
[CodeGenSuppress("AddFileBatchToVectorStoreAsync", typeof(string), typeof(InternalCreateVectorStoreFileBatchRequest), typeof(CancellationToken))]
20-
[CodeGenSuppress("RemoveFileFromStore", typeof(string), typeof(string), typeof(CancellationToken))]
21-
[CodeGenSuppress("RemoveFileFromStoreAsync", typeof(string), typeof(string), typeof(CancellationToken))]
20+
[CodeGenSuppress("RemoveFileFromVectorStore", typeof(string), typeof(string), typeof(CancellationToken))]
21+
[CodeGenSuppress("RemoveFileFromVectorStoreAsync", typeof(string), typeof(string), typeof(CancellationToken))]
2222
[CodeGenSuppress("GetVectorStoreFile", typeof(string), typeof(string), typeof(CancellationToken))]
2323
[CodeGenSuppress("GetVectorStoreFileAsync", typeof(string), typeof(string), typeof(CancellationToken))]
2424
[CodeGenSuppress("GetVectorStoreFileBatch", typeof(string), typeof(string), typeof(CancellationToken))]
@@ -336,9 +336,9 @@ public virtual ClientResult<VectorStoreFile> GetVectorStoreFile(
336336
/// <param name="fileId"> The ID of the file to remove from the vector store. </param>
337337
/// <param name="cancellationToken">A token that can be used to cancel this method call.</param>
338338
/// <returns> A <see cref="FileFromStoreRemovalResult"/> instance. </returns>
339-
public virtual async Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default)
339+
public virtual async Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFromVectorStoreAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default)
340340
{
341-
ClientResult protocolResult = await RemoveFileFromStoreAsync(vectorStoreId, fileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false);
341+
ClientResult protocolResult = await RemoveFileFromVectorStoreAsync(vectorStoreId, fileId, cancellationToken.ToRequestOptions()).ConfigureAwait(false);
342342
PipelineResponse protocolResponse = protocolResult?.GetRawResponse();
343343
FileFromStoreRemovalResult value = (FileFromStoreRemovalResult)protocolResult;
344344
return ClientResult.FromValue(value, protocolResponse);
@@ -355,9 +355,9 @@ public virtual async Task<ClientResult<FileFromStoreRemovalResult>> RemoveFileFr
355355
/// <param name="fileId"> The ID of the file to remove from the vector store. </param>
356356
/// <param name="cancellationToken">A token that can be used to cancel this method call.</param>
357357
/// <returns> A <see cref="FileFromStoreRemovalResult"/> instance. </returns>
358-
public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default)
358+
public virtual ClientResult<FileFromStoreRemovalResult> RemoveFileFromVectorStore(string vectorStoreId, string fileId, CancellationToken cancellationToken = default)
359359
{
360-
ClientResult protocolResult = RemoveFileFromStore(vectorStoreId, fileId, cancellationToken.ToRequestOptions());
360+
ClientResult protocolResult = RemoveFileFromVectorStore(vectorStoreId, fileId, cancellationToken.ToRequestOptions());
361361
PipelineResponse protocolResponse = protocolResult?.GetRawResponse();
362362
FileFromStoreRemovalResult value = (FileFromStoreRemovalResult)protocolResult;
363363
return ClientResult.FromValue(value, protocolResponse);

src/Generated/VectorStoreClient.RestClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ internal virtual PipelineMessage CreateGetVectorStoreFileRequest(string vectorSt
245245
return message;
246246
}
247247

248-
internal virtual PipelineMessage CreateRemoveFileFromStoreRequest(string vectorStoreId, string fileId, RequestOptions options)
248+
internal virtual PipelineMessage CreateRemoveFileFromVectorStoreRequest(string vectorStoreId, string fileId, RequestOptions options)
249249
{
250250
ClientUriBuilder uri = new ClientUriBuilder();
251251
uri.Reset(_endpoint);

src/Generated/VectorStoreClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,21 @@ public virtual async Task<ClientResult> GetVectorStoreFileAsync(string vectorSto
351351
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
352352
}
353353

354-
public virtual ClientResult RemoveFileFromStore(string vectorStoreId, string fileId, RequestOptions options)
354+
public virtual ClientResult RemoveFileFromVectorStore(string vectorStoreId, string fileId, RequestOptions options)
355355
{
356356
Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId));
357357
Argument.AssertNotNullOrEmpty(fileId, nameof(fileId));
358358

359-
using PipelineMessage message = CreateRemoveFileFromStoreRequest(vectorStoreId, fileId, options);
359+
using PipelineMessage message = CreateRemoveFileFromVectorStoreRequest(vectorStoreId, fileId, options);
360360
return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options));
361361
}
362362

363-
public virtual async Task<ClientResult> RemoveFileFromStoreAsync(string vectorStoreId, string fileId, RequestOptions options)
363+
public virtual async Task<ClientResult> RemoveFileFromVectorStoreAsync(string vectorStoreId, string fileId, RequestOptions options)
364364
{
365365
Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId));
366366
Argument.AssertNotNullOrEmpty(fileId, nameof(fileId));
367367

368-
using PipelineMessage message = CreateRemoveFileFromStoreRequest(vectorStoreId, fileId, options);
368+
using PipelineMessage message = CreateRemoveFileFromVectorStoreRequest(vectorStoreId, fileId, options);
369369
return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false));
370370
}
371371

tests/Assistants/Assistants.VectorStoresTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ public async Task CanAssociateFiles()
225225
}
226226

227227
FileFromStoreRemovalResult removalResult = IsAsync
228-
? await client.RemoveFileFromStoreAsync(vectorStore.Id, files[0].Id)
229-
: client.RemoveFileFromStore(vectorStore.Id, files[0].Id);
228+
? await client.RemoveFileFromVectorStoreAsync(vectorStore.Id, files[0].Id)
229+
: client.RemoveFileFromVectorStore(vectorStore.Id, files[0].Id);
230230
Assert.That(removalResult.FileId, Is.EqualTo(files[0].Id));
231231
Assert.True(removalResult.Removed);
232232
_vectorStoreFilesToRemove.RemoveAt(0);
@@ -282,7 +282,7 @@ public async Task Pagination_CanRehydrateVectorStoreFileCollectionAsync()
282282
});
283283
}
284284

285-
FileFromStoreRemovalResult removalResult = await client.RemoveFileFromStoreAsync(vectorStore.Id, files[0].Id);
285+
FileFromStoreRemovalResult removalResult = await client.RemoveFileFromVectorStoreAsync(vectorStore.Id, files[0].Id);
286286
Assert.That(removalResult.FileId, Is.EqualTo(files[0].Id));
287287
Assert.True(removalResult.Removed);
288288
_vectorStoreFilesToRemove.RemoveAt(0);
@@ -362,7 +362,7 @@ public void Pagination_CanRehydrateVectorStoreFileCollection()
362362
});
363363
}
364364

365-
FileFromStoreRemovalResult removalResult = client.RemoveFileFromStore(vectorStore.Id, files[0].Id);
365+
FileFromStoreRemovalResult removalResult = client.RemoveFileFromVectorStore(vectorStore.Id, files[0].Id);
366366
Assert.That(removalResult.FileId, Is.EqualTo(files[0].Id));
367367
Assert.True(removalResult.Removed);
368368
_vectorStoreFilesToRemove.RemoveAt(0);
@@ -896,7 +896,7 @@ protected void Cleanup()
896896
}
897897
foreach (VectorStoreFile vectorStoreFile in _vectorStoreFilesToRemove)
898898
{
899-
ClientResult protocolResult = vectorStoreClient.RemoveFileFromStore(vectorStoreFile.VectorStoreId, vectorStoreFile.FileId, requestOptions);
899+
ClientResult protocolResult = vectorStoreClient.RemoveFileFromVectorStore(vectorStoreFile.VectorStoreId, vectorStoreFile.FileId, requestOptions);
900900
Console.WriteLine($"Cleanup: {vectorStoreFile.FileId}<->{vectorStoreFile.VectorStoreId} => {protocolResult?.GetRawResponse()?.Status}");
901901
}
902902
foreach (OpenAIFile file in _filesToDelete)

tspCodeModel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117102,13 +117102,13 @@
117102117102
{
117103117103
"$id": "8699",
117104117104
"kind": "basic",
117105-
"name": "RemoveFileFromStore",
117105+
"name": "RemoveFileFromVectorStore",
117106117106
"accessibility": "public",
117107117107
"apiVersions": [],
117108117108
"summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.",
117109117109
"operation": {
117110117110
"$id": "8700",
117111-
"name": "RemoveFileFromStore",
117111+
"name": "RemoveFileFromVectorStore",
117112117112
"resourceName": "VectorStores",
117113117113
"summary": "Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. To delete the file, use the [delete file](/docs/api-reference/files/delete) endpoint.",
117114117114
"accessibility": "public",

0 commit comments

Comments
 (0)