diff --git a/api/OpenAI.net8.0.cs b/api/OpenAI.net8.0.cs index f96c9886e..0be29205b 100644 --- a/api/OpenAI.net8.0.cs +++ b/api/OpenAI.net8.0.cs @@ -5331,18 +5331,14 @@ public class OpenAIResponseClient { public virtual ClientResult DeleteResponse(string responseId, CancellationToken cancellationToken = default); public virtual Task DeleteResponseAsync(string responseId, RequestOptions options); public virtual Task> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default); - public virtual CollectionResult GetInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual CollectionResult GetInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options); - public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options); public virtual ClientResult GetResponse(string responseId, bool? stream, int? startingAfter, RequestOptions options); public virtual ClientResult GetResponse(string responseId, CancellationToken cancellationToken = default); public virtual Task GetResponseAsync(string responseId, bool? stream, int? startingAfter, RequestOptions options); public virtual Task> GetResponseAsync(string responseId, CancellationToken cancellationToken = default); public virtual CollectionResult GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options = null); + public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options); public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options = null); + public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options); public virtual CollectionResult GetResponseStreaming(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default); public virtual AsyncCollectionResult GetResponseStreamingAsync(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default); } diff --git a/api/OpenAI.netstandard2.0.cs b/api/OpenAI.netstandard2.0.cs index 882507b8a..3b3604751 100644 --- a/api/OpenAI.netstandard2.0.cs +++ b/api/OpenAI.netstandard2.0.cs @@ -4703,18 +4703,14 @@ public class OpenAIResponseClient { public virtual ClientResult DeleteResponse(string responseId, CancellationToken cancellationToken = default); public virtual Task DeleteResponseAsync(string responseId, RequestOptions options); public virtual Task> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default); - public virtual CollectionResult GetInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual CollectionResult GetInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options); - public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options); public virtual ClientResult GetResponse(string responseId, bool? stream, int? startingAfter, RequestOptions options); public virtual ClientResult GetResponse(string responseId, CancellationToken cancellationToken = default); public virtual Task GetResponseAsync(string responseId, bool? stream, int? startingAfter, RequestOptions options); public virtual Task> GetResponseAsync(string responseId, CancellationToken cancellationToken = default); public virtual CollectionResult GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options = null); + public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options); public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = null, CancellationToken cancellationToken = default); - public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options = null); + public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options); public virtual CollectionResult GetResponseStreaming(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default); public virtual AsyncCollectionResult GetResponseStreamingAsync(string responseId, int? startingAfter = null, CancellationToken cancellationToken = default); } diff --git a/codegen/generator/src/Visitors/PaginationVisitor.cs b/codegen/generator/src/Visitors/PaginationVisitor.cs index bf24fa3c1..27aa260a4 100644 --- a/codegen/generator/src/Visitors/PaginationVisitor.cs +++ b/codegen/generator/src/Visitors/PaginationVisitor.cs @@ -88,11 +88,11 @@ public class PaginationVisitor : ScmLibraryVisitor ("ContainerFileResource", "ContainerFileCollectionOptions", _paginationParamsToReplace) }, { - "GetInputItems", + "GetResponseInputItems", ("ResponseItem", "ResponseItemCollectionOptions", _paginationParamsToReplace) }, { - "GetInputItemsAsync", + "GetResponseInputItemsAsync", ("ResponseItem", "ResponseItemCollectionOptions", _paginationParamsToReplace) }, { diff --git a/specification/client/responses.client.tsp b/specification/client/responses.client.tsp index b01bd7c59..d1231e577 100644 --- a/specification/client/responses.client.tsp +++ b/specification/client/responses.client.tsp @@ -69,6 +69,8 @@ using Azure.ClientGenerator.Core; @@clientName(MCPToolFilter.read_only, "IsReadOnly"); +@@clientName(Responses.listInputItems, "GetResponseInputItems"); + // ------------ Streaming ------------ @@alternateType(ResponseFunctionCallArgumentsDoneEvent.arguments, unknown); diff --git a/src/Custom/Responses/OpenAIResponseClient.Protocol.cs b/src/Custom/Responses/OpenAIResponseClient.Protocol.cs index 795f65d8b..234711a31 100644 --- a/src/Custom/Responses/OpenAIResponseClient.Protocol.cs +++ b/src/Custom/Responses/OpenAIResponseClient.Protocol.cs @@ -32,30 +32,4 @@ public virtual ClientResult GetResponse(string responseId, bool? stream, int? st PipelineResponse protocolResponse = Pipeline.ProcessMessage(message, options); return ClientResult.FromResponse(protocolResponse); } - - public virtual AsyncCollectionResult GetResponseInputItemsAsync( - string responseId, - int? limit, - string order, - string after, - string before, - RequestOptions options = null) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - - return new AsyncResponseItemCollectionResult(this, responseId, limit, order, after, before, options); - } - - public virtual CollectionResult GetResponseInputItems( - string responseId, - int? limit, - string order, - string after, - string before, - RequestOptions options = null) - { - Argument.AssertNotNull(responseId, nameof(responseId)); - - return new ResponseItemCollectionResult(this, responseId, limit, order, after, before, options); - } } \ No newline at end of file diff --git a/src/Custom/Responses/OpenAIResponseClient.cs b/src/Custom/Responses/OpenAIResponseClient.cs index 9bf32b83f..55c7db9ba 100644 --- a/src/Custom/Responses/OpenAIResponseClient.cs +++ b/src/Custom/Responses/OpenAIResponseClient.cs @@ -266,34 +266,6 @@ public virtual CollectionResult GetResponseStreaming(st cancellationToken); } - public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); - - AsyncCollectionResult result = GetResponseInputItemsAsync(responseId, options?.PageSizeLimit, options?.Order?.ToString(), options?.AfterId, options?.BeforeId, cancellationToken.ToRequestOptions()); - - if (result is not AsyncCollectionResult responsesItemCollection) - { - throw new InvalidOperationException("Failed to cast protocol return type to expected collection type 'AsyncCollectionResult'."); - } - - return responsesItemCollection; - } - - public virtual CollectionResult GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = default, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); - - CollectionResult result = GetResponseInputItems(responseId, options?.PageSizeLimit, options?.Order?.ToString(), options?.AfterId, options?.BeforeId, cancellationToken.ToRequestOptions()); - - if (result is not CollectionResult responsesItemCollection) - { - throw new InvalidOperationException("Failed to cast protocol return type to expected collection type 'CollectionResult'."); - } - - return responsesItemCollection; - } - public virtual async Task> DeleteResponseAsync(string responseId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); diff --git a/src/Custom/Responses/Pagination/Internal/AsyncResponseItemCollectionResult.cs b/src/Custom/Responses/Pagination/Internal/AsyncResponseItemCollectionResult.cs index 234b51bc3..a1ce3460d 100644 --- a/src/Custom/Responses/Pagination/Internal/AsyncResponseItemCollectionResult.cs +++ b/src/Custom/Responses/Pagination/Internal/AsyncResponseItemCollectionResult.cs @@ -83,7 +83,7 @@ public async Task GetNextPageAsync(ClientResult result) internal virtual async Task GetResponsesAsync(string responseId, int? limit, string? order, string? after, string? before, RequestOptions? options) { - using PipelineMessage message = _parentClient.CreateGetInputItemsRequest(responseId, limit, order, after, before, options); + using PipelineMessage message = _parentClient.CreateGetResponseInputItemsRequest(responseId, limit, order, after, before, options); return ClientResult.FromResponse(await _parentClient.Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } } diff --git a/src/Custom/Responses/Pagination/Internal/ResponseItemCollectionResult.cs b/src/Custom/Responses/Pagination/Internal/ResponseItemCollectionResult.cs index 8be6a574b..1b143ecc3 100644 --- a/src/Custom/Responses/Pagination/Internal/ResponseItemCollectionResult.cs +++ b/src/Custom/Responses/Pagination/Internal/ResponseItemCollectionResult.cs @@ -91,7 +91,7 @@ public static bool HasNextPage(ClientResult result) internal virtual ClientResult GetResponseInputItems(string responseId, int? limit, string? order, string? after, string? before, RequestOptions? options) { - using PipelineMessage message = _parentClient.CreateGetInputItemsRequest(responseId, limit, order, after, before, options); + using PipelineMessage message = _parentClient.CreateGetResponseInputItemsRequest(responseId, limit, order, after, before, options); return ClientResult.FromResponse(_parentClient.Pipeline.ProcessMessage(message, options)); } } diff --git a/src/Generated/OpenAIResponseClient.RestClient.cs b/src/Generated/OpenAIResponseClient.RestClient.cs index 3f81aea69..428d561ef 100644 --- a/src/Generated/OpenAIResponseClient.RestClient.cs +++ b/src/Generated/OpenAIResponseClient.RestClient.cs @@ -84,7 +84,7 @@ internal virtual PipelineMessage CreateCancelResponseRequest(string responseId, return message; } - internal virtual PipelineMessage CreateGetInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options) + internal virtual PipelineMessage CreateGetResponseInputItemsRequest(string responseId, int? limit, string order, string after, string before, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); diff --git a/src/Generated/OpenAIResponseClient.cs b/src/Generated/OpenAIResponseClient.cs index 5d2b736b2..997f64522 100644 --- a/src/Generated/OpenAIResponseClient.cs +++ b/src/Generated/OpenAIResponseClient.cs @@ -77,11 +77,11 @@ public virtual async Task CancelResponseAsync(string responseId, R return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } - public virtual CollectionResult GetInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options) + public virtual CollectionResult GetResponseInputItems(string responseId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); - return new OpenAIResponseClientGetInputItemsCollectionResult( + return new OpenAIResponseClientGetResponseInputItemsCollectionResult( this, responseId, limit, @@ -91,11 +91,11 @@ public virtual CollectionResult GetInputItems(string responseId, int? limit, str options); } - public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options) + public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); - return new OpenAIResponseClientGetInputItemsAsyncCollectionResult( + return new OpenAIResponseClientGetResponseInputItemsAsyncCollectionResult( this, responseId, limit, @@ -105,11 +105,11 @@ public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, int? options); } - public virtual CollectionResult GetInputItems(string responseId, ResponseItemCollectionOptions options = default, CancellationToken cancellationToken = default) + public virtual CollectionResult GetResponseInputItems(string responseId, ResponseItemCollectionOptions options = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); - return new OpenAIResponseClientGetInputItemsCollectionResultOfT( + return new OpenAIResponseClientGetResponseInputItemsCollectionResultOfT( this, responseId, options?.PageSizeLimit, @@ -119,11 +119,11 @@ public virtual CollectionResult GetInputItems(string responseId, R cancellationToken.CanBeCanceled ? new RequestOptions { CancellationToken = cancellationToken } : null); } - public virtual AsyncCollectionResult GetInputItemsAsync(string responseId, ResponseItemCollectionOptions options = default, CancellationToken cancellationToken = default) + public virtual AsyncCollectionResult GetResponseInputItemsAsync(string responseId, ResponseItemCollectionOptions options = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); - return new OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT( + return new OpenAIResponseClientGetResponseInputItemsAsyncCollectionResultOfT( this, responseId, options?.PageSizeLimit, diff --git a/src/Generated/OpenAIResponseClientGetInputItemsAsyncCollectionResult.cs b/src/Generated/OpenAIResponseClientGetResponseInputItemsAsyncCollectionResult.cs similarity index 77% rename from src/Generated/OpenAIResponseClientGetInputItemsAsyncCollectionResult.cs rename to src/Generated/OpenAIResponseClientGetResponseInputItemsAsyncCollectionResult.cs index 6a711dbdf..94a91847a 100644 --- a/src/Generated/OpenAIResponseClientGetInputItemsAsyncCollectionResult.cs +++ b/src/Generated/OpenAIResponseClientGetResponseInputItemsAsyncCollectionResult.cs @@ -10,7 +10,7 @@ namespace OpenAI.Responses { - internal partial class OpenAIResponseClientGetInputItemsAsyncCollectionResult : AsyncCollectionResult + internal partial class OpenAIResponseClientGetResponseInputItemsAsyncCollectionResult : AsyncCollectionResult { private readonly OpenAIResponseClient _client; private readonly string _responseId; @@ -20,7 +20,7 @@ internal partial class OpenAIResponseClientGetInputItemsAsyncCollectionResult : private readonly string _before; private readonly RequestOptions _options; - public OpenAIResponseClientGetInputItemsAsyncCollectionResult(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) + public OpenAIResponseClientGetResponseInputItemsAsyncCollectionResult(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); @@ -35,7 +35,7 @@ public OpenAIResponseClientGetInputItemsAsyncCollectionResult(OpenAIResponseClie public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); + PipelineMessage message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); string nextToken = null; while (true) { @@ -50,7 +50,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); + message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); } } diff --git a/src/Generated/OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT.cs b/src/Generated/OpenAIResponseClientGetResponseInputItemsAsyncCollectionResultOfT.cs similarity index 79% rename from src/Generated/OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT.cs rename to src/Generated/OpenAIResponseClientGetResponseInputItemsAsyncCollectionResultOfT.cs index 6cc686149..9b5e7dd0d 100644 --- a/src/Generated/OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT.cs +++ b/src/Generated/OpenAIResponseClientGetResponseInputItemsAsyncCollectionResultOfT.cs @@ -11,7 +11,7 @@ namespace OpenAI.Responses { - internal partial class OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT : AsyncCollectionResult + internal partial class OpenAIResponseClientGetResponseInputItemsAsyncCollectionResultOfT : AsyncCollectionResult { private readonly OpenAIResponseClient _client; private readonly string _responseId; @@ -21,7 +21,7 @@ internal partial class OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT private readonly string _before; private readonly RequestOptions _options; - public OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) + public OpenAIResponseClientGetResponseInputItemsAsyncCollectionResultOfT(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); @@ -36,7 +36,7 @@ public OpenAIResponseClientGetInputItemsAsyncCollectionResultOfT(OpenAIResponseC public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); + PipelineMessage message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); string nextToken = null; while (true) { @@ -51,7 +51,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); + message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); } } diff --git a/src/Generated/OpenAIResponseClientGetInputItemsCollectionResult.cs b/src/Generated/OpenAIResponseClientGetResponseInputItemsCollectionResult.cs similarity index 77% rename from src/Generated/OpenAIResponseClientGetInputItemsCollectionResult.cs rename to src/Generated/OpenAIResponseClientGetResponseInputItemsCollectionResult.cs index b9e4e8136..2f65071e4 100644 --- a/src/Generated/OpenAIResponseClientGetInputItemsCollectionResult.cs +++ b/src/Generated/OpenAIResponseClientGetResponseInputItemsCollectionResult.cs @@ -10,7 +10,7 @@ namespace OpenAI.Responses { - internal partial class OpenAIResponseClientGetInputItemsCollectionResult : CollectionResult + internal partial class OpenAIResponseClientGetResponseInputItemsCollectionResult : CollectionResult { private readonly OpenAIResponseClient _client; private readonly string _responseId; @@ -20,7 +20,7 @@ internal partial class OpenAIResponseClientGetInputItemsCollectionResult : Colle private readonly string _before; private readonly RequestOptions _options; - public OpenAIResponseClientGetInputItemsCollectionResult(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) + public OpenAIResponseClientGetResponseInputItemsCollectionResult(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); @@ -35,7 +35,7 @@ public OpenAIResponseClientGetInputItemsCollectionResult(OpenAIResponseClient cl public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); + PipelineMessage message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); string nextToken = null; while (true) { @@ -50,7 +50,7 @@ public override IEnumerable GetRawPages() { yield break; } - message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); + message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); } } diff --git a/src/Generated/OpenAIResponseClientGetInputItemsCollectionResultOfT.cs b/src/Generated/OpenAIResponseClientGetResponseInputItemsCollectionResultOfT.cs similarity index 78% rename from src/Generated/OpenAIResponseClientGetInputItemsCollectionResultOfT.cs rename to src/Generated/OpenAIResponseClientGetResponseInputItemsCollectionResultOfT.cs index 39c54018c..8aabb67fe 100644 --- a/src/Generated/OpenAIResponseClientGetInputItemsCollectionResultOfT.cs +++ b/src/Generated/OpenAIResponseClientGetResponseInputItemsCollectionResultOfT.cs @@ -10,7 +10,7 @@ namespace OpenAI.Responses { - internal partial class OpenAIResponseClientGetInputItemsCollectionResultOfT : CollectionResult + internal partial class OpenAIResponseClientGetResponseInputItemsCollectionResultOfT : CollectionResult { private readonly OpenAIResponseClient _client; private readonly string _responseId; @@ -20,7 +20,7 @@ internal partial class OpenAIResponseClientGetInputItemsCollectionResultOfT : Co private readonly string _before; private readonly RequestOptions _options; - public OpenAIResponseClientGetInputItemsCollectionResultOfT(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) + public OpenAIResponseClientGetResponseInputItemsCollectionResultOfT(OpenAIResponseClient client, string responseId, int? limit, string order, string after, string before, RequestOptions options) { Argument.AssertNotNullOrEmpty(responseId, nameof(responseId)); @@ -35,7 +35,7 @@ public OpenAIResponseClientGetInputItemsCollectionResultOfT(OpenAIResponseClient public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); + PipelineMessage message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, _after, _before, _options); string nextToken = null; while (true) { @@ -50,7 +50,7 @@ public override IEnumerable GetRawPages() { yield break; } - message = _client.CreateGetInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); + message = _client.CreateGetResponseInputItemsRequest(_responseId, _limit, _order, nextToken, _before, _options); } } diff --git a/tests/FineTuning/FineTuningClientTests.cs b/tests/FineTuning/FineTuningClientTests.cs index 4038dc5f5..e40bf08da 100644 --- a/tests/FineTuning/FineTuningClientTests.cs +++ b/tests/FineTuning/FineTuningClientTests.cs @@ -204,7 +204,7 @@ await client.FineTuneAsync( } [Test] - public async Task GetJobs() + public void GetJobs() { FineTuningClient client = GetTestClient(); diff --git a/tests/Responses/ResponseStoreTests.cs b/tests/Responses/ResponseStoreTests.cs index 092a88161..7bb72519b 100644 --- a/tests/Responses/ResponseStoreTests.cs +++ b/tests/Responses/ResponseStoreTests.cs @@ -47,7 +47,7 @@ public async Task GetInputItemsWithPagination() int totalCount = 0; string lastId = null; - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, options)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, options)) { totalCount++; lastId = item.Id; @@ -92,7 +92,7 @@ public async Task GetInputItemsWithMultiPartPagination() string lastId = null; bool hasMultipleContentParts = false; - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, options)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, options)) { totalCount++; lastId = item.Id; @@ -127,7 +127,7 @@ public async Task GetInputItemsWithAfterIdPagination() OpenAIResponse response = await client.CreateResponseAsync(inputItems); string afterId = null; - await foreach (ResponseItem first in client.GetInputItemsAsync(response.Id)) + await foreach (ResponseItem first in client.GetResponseInputItemsAsync(response.Id)) { afterId = first.Id; break; @@ -142,7 +142,7 @@ public async Task GetInputItemsWithAfterIdPagination() PageSizeLimit = 2 }; - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, options)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, options)) { count++; Assert.That(item.Id, Is.Not.EqualTo(afterId)); @@ -174,7 +174,7 @@ public async Task GetInputItemsWithOrderFiltering() }; var asc = new List(); - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, ascOptions)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, ascOptions)) { asc.Add(item); if (asc.Count >= 2) break; @@ -188,7 +188,7 @@ public async Task GetInputItemsWithOrderFiltering() }; var desc = new List(); - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, descOptions)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, descOptions)) { desc.Add(item); if (desc.Count >= 2) break; @@ -216,7 +216,7 @@ public async Task GetInputItemsHandlesLargeLimits() var options = new ResponseItemCollectionOptions() { PageSizeLimit = 100 }; int count = 0; - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, options)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, options)) { count++; Assert.That(item.Id, Is.Not.Null.And.Not.Empty); @@ -241,7 +241,7 @@ public async Task GetInputItemsWithMinimalLimits() var options = new ResponseItemCollectionOptions() { PageSizeLimit = 1 }; int count = 0; - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, options)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, options)) { count++; Assert.That(item.Id, Is.Not.Null.And.Not.Empty); @@ -268,7 +268,7 @@ public async Task GetInputItemsWithCancellationToken() try { int count = 0; - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, cancellationToken: cts.Token)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, cancellationToken: cts.Token)) { count++; Assert.That(item.Id, Is.Not.Null.And.Not.Empty); @@ -308,7 +308,7 @@ public async Task GetInputItemsWithCombinedOptions() }; var items = new List(); - await foreach (ResponseItem item in client.GetInputItemsAsync(response.Id, options, cts.Token)) + await foreach (ResponseItem item in client.GetResponseInputItemsAsync(response.Id, options, cts.Token)) { items.Add(item); Assert.That(item.Id, Is.Not.Null.And.Not.Empty); diff --git a/tspCodeModel.json b/tspCodeModel.json index 2d2ce0250..1db3e25c5 100644 --- a/tspCodeModel.json +++ b/tspCodeModel.json @@ -110262,13 +110262,13 @@ { "$id": "8282", "kind": "paging", - "name": "listInputItems", + "name": "GetResponseInputItems", "accessibility": "public", "apiVersions": [], "doc": "Returns a list of input items for a given response.", "operation": { "$id": "8283", - "name": "listInputItems", + "name": "GetResponseInputItems", "resourceName": "Responses", "doc": "Returns a list of input items for a given response.", "accessibility": "public",