fix: cleanup based on copilot review comments

This commit is contained in:
Stevan Freeborn
2025-05-19 15:28:08 -05:00
parent e2d4ee735a
commit 5d4fb290ba
3 changed files with 12 additions and 3 deletions
+9
View File
@@ -3,9 +3,18 @@
"dotnet.defaultSolution": "AnthropicClient.sln",
"cSpell.words": [
"Browsable",
"buildtransitive",
"contentfiles",
"Docfx",
"globaltool",
"haikus",
"Linq",
"msbuild",
"nameof",
"reportgenerator",
"reporttypes",
"Szalay",
"targetdir",
"typeof"
],
"dotnet.unitTests.runSettingsPath": "./tests/AnthropicClient.Tests/.runsettings"
+1 -1
View File
@@ -303,7 +303,7 @@ public class AnthropicApiClient : IAnthropicApiClient
return AnthropicResult<IAsyncEnumerable<MessageBatchResultItem>>.Success(ReadResultsAsync(), anthropicHeaders);
async IAsyncEnumerable<MessageBatchResultItem> ReadResultsAsync([EnumeratorCancellation] CancellationToken ct = default)
async IAsyncEnumerable<MessageBatchResultItem> ReadResultsAsync()
{
using var responseContent = await response.Content.ReadAsStreamAsync();
using var streamReader = new StreamReader(responseContent);
+2 -2
View File
@@ -88,7 +88,7 @@ public interface IAnthropicApiClient
Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request, CancellationToken cancellationToken = default);
/// <summary>
/// Lists the models asynchronously.
/// Lists the models asynchronously getting a page of models.
/// </summary>
/// <param name="request">The paging request to use for listing the models.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
@@ -96,7 +96,7 @@ public interface IAnthropicApiClient
Task<AnthropicResult<Page<AnthropicModel>>> ListModelsAsync(PagingRequest? request = null, CancellationToken cancellationToken = default);
/// <summary>
/// Lists the models asynchronously
/// Lists the model asynchronously getting all the pages of models.
/// </summary>
/// <param name="limit">The maximum number of models to return in each page.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>