fix: cleanup based on copilot review comments
This commit is contained in:
Vendored
+9
@@ -3,9 +3,18 @@
|
|||||||
"dotnet.defaultSolution": "AnthropicClient.sln",
|
"dotnet.defaultSolution": "AnthropicClient.sln",
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Browsable",
|
"Browsable",
|
||||||
|
"buildtransitive",
|
||||||
|
"contentfiles",
|
||||||
|
"Docfx",
|
||||||
|
"globaltool",
|
||||||
"haikus",
|
"haikus",
|
||||||
|
"Linq",
|
||||||
|
"msbuild",
|
||||||
"nameof",
|
"nameof",
|
||||||
|
"reportgenerator",
|
||||||
|
"reporttypes",
|
||||||
"Szalay",
|
"Szalay",
|
||||||
|
"targetdir",
|
||||||
"typeof"
|
"typeof"
|
||||||
],
|
],
|
||||||
"dotnet.unitTests.runSettingsPath": "./tests/AnthropicClient.Tests/.runsettings"
|
"dotnet.unitTests.runSettingsPath": "./tests/AnthropicClient.Tests/.runsettings"
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ public class AnthropicApiClient : IAnthropicApiClient
|
|||||||
|
|
||||||
return AnthropicResult<IAsyncEnumerable<MessageBatchResultItem>>.Success(ReadResultsAsync(), anthropicHeaders);
|
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 responseContent = await response.Content.ReadAsStreamAsync();
|
||||||
using var streamReader = new StreamReader(responseContent);
|
using var streamReader = new StreamReader(responseContent);
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public interface IAnthropicApiClient
|
|||||||
Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request, CancellationToken cancellationToken = default);
|
Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Lists the models asynchronously.
|
/// Lists the models asynchronously getting a page of models.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The paging request to use for listing the models.</param>
|
/// <param name="request">The paging request to use for listing the models.</param>
|
||||||
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</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);
|
Task<AnthropicResult<Page<AnthropicModel>>> ListModelsAsync(PagingRequest? request = null, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Lists the models asynchronously
|
/// Lists the model asynchronously getting all the pages of models.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="limit">The maximum number of models to return in each page.</param>
|
/// <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>
|
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
|
||||||
|
|||||||
Reference in New Issue
Block a user