36 Commits
Author SHA1 Message Date
Stevan Freeborn a455090f6f chore(release): 0.6.1 [skip ci] 2025-05-19 20:33:31 +00:00
Stevan Freeborn 69484ffb93 Merge pull request #34 from StevanFreeborn/stevanfreeborn/fix/add-cancellation-token-support
fix: add cancellation token support
2025-05-19 15:33:09 -05:00
Stevan FreebornandCopilot 16ee80a3a4 docs: update src/AnthropicClient/IAnthropicApiClient.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-19 15:30:29 -05:00
Stevan FreebornandCopilot 702685bd10 docs: update src/AnthropicClient/IAnthropicApiClient.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-19 15:30:12 -05:00
Stevan Freeborn 5d4fb290ba fix: cleanup based on copilot review comments 2025-05-19 15:28:08 -05:00
Stevan Freeborn e2d4ee735a chore: update workflows to use .NET 9 2025-05-19 15:21:51 -05:00
Stevan Freeborn e68428c8ba chore: upgrade dependencies 2025-05-19 15:16:53 -05:00
Stevan Freeborn 24ecff969e chore: upgrade test project to .NET 9 2025-05-19 15:14:50 -05:00
Stevan Freeborn 595326c7a9 fix: cleanup copilot mistakes with passing cancellation token to methods that don't accept them 2025-05-19 15:14:11 -05:00
Stevan Freeborn 0a1c6a0135 fix: copilot first attempt 2025-05-19 19:52:16 +00:00
Stevan Freeborn 02e34bb0ab docs: documentation for v0.6.0 [skip ci] 2025-01-15 16:33:05 +00:00
Stevan Freeborn e8a3d6c6cd chore(release): 0.6.0 [skip ci] 2025-01-15 16:32:24 +00:00
Stevan Freeborn 26e5d297bb Merge pull request #31 from StevanFreeborn/stevanfreeborn/feat/add-support-for-message-batching
feat: add support for message batching api
2025-01-15 10:31:54 -06:00
Stevan Freeborn fc2932f3c5 chore: run dotnet format 2025-01-15 10:30:02 -06:00
Stevan Freeborn ee9dbcf647 docs: fix example 2025-01-15 10:29:23 -06:00
Stevan Freeborn 07cadf17af docs: add examples for message batch api methods 2025-01-15 10:23:59 -06:00
Stevan Freeborn 2794c52c2a docs: stub out batch documentation 2025-01-14 13:52:46 -06:00
Stevan Freeborn 56b3a53a2a feat: add DeleteMessageBatchAsync method and MessageBatchDeleteResponse model with tests 2025-01-14 13:41:32 -06:00
Stevan Freeborn 7ec931dda5 refactor: add private method to dry class up a bit 2025-01-14 13:14:14 -06:00
Stevan Freeborn a3ac1001f6 tests: add end to end test for canceling a batch 2025-01-14 12:57:52 -06:00
Stevan Freeborn c11600c770 feat: add CancelMessageBatchAsync method and corresponding tests 2025-01-13 13:11:47 -06:00
Stevan Freeborn 180a090195 feat: add ListAllMessageBatchesAsync method and corresponding tests 2025-01-13 12:42:23 -06:00
Stevan Freeborn ca2ecdcfc7 feat: implement ListMessageBatchesAsync method 2025-01-12 13:46:05 -06:00
Stevan Freeborn 876c6f571c tests: cover null responses 2025-01-12 13:26:31 -06:00
Stevan Freeborn 299af3b759 tests: add test for batch result type and succeeded batch result model 2025-01-10 22:52:46 -06:00
Stevan Freeborn 3034544ca4 refactor: move local function below return 2025-01-09 23:40:55 -06:00
Stevan Freeborn c56adf394c feat: implement GetMessageBatchResultsAsync method 2025-01-09 23:17:41 -06:00
Stevan Freeborn 0a6d89bd77 fix: default nullable properties to actually datetimeoffset min value when new'd up 2025-01-08 23:20:21 -06:00
Stevan Freeborn c5f3c5eca5 feat: implement GetMessageBatchAsync method 2025-01-08 23:15:24 -06:00
Stevan Freeborn f8e01bf487 feat: add class for representing batch statuses 2025-01-08 22:46:17 -06:00
Stevan Freeborn 779a5ca281 tests: add end-to-end test for creating a message batch 2025-01-08 22:33:27 -06:00
Stevan Freeborn 854e4642ab tests: add integration tests for remaining 🥲 and 😀 paths 2025-01-08 22:33:09 -06:00
Stevan Freeborn 15f5ad49e7 fix: make correct properties nullable 2025-01-08 22:32:36 -06:00
Stevan Freeborn 5e247a3c3a fix: use proper count tokens endpoint 2025-01-08 20:39:16 -06:00
Stevan Freeborn 9548754d6c feat: implement CreateMessageBatchAsync method 2025-01-08 20:37:58 -06:00
Stevan Freeborn fe39f10382 docs: documentation for v0.5.0 [skip ci] 2025-01-06 04:04:17 +00:00
70 changed files with 9937 additions and 171 deletions
+6 -6
View File
@@ -13,10 +13,10 @@ jobs:
with:
fetch-depth: 0
token: ${{ secrets.ACTIONS_PAT }}
- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Install versionize
run: dotnet tool install --global Versionize
- name: Setup git
@@ -53,10 +53,10 @@ jobs:
fetch-depth: 0
ref: ${{ github.ref }}
token: ${{ secrets.ACTIONS_PAT }}
- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Get project version
uses: kzrnm/get-net-sdk-project-versions-action@v1
id: get-version
@@ -88,10 +88,10 @@ jobs:
fetch-depth: 0
ref: ${{ github.ref }}
token: ${{ secrets.ACTIONS_PAT }}
- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Install Docfx
run: dotnet tool install --global docfx
- name: Get project version
+4 -4
View File
@@ -15,10 +15,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Restore dependencies
run: dotnet restore
- name: Format code
@@ -28,10 +28,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET 8
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-version: 9.x
- name: Install report generator
run: dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.3.7
- name: Restore dependencies
+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"
+190
View File
@@ -971,3 +971,193 @@ foreach (var content in response.Value.Content)
}
}
```
### Message Batches
Anthropic provides a feature called [Message Batches](https://docs.anthropic.com/en/docs/build-with-claude/message-batches) that allows you to send multiple messages in a single request. This feature is covered in depth in [Anthropic's API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/message-batches).
#### Create a message batch
You can create a message batch that will consist of one or more requests to create messages.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var response = await client.CreateMessageBatchAsync(request);
if (response.IsFailure)
{
Console.WriteLine("Failed to create message batch");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
Console.WriteLine("Message Batch Id: {0}", response.Value.Id);
```
#### Get a message batch
You can retrieve a message batch by its id.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var response = await client.GetMessageBatchAsync("batch-id");
if (response.IsFailure)
{
Console.WriteLine("Failed to get message batch");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
Console.WriteLine("Message Batch Id: {0}", response.Value.Id);
```
#### Get a message batch results
You can retrieve the results of a message batch by its id. The results are returned as an `IAsyncEnumerable` collection so that they can be streamed and processed as they are received.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var response = await client.GetMessageBatchResultsAsync("batch-id");
if (response.IsFailure)
{
Console.WriteLine("Failed to get message batch results");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
await foreach (var item in response.Value)
{
Console.WriteLine("Item Custom Id: {0}", result.CustomId);
switch (item.Result)
{
case SucceededMessageBatchResult successResult:
foreach (var content in successResult.Message.Content)
{
if (content is TextContent textContent)
{
Console.WriteLine("Message Batch Result: {0}", textContent.Text);
}
}
break;
default:
Console.WriteLine("Message Batch Result: {0}", item.Result.Type);
break;
}
}
```
#### List message batches
You can retrieve a page of message batches.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var response = await client.ListMessageBatchesAsync();
if (response.IsFailure)
{
Console.WriteLine("Failed to list message batches");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
foreach (var batch in response.Value.Data)
{
Console.WriteLine("Message Batch Id: {0}", batch.Id);
}
```
#### List all message batches
You can also retrieve all the pages of message batches without having to implement pagination yourself. This is done by returning an `IAsyncEnumerable` collection that can be streamed and processed as the pages are received.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var pageResponses = client.ListAllMessageBatchesAsync();
await foreach (var response in pageResponses)
{
if (response.IsFailure)
{
Console.WriteLine("Failed to list message batches");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
foreach (var batch in response.Value.Data)
{
Console.WriteLine("Message Batch Id: {0}", batch.Id);
}
}
```
#### Cancel a message batch
You can cancel a message batch by its id.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var response = await client.CancelMessageBatchAsync("batch-id");
if (response.IsFailure)
{
Console.WriteLine("Failed to cancel message batch");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
Console.WriteLine("Message Batch Id: {0}", response.Value.Id);
Console.WriteLine("Message Batch Status: {0}", response.Value.ProcessingStatus);
```
#### Delete a message batch
You can delete a message batch that is no longer being processed by its id.
```csharp
using AnthropicClient;
using AnthropicClient.Models;
var response = await client.DeleteMessageBatchAsync("batch-id");
if (response.IsFailure)
{
Console.WriteLine("Failed to delete message batch");
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
return;
}
Console.WriteLine("Message Batch Id: {0}", response.Value.Id);
```
@@ -89,7 +89,7 @@
<h1 id="AnthropicClient_AnthropicApiClient" data-uid="AnthropicClient.AnthropicApiClient" class="text-break">
Class AnthropicApiClient <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L39"><i class="bi bi-code-slash"></i></a>
Class AnthropicApiClient <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L12"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
@@ -163,7 +163,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
<h3 id="AnthropicClient_AnthropicApiClient__ctor_System_String_System_Net_Http_HttpClient_" data-uid="AnthropicClient.AnthropicApiClient.#ctor(System.String,System.Net.Http.HttpClient)">
AnthropicApiClient(string, HttpClient)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L61"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L36"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.AnthropicApiClient.html">AnthropicApiClient</a> class.</p>
@@ -205,11 +205,50 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
</h2>
<a id="AnthropicClient_AnthropicApiClient_CancelMessageBatchAsync_" data-uid="AnthropicClient.AnthropicApiClient.CancelMessageBatchAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_CancelMessageBatchAsync_System_String_" data-uid="AnthropicClient.AnthropicApiClient.CancelMessageBatchAsync(System.String)">
CancelMessageBatchAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L274"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Cancels a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;MessageBatchResponse&gt;&gt; CancelMessageBatchAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to cancel.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest)">
CountMessageTokensAsync(CountMessageTokensRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L267"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L322"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
@@ -248,7 +287,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
CreateMessageAsync(MessageRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L80"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L55"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a message asynchronously.</p>
@@ -287,7 +326,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_StreamMessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.StreamMessageRequest)">
CreateMessageAsync(StreamMessageRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L103"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L78"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a message asynchronously and streams the response.</p>
@@ -322,11 +361,362 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
<a id="AnthropicClient_AnthropicApiClient_CreateMessageBatchAsync_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageBatchAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageBatchAsync_AnthropicClient_Models_MessageBatchRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageBatchAsync(AnthropicClient.Models.MessageBatchRequest)">
CreateMessageBatchAsync(MessageBatchRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L242"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a batch of messages asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;MessageBatchResponse&gt;&gt; CreateMessageBatchAsync(MessageBatchRequest request)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.MessageBatchRequest.html">MessageBatchRequest</a></dt>
<dd><p>The message batch request to create.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_DeleteMessageBatchAsync_" data-uid="AnthropicClient.AnthropicApiClient.DeleteMessageBatchAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_DeleteMessageBatchAsync_System_String_" data-uid="AnthropicClient.AnthropicApiClient.DeleteMessageBatchAsync(System.String)">
DeleteMessageBatchAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L282"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Deletes a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;MessageBatchDeleteResponse&gt;&gt; DeleteMessageBatchAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to delete.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchDeleteResponse.html">MessageBatchDeleteResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchDeleteResponse.html">MessageBatchDeleteResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_GetMessageBatchAsync_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_GetMessageBatchAsync_System_String_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchAsync(System.String)">
GetMessageBatchAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L249"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;MessageBatchResponse&gt;&gt; GetMessageBatchAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to get.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_GetMessageBatchResultsAsync_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchResultsAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_GetMessageBatchResultsAsync_System_String_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchResultsAsync(System.String)">
GetMessageBatchResultsAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L290"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the results of a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;IAsyncEnumerable&lt;MessageBatchResultItem&gt;&gt;&gt; GetMessageBatchResultsAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to get the results for.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResultItem.html">MessageBatchResultItem</a>&gt;&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResultItem.html">MessageBatchResultItem</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_GetModelAsync_" data-uid="AnthropicClient.AnthropicApiClient.GetModelAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_GetModelAsync_System_String_" data-uid="AnthropicClient.AnthropicApiClient.GetModelAsync(System.String)">
GetModelAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L347"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a model by its ID asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;AnthropicModel&gt;&gt; GetModelAsync(string modelId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>modelId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the model to get.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_ListAllMessageBatchesAsync_" data-uid="AnthropicClient.AnthropicApiClient.ListAllMessageBatchesAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_ListAllMessageBatchesAsync_System_Int32_" data-uid="AnthropicClient.AnthropicApiClient.ListAllMessageBatchesAsync(System.Int32)">
ListAllMessageBatchesAsync(int)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L265"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists all message batches asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IAsyncEnumerable&lt;AnthropicResult&lt;Page&lt;MessageBatchResponse&gt;&gt;&gt; ListAllMessageBatchesAsync(int limit = 20)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>limit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The maximum number of message batches to return in each page.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;&gt;</dt>
<dd><p>An asynchronous enumerable that yields the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_ListAllModelsAsync_" data-uid="AnthropicClient.AnthropicApiClient.ListAllModelsAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_ListAllModelsAsync_System_Int32_" data-uid="AnthropicClient.AnthropicApiClient.ListAllModelsAsync(System.Int32)">
ListAllModelsAsync(int)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L338"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists the models asynchronously</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IAsyncEnumerable&lt;AnthropicResult&lt;Page&lt;AnthropicModel&gt;&gt;&gt; ListAllModelsAsync(int limit = 20)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>limit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The maximum number of models to return in each page.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>&gt;&gt;&gt;</dt>
<dd><p>An asynchronous enumerable that yields the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_ListMessageBatchesAsync_" data-uid="AnthropicClient.AnthropicApiClient.ListMessageBatchesAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_ListMessageBatchesAsync_AnthropicClient_Models_PagingRequest_" data-uid="AnthropicClient.AnthropicApiClient.ListMessageBatchesAsync(AnthropicClient.Models.PagingRequest)">
ListMessageBatchesAsync(PagingRequest?)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L256"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists the message batches asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;Page&lt;MessageBatchResponse&gt;&gt;&gt; ListMessageBatchesAsync(PagingRequest? request = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a></dt>
<dd><p>The paging request to use for listing the message batches.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_AnthropicApiClient_ListModelsAsync_" data-uid="AnthropicClient.AnthropicApiClient.ListModelsAsync*"></a>
<h3 id="AnthropicClient_AnthropicApiClient_ListModelsAsync_AnthropicClient_Models_PagingRequest_" data-uid="AnthropicClient.AnthropicApiClient.ListModelsAsync(AnthropicClient.Models.PagingRequest)">
ListModelsAsync(PagingRequest?)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L329"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists the models asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;Page&lt;AnthropicModel&gt;&gt;&gt; ListModelsAsync(PagingRequest? request = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a></dt>
<dd><p>The paging request to use for listing the models.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>&gt;&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L39" class="edit-link">Edit this page</a>
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L12" class="edit-link">Edit this page</a>
</div>
@@ -89,7 +89,7 @@
<h1 id="AnthropicClient_IAnthropicApiClient" data-uid="AnthropicClient.IAnthropicApiClient" class="text-break">
Interface IAnthropicApiClient <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L14"><i class="bi bi-code-slash"></i></a>
Interface IAnthropicApiClient <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
@@ -121,11 +121,50 @@ Interface IAnthropicApiClient <a class="header-action link-secondary" title="Vi
</h2>
<a id="AnthropicClient_IAnthropicApiClient_CancelMessageBatchAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CancelMessageBatchAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_CancelMessageBatchAsync_System_String_" data-uid="AnthropicClient.IAnthropicApiClient.CancelMessageBatchAsync(System.String)">
CancelMessageBatchAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L57"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Cancels a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;MessageBatchResponse&gt;&gt; CancelMessageBatchAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to cancel.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest)">
CountMessageTokensAsync(CountMessageTokensRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L35"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L78"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
@@ -164,7 +203,7 @@ Interface IAnthropicApiClient <a class="header-action link-secondary" title="Vi
<h3 id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
CreateMessageAsync(MessageRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L21"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L15"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a message asynchronously.</p>
@@ -203,7 +242,7 @@ Interface IAnthropicApiClient <a class="header-action link-secondary" title="Vi
<h3 id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_StreamMessageRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.StreamMessageRequest)">
CreateMessageAsync(StreamMessageRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L28"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L22"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a message asynchronously and streams the response.</p>
@@ -238,11 +277,362 @@ Interface IAnthropicApiClient <a class="header-action link-secondary" title="Vi
<a id="AnthropicClient_IAnthropicApiClient_CreateMessageBatchAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageBatchAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_CreateMessageBatchAsync_AnthropicClient_Models_MessageBatchRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageBatchAsync(AnthropicClient.Models.MessageBatchRequest)">
CreateMessageBatchAsync(MessageBatchRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L29"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Creates a batch of messages asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;MessageBatchResponse&gt;&gt; CreateMessageBatchAsync(MessageBatchRequest request)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.MessageBatchRequest.html">MessageBatchRequest</a></dt>
<dd><p>The message batch request to create.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_DeleteMessageBatchAsync_" data-uid="AnthropicClient.IAnthropicApiClient.DeleteMessageBatchAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_DeleteMessageBatchAsync_System_String_" data-uid="AnthropicClient.IAnthropicApiClient.DeleteMessageBatchAsync(System.String)">
DeleteMessageBatchAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L64"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Deletes a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;MessageBatchDeleteResponse&gt;&gt; DeleteMessageBatchAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to delete.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchDeleteResponse.html">MessageBatchDeleteResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchDeleteResponse.html">MessageBatchDeleteResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_GetMessageBatchAsync_" data-uid="AnthropicClient.IAnthropicApiClient.GetMessageBatchAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_GetMessageBatchAsync_System_String_" data-uid="AnthropicClient.IAnthropicApiClient.GetMessageBatchAsync(System.String)">
GetMessageBatchAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L36"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;MessageBatchResponse&gt;&gt; GetMessageBatchAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to get.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_GetMessageBatchResultsAsync_" data-uid="AnthropicClient.IAnthropicApiClient.GetMessageBatchResultsAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_GetMessageBatchResultsAsync_System_String_" data-uid="AnthropicClient.IAnthropicApiClient.GetMessageBatchResultsAsync(System.String)">
GetMessageBatchResultsAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L71"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the results of a message batch asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;IAsyncEnumerable&lt;MessageBatchResultItem&gt;&gt;&gt; GetMessageBatchResultsAsync(string batchId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>batchId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the message batch to get the results for.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResultItem.html">MessageBatchResultItem</a>&gt;&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResultItem.html">MessageBatchResultItem</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_GetModelAsync_" data-uid="AnthropicClient.IAnthropicApiClient.GetModelAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_GetModelAsync_System_String_" data-uid="AnthropicClient.IAnthropicApiClient.GetModelAsync(System.String)">
GetModelAsync(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L100"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets a model by its ID asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;AnthropicModel&gt;&gt; GetModelAsync(string modelId)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>modelId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the model to get.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_ListAllMessageBatchesAsync_" data-uid="AnthropicClient.IAnthropicApiClient.ListAllMessageBatchesAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_ListAllMessageBatchesAsync_System_Int32_" data-uid="AnthropicClient.IAnthropicApiClient.ListAllMessageBatchesAsync(System.Int32)">
ListAllMessageBatchesAsync(int)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L50"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists all message batches asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IAsyncEnumerable&lt;AnthropicResult&lt;Page&lt;MessageBatchResponse&gt;&gt;&gt; ListAllMessageBatchesAsync(int limit = 20)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>limit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The maximum number of message batches to return in each page.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;&gt;</dt>
<dd><p>An asynchronous enumerable that yields the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_ListAllModelsAsync_" data-uid="AnthropicClient.IAnthropicApiClient.ListAllModelsAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_ListAllModelsAsync_System_Int32_" data-uid="AnthropicClient.IAnthropicApiClient.ListAllModelsAsync(System.Int32)">
ListAllModelsAsync(int)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L93"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists the models asynchronously</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IAsyncEnumerable&lt;AnthropicResult&lt;Page&lt;AnthropicModel&gt;&gt;&gt; ListAllModelsAsync(int limit = 20)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>limit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The maximum number of models to return in each page.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iasyncenumerable-1">IAsyncEnumerable</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>&gt;&gt;&gt;</dt>
<dd><p>An asynchronous enumerable that yields the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_ListMessageBatchesAsync_" data-uid="AnthropicClient.IAnthropicApiClient.ListMessageBatchesAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_ListMessageBatchesAsync_AnthropicClient_Models_PagingRequest_" data-uid="AnthropicClient.IAnthropicApiClient.ListMessageBatchesAsync(AnthropicClient.Models.PagingRequest)">
ListMessageBatchesAsync(PagingRequest?)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L43"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists the message batches asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;Page&lt;MessageBatchResponse&gt;&gt;&gt; ListMessageBatchesAsync(PagingRequest? request = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a></dt>
<dd><p>The paging request to use for listing the message batches.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>&gt;&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a>.</p>
</dd>
</dl>
<a id="AnthropicClient_IAnthropicApiClient_ListModelsAsync_" data-uid="AnthropicClient.IAnthropicApiClient.ListModelsAsync*"></a>
<h3 id="AnthropicClient_IAnthropicApiClient_ListModelsAsync_AnthropicClient_Models_PagingRequest_" data-uid="AnthropicClient.IAnthropicApiClient.ListModelsAsync(AnthropicClient.Models.PagingRequest)">
ListModelsAsync(PagingRequest?)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L85"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Lists the models asynchronously.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;Page&lt;AnthropicModel&gt;&gt;&gt; ListModelsAsync(PagingRequest? request = null)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a></dt>
<dd><p>The paging request to use for listing the models.</p>
</dd>
</dl>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.Page-1.html">Page</a>&lt;<a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>&gt;&gt;&gt;</dt>
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a>.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L14" class="edit-link">Edit this page</a>
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/IAnthropicApiClient.cs/#L8" class="edit-link">Edit this page</a>
</div>
@@ -0,0 +1,311 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class AnthropicModel | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class AnthropicModel | AnthropicClient ">
<meta name="description" content="Represents an Anthropic model.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_AnthropicModel.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.AnthropicModel%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.AnthropicModel">
<h1 id="AnthropicClient_Models_AnthropicModel" data-uid="AnthropicClient.Models.AnthropicModel" class="text-break">
Class AnthropicModel <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModel.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents an Anthropic model.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class AnthropicModel</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">AnthropicModel</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_AnthropicModel_CreatedAt_" data-uid="AnthropicClient.Models.AnthropicModel.CreatedAt*"></a>
<h3 id="AnthropicClient_Models_AnthropicModel_CreatedAt" data-uid="AnthropicClient.Models.AnthropicModel.CreatedAt">
CreatedAt
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModel.cs/#L29"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The created date of the model.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;created_at&quot;)]
public DateTimeOffset CreatedAt { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_AnthropicModel_DisplayName_" data-uid="AnthropicClient.Models.AnthropicModel.DisplayName*"></a>
<h3 id="AnthropicClient_Models_AnthropicModel_DisplayName" data-uid="AnthropicClient.Models.AnthropicModel.DisplayName">
DisplayName
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModel.cs/#L23"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The display name of the model.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;display_name&quot;)]
public string DisplayName { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_AnthropicModel_Id_" data-uid="AnthropicClient.Models.AnthropicModel.Id*"></a>
<h3 id="AnthropicClient_Models_AnthropicModel_Id" data-uid="AnthropicClient.Models.AnthropicModel.Id">
Id
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModel.cs/#L18"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The id of the model.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Id { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_AnthropicModel_Type_" data-uid="AnthropicClient.Models.AnthropicModel.Type*"></a>
<h3 id="AnthropicClient_Models_AnthropicModel_Type" data-uid="AnthropicClient.Models.AnthropicModel.Type">
Type
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModel.cs/#L13"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The type of the model.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Type { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModel.cs/#L8" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,212 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class CanceledMessageBatchResult | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class CanceledMessageBatchResult | AnthropicClient ">
<meta name="description" content="Represents a message batch result that was cancelled.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_CanceledMessageBatchResult.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.CanceledMessageBatchResult%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.CanceledMessageBatchResult">
<h1 id="AnthropicClient_Models_CanceledMessageBatchResult" data-uid="AnthropicClient.Models.CanceledMessageBatchResult" class="text-break">
Class CanceledMessageBatchResult <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CanceledMessageBatchResult.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch result that was cancelled.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class CanceledMessageBatchResult : MessageBatchResult</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a></div>
<div><span class="xref">CanceledMessageBatchResult</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="AnthropicClient.Models.MessageBatchResult.html#AnthropicClient_Models_MessageBatchResult_Type">MessageBatchResult.Type</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_CanceledMessageBatchResult__ctor_" data-uid="AnthropicClient.Models.CanceledMessageBatchResult.#ctor*"></a>
<h3 id="AnthropicClient_Models_CanceledMessageBatchResult__ctor" data-uid="AnthropicClient.Models.CanceledMessageBatchResult.#ctor">
CanceledMessageBatchResult()
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CanceledMessageBatchResult.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.CanceledMessageBatchResult.html">CanceledMessageBatchResult</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public CanceledMessageBatchResult()</code></pre>
</div>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CanceledMessageBatchResult.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,248 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class ErroredMessageBatchResult | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class ErroredMessageBatchResult | AnthropicClient ">
<meta name="description" content="Represents a message batch result that contains an error response.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_ErroredMessageBatchResult.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.ErroredMessageBatchResult%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.ErroredMessageBatchResult">
<h1 id="AnthropicClient_Models_ErroredMessageBatchResult" data-uid="AnthropicClient.Models.ErroredMessageBatchResult" class="text-break">
Class ErroredMessageBatchResult <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ErroredMessageBatchResult.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch result that contains an error response.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class ErroredMessageBatchResult : MessageBatchResult</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a></div>
<div><span class="xref">ErroredMessageBatchResult</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="AnthropicClient.Models.MessageBatchResult.html#AnthropicClient_Models_MessageBatchResult_Type">MessageBatchResult.Type</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_ErroredMessageBatchResult__ctor_" data-uid="AnthropicClient.Models.ErroredMessageBatchResult.#ctor*"></a>
<h3 id="AnthropicClient_Models_ErroredMessageBatchResult__ctor" data-uid="AnthropicClient.Models.ErroredMessageBatchResult.#ctor">
ErroredMessageBatchResult()
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ErroredMessageBatchResult.cs/#L16"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.ErroredMessageBatchResult.html">ErroredMessageBatchResult</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ErroredMessageBatchResult()</code></pre>
</div>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_ErroredMessageBatchResult_Error_" data-uid="AnthropicClient.Models.ErroredMessageBatchResult.Error*"></a>
<h3 id="AnthropicClient_Models_ErroredMessageBatchResult_Error" data-uid="AnthropicClient.Models.ErroredMessageBatchResult.Error">
Error
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ErroredMessageBatchResult.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the error of the message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AnthropicError Error { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="AnthropicClient.Models.AnthropicError.html">AnthropicError</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ErroredMessageBatchResult.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,212 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class ExpiredMessageBatchResult | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class ExpiredMessageBatchResult | AnthropicClient ">
<meta name="description" content="Represents a message batch result that has expired.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_ExpiredMessageBatchResult.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.ExpiredMessageBatchResult%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.ExpiredMessageBatchResult">
<h1 id="AnthropicClient_Models_ExpiredMessageBatchResult" data-uid="AnthropicClient.Models.ExpiredMessageBatchResult" class="text-break">
Class ExpiredMessageBatchResult <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ExpiredMessageBatchResult.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch result that has expired.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class ExpiredMessageBatchResult : MessageBatchResult</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a></div>
<div><span class="xref">ExpiredMessageBatchResult</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="AnthropicClient.Models.MessageBatchResult.html#AnthropicClient_Models_MessageBatchResult_Type">MessageBatchResult.Type</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_ExpiredMessageBatchResult__ctor_" data-uid="AnthropicClient.Models.ExpiredMessageBatchResult.#ctor*"></a>
<h3 id="AnthropicClient_Models_ExpiredMessageBatchResult__ctor" data-uid="AnthropicClient.Models.ExpiredMessageBatchResult.#ctor">
ExpiredMessageBatchResult()
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ExpiredMessageBatchResult.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.ExpiredMessageBatchResult.html">ExpiredMessageBatchResult</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ExpiredMessageBatchResult()</code></pre>
</div>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ExpiredMessageBatchResult.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,245 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchDeleteResponse | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchDeleteResponse | AnthropicClient ">
<meta name="description" content="Represents a message batch delete response.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchDeleteResponse.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchDeleteResponse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchDeleteResponse">
<h1 id="AnthropicClient_Models_MessageBatchDeleteResponse" data-uid="AnthropicClient.Models.MessageBatchDeleteResponse" class="text-break">
Class MessageBatchDeleteResponse <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchDeleteResponse.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch delete response.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class MessageBatchDeleteResponse</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchDeleteResponse</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchDeleteResponse_Id_" data-uid="AnthropicClient.Models.MessageBatchDeleteResponse.Id*"></a>
<h3 id="AnthropicClient_Models_MessageBatchDeleteResponse_Id" data-uid="AnthropicClient.Models.MessageBatchDeleteResponse.Id">
Id
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchDeleteResponse.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the ID of the message batch that was deleted.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Id { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchDeleteResponse_Type_" data-uid="AnthropicClient.Models.MessageBatchDeleteResponse.Type*"></a>
<h3 id="AnthropicClient_Models_MessageBatchDeleteResponse_Type" data-uid="AnthropicClient.Models.MessageBatchDeleteResponse.Type">
Type
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchDeleteResponse.cs/#L16"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the type of the message batch response.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Type { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchDeleteResponse.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,256 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchRequest | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchRequest | AnthropicClient ">
<meta name="description" content="Represents a request to create a batch of messages.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchRequest.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchRequest%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchRequest">
<h1 id="AnthropicClient_Models_MessageBatchRequest" data-uid="AnthropicClient.Models.MessageBatchRequest" class="text-break">
Class MessageBatchRequest <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequest.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a request to create a batch of messages.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class MessageBatchRequest</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchRequest</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_MessageBatchRequest__ctor_" data-uid="AnthropicClient.Models.MessageBatchRequest.#ctor*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequest__ctor_System_Collections_Generic_List_AnthropicClient_Models_MessageBatchRequestItem__" data-uid="AnthropicClient.Models.MessageBatchRequest.#ctor(System.Collections.Generic.List{AnthropicClient.Models.MessageBatchRequestItem})">
MessageBatchRequest(List&lt;MessageBatchRequestItem&gt;)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequest.cs/#L19"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.MessageBatchRequest.html">MessageBatchRequest</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MessageBatchRequest(List&lt;MessageBatchRequestItem&gt; requests)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>requests</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchRequestItem.html">MessageBatchRequestItem</a>&gt;</dt>
<dd><p>The requests to create messages.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
<dd><p>Thrown when <code class="paramref">requests</code> is empty.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchRequest_Requests_" data-uid="AnthropicClient.Models.MessageBatchRequest.Requests*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequest_Requests" data-uid="AnthropicClient.Models.MessageBatchRequest.Requests">
Requests
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequest.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the requests to create messages.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public List&lt;MessageBatchRequestItem&gt; Requests { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a>&lt;<a class="xref" href="AnthropicClient.Models.MessageBatchRequestItem.html">MessageBatchRequestItem</a>&gt;</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequest.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,341 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchRequestCounts | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchRequestCounts | AnthropicClient ">
<meta name="description" content="Represents the counts of requests in a batch of messages.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchRequestCounts.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchRequestCounts%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchRequestCounts">
<h1 id="AnthropicClient_Models_MessageBatchRequestCounts" data-uid="AnthropicClient.Models.MessageBatchRequestCounts" class="text-break">
Class MessageBatchRequestCounts <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L72"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents the counts of requests in a batch of messages.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class MessageBatchRequestCounts</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchRequestCounts</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchRequestCounts_Canceled_" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Canceled*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestCounts_Canceled" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Canceled">
Canceled
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L92"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the number of requests in the batch that were cancelled.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Canceled { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchRequestCounts_Errored_" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Errored*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestCounts_Errored" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Errored">
Errored
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L87"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the number of requests in the batch that errored.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Errored { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchRequestCounts_Expired_" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Expired*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestCounts_Expired" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Expired">
Expired
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L97"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the number of requests in the batch that expired.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Expired { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchRequestCounts_Processing_" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Processing*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestCounts_Processing" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Processing">
Processing
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L77"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the number of requests in the batch that are processing.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Processing { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchRequestCounts_Succeeded_" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Succeeded*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestCounts_Succeeded" data-uid="AnthropicClient.Models.MessageBatchRequestCounts.Succeeded">
Succeeded
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L82"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the number of requests in the batch that succeeded.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Succeeded { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L72" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,295 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchRequestItem | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchRequestItem | AnthropicClient ">
<meta name="description" content="Represents an item in a batch of messages.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchRequestItem.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchRequestItem%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchRequestItem">
<h1 id="AnthropicClient_Models_MessageBatchRequestItem" data-uid="AnthropicClient.Models.MessageBatchRequestItem" class="text-break">
Class MessageBatchRequestItem <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequestItem.cs/#L10"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents an item in a batch of messages.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class MessageBatchRequestItem</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchRequestItem</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_MessageBatchRequestItem__ctor_" data-uid="AnthropicClient.Models.MessageBatchRequestItem.#ctor*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestItem__ctor_System_String_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.Models.MessageBatchRequestItem.#ctor(System.String,AnthropicClient.Models.MessageRequest)">
MessageBatchRequestItem(string, MessageRequest)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequestItem.cs/#L31"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.MessageBatchRequestItem.html">MessageBatchRequestItem</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MessageBatchRequestItem(string customId, MessageRequest messageRequest)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>customId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The custom identifier for the message.</p>
</dd>
<dt><code>messageRequest</code> <a class="xref" href="AnthropicClient.Models.MessageRequest.html">MessageRequest</a></dt>
<dd><p>The message request parameters.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
<dd><p>Thrown when <code class="paramref">customId</code> is null or whitespace.</p>
</dd>
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
<dd><p>Thrown when <code class="paramref">messageRequest</code> is null.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchRequestItem_CustomId_" data-uid="AnthropicClient.Models.MessageBatchRequestItem.CustomId*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestItem_CustomId" data-uid="AnthropicClient.Models.MessageBatchRequestItem.CustomId">
CustomId
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequestItem.cs/#L15"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the custom identifier for the message.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;custom_id&quot;)]
public string CustomId { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchRequestItem_Params_" data-uid="AnthropicClient.Models.MessageBatchRequestItem.Params*"></a>
<h3 id="AnthropicClient_Models_MessageBatchRequestItem_Params" data-uid="AnthropicClient.Models.MessageBatchRequestItem.Params">
Params
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequestItem.cs/#L21"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the message request parameters.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MessageRequest Params { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="AnthropicClient.Models.MessageRequest.html">MessageRequest</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchRequestItem.cs/#L10" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,509 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchResponse | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchResponse | AnthropicClient ">
<meta name="description" content="Represents a response to a batch of messages.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchResponse.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchResponse%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchResponse">
<h1 id="AnthropicClient_Models_MessageBatchResponse" data-uid="AnthropicClient.Models.MessageBatchResponse" class="text-break">
Class MessageBatchResponse <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a response to a batch of messages.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class MessageBatchResponse</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchResponse</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchResponse_ArchivedAt_" data-uid="AnthropicClient.Models.MessageBatchResponse.ArchivedAt*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_ArchivedAt" data-uid="AnthropicClient.Models.MessageBatchResponse.ArchivedAt">
ArchivedAt
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L53"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the date and time when the batch was archived.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;archived_at&quot;)]
public DateTimeOffset? ArchivedAt { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a>?</dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_CancelInitiatedAt_" data-uid="AnthropicClient.Models.MessageBatchResponse.CancelInitiatedAt*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_CancelInitiatedAt" data-uid="AnthropicClient.Models.MessageBatchResponse.CancelInitiatedAt">
CancelInitiatedAt
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L59"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the date and time when the batch cancellation was initiated.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;cancel_initiated_at&quot;)]
public DateTimeOffset? CancelInitiatedAt { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a>?</dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_CreatedAt_" data-uid="AnthropicClient.Models.MessageBatchResponse.CreatedAt*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_CreatedAt" data-uid="AnthropicClient.Models.MessageBatchResponse.CreatedAt">
CreatedAt
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L41"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the date and time when the batch was created.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;created_at&quot;)]
public DateTimeOffset CreatedAt { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_EndedAt_" data-uid="AnthropicClient.Models.MessageBatchResponse.EndedAt*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_EndedAt" data-uid="AnthropicClient.Models.MessageBatchResponse.EndedAt">
EndedAt
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L35"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the date and time when the batch ended.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;ended_at&quot;)]
public DateTimeOffset? EndedAt { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a>?</dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_ExpiresAt_" data-uid="AnthropicClient.Models.MessageBatchResponse.ExpiresAt*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_ExpiresAt" data-uid="AnthropicClient.Models.MessageBatchResponse.ExpiresAt">
ExpiresAt
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L47"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the date and time when the batch expires.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;expires_at&quot;)]
public DateTimeOffset ExpiresAt { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetimeoffset">DateTimeOffset</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_Id_" data-uid="AnthropicClient.Models.MessageBatchResponse.Id*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_Id" data-uid="AnthropicClient.Models.MessageBatchResponse.Id">
Id
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L13"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the identifier of the batch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Id { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_ProcessingStatus_" data-uid="AnthropicClient.Models.MessageBatchResponse.ProcessingStatus*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_ProcessingStatus" data-uid="AnthropicClient.Models.MessageBatchResponse.ProcessingStatus">
ProcessingStatus
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L23"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the processing status of the batch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;processing_status&quot;)]
public string ProcessingStatus { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_RequestCounts_" data-uid="AnthropicClient.Models.MessageBatchResponse.RequestCounts*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_RequestCounts" data-uid="AnthropicClient.Models.MessageBatchResponse.RequestCounts">
RequestCounts
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L29"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the counts of requests in the batch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;request_counts&quot;)]
public MessageBatchRequestCounts RequestCounts { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchRequestCounts.html">MessageBatchRequestCounts</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_ResultsUrl_" data-uid="AnthropicClient.Models.MessageBatchResponse.ResultsUrl*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_ResultsUrl" data-uid="AnthropicClient.Models.MessageBatchResponse.ResultsUrl">
ResultsUrl
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L65"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the URL to the results of the batch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;results_url&quot;)]
public string? ResultsUrl { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResponse_Type_" data-uid="AnthropicClient.Models.MessageBatchResponse.Type*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResponse_Type" data-uid="AnthropicClient.Models.MessageBatchResponse.Type">
Type
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L18"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the type of the batch.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Type { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResponse.cs/#L8" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,259 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchResult | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchResult | AnthropicClient ">
<meta name="description" content="Represents a message batch result.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchResult.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchResult%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchResult">
<h1 id="AnthropicClient_Models_MessageBatchResult" data-uid="AnthropicClient.Models.MessageBatchResult" class="text-break">
Class MessageBatchResult <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResult.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch result.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public abstract class MessageBatchResult</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchResult</span></div>
</dd>
</dl>
<dl class="typelist derived">
<dt>Derived</dt>
<dd>
<div><a class="xref" href="AnthropicClient.Models.CanceledMessageBatchResult.html">CanceledMessageBatchResult</a></div>
<div><a class="xref" href="AnthropicClient.Models.ErroredMessageBatchResult.html">ErroredMessageBatchResult</a></div>
<div><a class="xref" href="AnthropicClient.Models.ExpiredMessageBatchResult.html">ExpiredMessageBatchResult</a></div>
<div><a class="xref" href="AnthropicClient.Models.SucceededMessageBatchResult.html">SucceededMessageBatchResult</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_MessageBatchResult__ctor_" data-uid="AnthropicClient.Models.MessageBatchResult.#ctor*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResult__ctor_System_String_" data-uid="AnthropicClient.Models.MessageBatchResult.#ctor(System.String)">
MessageBatchResult(string)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResult.cs/#L20"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MessageBatchResult(string type)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>type</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The type of the message batch result.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchResult_Type_" data-uid="AnthropicClient.Models.MessageBatchResult.Type*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResult_Type" data-uid="AnthropicClient.Models.MessageBatchResult.Type">
Type
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResult.cs/#L13"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the type of the message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string Type { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResult.cs/#L8" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,246 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchResultItem | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchResultItem | AnthropicClient ">
<meta name="description" content="Represents a message batch result item.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchResultItem.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchResultItem%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchResultItem">
<h1 id="AnthropicClient_Models_MessageBatchResultItem" data-uid="AnthropicClient.Models.MessageBatchResultItem" class="text-break">
Class MessageBatchResultItem <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultItem.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch result item.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class MessageBatchResultItem</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchResultItem</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_MessageBatchResultItem_CustomId_" data-uid="AnthropicClient.Models.MessageBatchResultItem.CustomId*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResultItem_CustomId" data-uid="AnthropicClient.Models.MessageBatchResultItem.CustomId">
CustomId
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultItem.cs/#L13"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the custom ID of the message batch result item.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;custom_id&quot;)]
public string CustomId { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_MessageBatchResultItem_Result_" data-uid="AnthropicClient.Models.MessageBatchResultItem.Result*"></a>
<h3 id="AnthropicClient_Models_MessageBatchResultItem_Result" data-uid="AnthropicClient.Models.MessageBatchResultItem.Result">
Result
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultItem.cs/#L19"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the result of the message batch result item.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MessageBatchResult Result { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultItem.cs/#L8" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,305 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchResultType | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchResultType | AnthropicClient ">
<meta name="description" content="Represents the types of message batch results.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchResultType.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchResultType%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchResultType">
<h1 id="AnthropicClient_Models_MessageBatchResultType" data-uid="AnthropicClient.Models.MessageBatchResultType" class="text-break">
Class MessageBatchResultType <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultType.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents the types of message batch results.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class MessageBatchResultType</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchResultType</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="AnthropicClient_Models_MessageBatchResultType_Canceled" data-uid="AnthropicClient.Models.MessageBatchResultType.Canceled">
Canceled
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultType.cs/#L21"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Represents a canceled message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string Canceled = &quot;canceled&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="AnthropicClient_Models_MessageBatchResultType_Errored" data-uid="AnthropicClient.Models.MessageBatchResultType.Errored">
Errored
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultType.cs/#L16"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Represents an errored message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string Errored = &quot;errored&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="AnthropicClient_Models_MessageBatchResultType_Expired" data-uid="AnthropicClient.Models.MessageBatchResultType.Expired">
Expired
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultType.cs/#L26"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Represents an expired message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string Expired = &quot;expired&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="AnthropicClient_Models_MessageBatchResultType_Succeeded" data-uid="AnthropicClient.Models.MessageBatchResultType.Succeeded">
Succeeded
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultType.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Represents a succeeded message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string Succeeded = &quot;succeeded&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchResultType.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,274 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class MessageBatchStatus | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class MessageBatchStatus | AnthropicClient ">
<meta name="description" content="Represents the status of a message batch.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_MessageBatchStatus.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.MessageBatchStatus%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.MessageBatchStatus">
<h1 id="AnthropicClient_Models_MessageBatchStatus" data-uid="AnthropicClient.Models.MessageBatchStatus" class="text-break">
Class MessageBatchStatus <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchStatus.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents the status of a message batch.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static class MessageBatchStatus</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">MessageBatchStatus</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="fields">Fields
</h2>
<h3 id="AnthropicClient_Models_MessageBatchStatus_Canceling" data-uid="AnthropicClient.Models.MessageBatchStatus.Canceling">
Canceling
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchStatus.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The status of a message batch that is being canceled.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string Canceling = &quot;canceling&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="AnthropicClient_Models_MessageBatchStatus_Ended" data-uid="AnthropicClient.Models.MessageBatchStatus.Ended">
Ended
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchStatus.cs/#L21"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The status of a message batch that has ended.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string Ended = &quot;ended&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<h3 id="AnthropicClient_Models_MessageBatchStatus_InProgress" data-uid="AnthropicClient.Models.MessageBatchStatus.InProgress">
InProgress
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchStatus.cs/#L16"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The status of a message batch that is in progress.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public const string InProgress = &quot;in_progress&quot;</code></pre>
</div>
<h4 class="section">Field Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageBatchStatus.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
+228
View File
@@ -0,0 +1,228 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class Page&lt;T&gt; | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class Page&lt;T&gt; | AnthropicClient ">
<meta name="description" content="Represents a page with data.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_Page_1.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.Page%601%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.Page`1">
<h1 id="AnthropicClient_Models_Page_1" data-uid="AnthropicClient.Models.Page`1" class="text-break">
Class Page&lt;T&gt; <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L32"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a page with data.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class Page&lt;T&gt; : Page</code></pre>
</div>
<h4 class="section">Type Parameters</h4>
<dl class="parameters">
<dt><code>T</code></dt>
<dd></dd>
</dl>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><a class="xref" href="AnthropicClient.Models.Page.html">Page</a></div>
<div><span class="xref">Page&lt;T&gt;</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="AnthropicClient.Models.Page.html#AnthropicClient_Models_Page_FirstId">Page.FirstId</a>
</div>
<div>
<a class="xref" href="AnthropicClient.Models.Page.html#AnthropicClient_Models_Page_LastId">Page.LastId</a>
</div>
<div>
<a class="xref" href="AnthropicClient.Models.Page.html#AnthropicClient_Models_Page_HasMore">Page.HasMore</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_Page_1_Data_" data-uid="AnthropicClient.Models.Page`1.Data*"></a>
<h3 id="AnthropicClient_Models_Page_1_Data" data-uid="AnthropicClient.Models.Page`1.Data">
Data
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L37"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The data in the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public T[] Data { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt>T[]</dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L32" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
+286
View File
@@ -0,0 +1,286 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class Page | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class Page | AnthropicClient ">
<meta name="description" content="Represents a page.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_Page.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.Page%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.Page">
<h1 id="AnthropicClient_Models_Page" data-uid="AnthropicClient.Models.Page" class="text-break">
Class Page <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a page.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class Page</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">Page</span></div>
</dd>
</dl>
<dl class="typelist derived">
<dt>Derived</dt>
<dd>
<div><a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_Page_FirstId_" data-uid="AnthropicClient.Models.Page.FirstId*"></a>
<h3 id="AnthropicClient_Models_Page_FirstId" data-uid="AnthropicClient.Models.Page.FirstId">
FirstId
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L13"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The id of the first item in the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;first_id&quot;)]
public string? FirstId { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_Page_HasMore_" data-uid="AnthropicClient.Models.Page.HasMore*"></a>
<h3 id="AnthropicClient_Models_Page_HasMore" data-uid="AnthropicClient.Models.Page.HasMore">
HasMore
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L25"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Indicates whether there is more data to be retrieved.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;has_more&quot;)]
public bool HasMore { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_Page_LastId_" data-uid="AnthropicClient.Models.Page.LastId*"></a>
<h3 id="AnthropicClient_Models_Page_LastId" data-uid="AnthropicClient.Models.Page.LastId">
LastId
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L19"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The id of the last item in the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;last_id&quot;)]
public string? LastId { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Page.cs/#L8" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,368 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class PagingRequest | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class PagingRequest | AnthropicClient ">
<meta name="description" content="Represents a request to page through a collection of items.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_PagingRequest.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.PagingRequest%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.PagingRequest">
<h1 id="AnthropicClient_Models_PagingRequest" data-uid="AnthropicClient.Models.PagingRequest" class="text-break">
Class PagingRequest <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L8"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a request to page through a collection of items.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class PagingRequest</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><span class="xref">PagingRequest</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_PagingRequest__ctor_" data-uid="AnthropicClient.Models.PagingRequest.#ctor*"></a>
<h3 id="AnthropicClient_Models_PagingRequest__ctor_System_String_System_String_System_Int32_" data-uid="AnthropicClient.Models.PagingRequest.#ctor(System.String,System.String,System.Int32)">
PagingRequest(string, string, int)
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L40"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public PagingRequest(string beforeId = &quot;&quot;, string afterId = &quot;&quot;, int limit = 20)</code></pre>
</div>
<h4 class="section">Parameters</h4>
<dl class="parameters">
<dt><code>beforeId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the item before which to start the page.</p>
</dd>
<dt><code>afterId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The ID of the item after which to start the page.</p>
</dd>
<dt><code>limit</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd><p>The maximum number of items to return in the page.</p>
</dd>
</dl>
<h4 class="section">Exceptions</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
<dd><p>Thrown when both <code class="paramref">beforeId</code> and <code class="paramref">afterId</code> are specified.</p>
</dd>
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
<dd><p>Thrown when <code class="paramref">limit</code> is less than 1 or greater than 1000.</p>
</dd>
</dl>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_PagingRequest_AfterId_" data-uid="AnthropicClient.Models.PagingRequest.AfterId*"></a>
<h3 id="AnthropicClient_Models_PagingRequest_AfterId" data-uid="AnthropicClient.Models.PagingRequest.AfterId">
AfterId
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L23"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The ID of the item after which to start the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;after_id&quot;)]
public string AfterId { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_PagingRequest_BeforeId_" data-uid="AnthropicClient.Models.PagingRequest.BeforeId*"></a>
<h3 id="AnthropicClient_Models_PagingRequest_BeforeId" data-uid="AnthropicClient.Models.PagingRequest.BeforeId">
BeforeId
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L17"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The ID of the item before which to start the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[JsonPropertyName(&quot;before_id&quot;)]
public string BeforeId { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd></dd>
</dl>
<a id="AnthropicClient_Models_PagingRequest_Limit_" data-uid="AnthropicClient.Models.PagingRequest.Limit*"></a>
<h3 id="AnthropicClient_Models_PagingRequest_Limit" data-uid="AnthropicClient.Models.PagingRequest.Limit">
Limit
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L29"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>The maximum number of items to return in the page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Limit { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
<dd></dd>
</dl>
<h2 class="section" id="methods">Methods
</h2>
<a id="AnthropicClient_Models_PagingRequest_ToQueryParameters_" data-uid="AnthropicClient.Models.PagingRequest.ToQueryParameters*"></a>
<h3 id="AnthropicClient_Models_PagingRequest_ToQueryParameters" data-uid="AnthropicClient.Models.PagingRequest.ToQueryParameters">
ToQueryParameters()
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L65"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Converts the <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a> to a query string.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string ToQueryParameters()</code></pre>
</div>
<h4 class="section">Returns</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
<dd><p>The query string representation of the <a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a>.</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PagingRequest.cs/#L8" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
@@ -0,0 +1,248 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Class SucceededMessageBatchResult | AnthropicClient </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Class SucceededMessageBatchResult | AnthropicClient ">
<meta name="description" content="Represents a message batch result that contains a message response.">
<link rel="icon" href="../favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="docfx:docurl" content="https://github.com/StevanFreeborn/anthropic-client/new/main/apiSpec/new?filename=AnthropicClient_Models_SucceededMessageBatchResult.md&amp;value=---%0Auid%3A%20AnthropicClient.Models.SucceededMessageBatchResult%0Asummary%3A%20&#39;*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax&#39;%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="AnthropicClient">
AnthropicClient
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="AnthropicClient.Models.SucceededMessageBatchResult">
<h1 id="AnthropicClient_Models_SucceededMessageBatchResult" data-uid="AnthropicClient.Models.SucceededMessageBatchResult" class="text-break">
Class SucceededMessageBatchResult <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SucceededMessageBatchResult.cs/#L6"><i class="bi bi-code-slash"></i></a>
</h1>
<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
</div>
<div class="markdown summary"><p>Represents a message batch result that contains a message response.</p>
</div>
<div class="markdown conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class SucceededMessageBatchResult : MessageBatchResult</code></pre>
</div>
<dl class="typelist inheritance">
<dt>Inheritance</dt>
<dd>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
<div><a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a></div>
<div><span class="xref">SucceededMessageBatchResult</span></div>
</dd>
</dl>
<dl class="typelist inheritedMembers">
<dt>Inherited Members</dt>
<dd>
<div>
<a class="xref" href="AnthropicClient.Models.MessageBatchResult.html#AnthropicClient_Models_MessageBatchResult_Type">MessageBatchResult.Type</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
</div>
<div>
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
</div>
</dd></dl>
<h2 class="section" id="constructors">Constructors
</h2>
<a id="AnthropicClient_Models_SucceededMessageBatchResult__ctor_" data-uid="AnthropicClient.Models.SucceededMessageBatchResult.#ctor*"></a>
<h3 id="AnthropicClient_Models_SucceededMessageBatchResult__ctor" data-uid="AnthropicClient.Models.SucceededMessageBatchResult.#ctor">
SucceededMessageBatchResult()
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SucceededMessageBatchResult.cs/#L17"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.SucceededMessageBatchResult.html">SucceededMessageBatchResult</a> class.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public SucceededMessageBatchResult()</code></pre>
</div>
<h2 class="section" id="properties">Properties
</h2>
<a id="AnthropicClient_Models_SucceededMessageBatchResult_Message_" data-uid="AnthropicClient.Models.SucceededMessageBatchResult.Message*"></a>
<h3 id="AnthropicClient_Models_SucceededMessageBatchResult_Message" data-uid="AnthropicClient.Models.SucceededMessageBatchResult.Message">
Message
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SucceededMessageBatchResult.cs/#L11"><i class="bi bi-code-slash"></i></a>
</h3>
<div class="markdown level1 summary"><p>Gets the message of the message batch result.</p>
</div>
<div class="markdown level1 conceptual"></div>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public MessageResponse Message { get; init; }</code></pre>
</div>
<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="AnthropicClient.Models.MessageResponse.html">MessageResponse</a></dt>
<dd></dd>
</dl>
</article>
<div class="contribution d-print-none">
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SucceededMessageBatchResult.cs/#L6" class="edit-link">Edit this page</a>
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
</div>
</div>
</footer>
</body>
</html>
+85
View File
@@ -112,6 +112,11 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.AnthropicHeaders.html">AnthropicHeaders</a></dt>
<dd><p>Represents headers included in Anthropic API responses.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.AnthropicModel.html">AnthropicModel</a></dt>
<dd><p>Represents an Anthropic model.</p>
</dd>
</dl>
<dl class="jumplist">
@@ -152,6 +157,11 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.CacheControlType.html">CacheControlType</a></dt>
<dd><p>Provides constants for cache control types.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.CanceledMessageBatchResult.html">CanceledMessageBatchResult</a></dt>
<dd><p>Represents a message batch result that was cancelled.</p>
</dd>
</dl>
<dl class="jumplist">
@@ -222,6 +232,11 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.ErrorType.html">ErrorType</a></dt>
<dd><p>Represents the error type.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.ErroredMessageBatchResult.html">ErroredMessageBatchResult</a></dt>
<dd><p>Represents a message batch result that contains an error response.</p>
</dd>
</dl>
<dl class="jumplist">
@@ -232,6 +247,11 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.EventType.html">EventType</a></dt>
<dd><p>Provides constants for event types.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.ExpiredMessageBatchResult.html">ExpiredMessageBatchResult</a></dt>
<dd><p>Represents a message batch result that has expired.</p>
</dd>
</dl>
<dl class="jumplist">
@@ -282,6 +302,51 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.Message.html">Message</a></dt>
<dd><p>Represents a message.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchDeleteResponse.html">MessageBatchDeleteResponse</a></dt>
<dd><p>Represents a message batch delete response.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchRequest.html">MessageBatchRequest</a></dt>
<dd><p>Represents a request to create a batch of messages.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchRequestCounts.html">MessageBatchRequestCounts</a></dt>
<dd><p>Represents the counts of requests in a batch of messages.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchRequestItem.html">MessageBatchRequestItem</a></dt>
<dd><p>Represents an item in a batch of messages.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchResponse.html">MessageBatchResponse</a></dt>
<dd><p>Represents a response to a batch of messages.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchResult.html">MessageBatchResult</a></dt>
<dd><p>Represents a message batch result.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchResultItem.html">MessageBatchResultItem</a></dt>
<dd><p>Represents a message batch result item.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchResultType.html">MessageBatchResultType</a></dt>
<dd><p>Represents the types of message batch results.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.MessageBatchStatus.html">MessageBatchStatus</a></dt>
<dd><p>Represents the status of a message batch.</p>
</dd>
</dl>
<dl class="jumplist">
@@ -332,6 +397,21 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.OverloadedError.html">OverloadedError</a></dt>
<dd><p>Represents an overloaded error.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.Page.html">Page</a></dt>
<dd><p>Represents a page.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.Page-1.html">Page&lt;T&gt;</a></dt>
<dd><p>Represents a page with data.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.PagingRequest.html">PagingRequest</a></dt>
<dd><p>Represents a request to page through a collection of items.</p>
</dd>
</dl>
<dl class="jumplist">
@@ -362,6 +442,11 @@ Classes
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.StreamMessageRequest.html">StreamMessageRequest</a></dt>
<dd><p>Represents a message request.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="AnthropicClient.Models.SucceededMessageBatchResult.html">SucceededMessageBatchResult</a></dt>
<dd><p>Represents a message batch result that contains a message response.</p>
</dd>
</dl>
<dl class="jumplist">
+51
View File
@@ -42,6 +42,9 @@
<li>
<a href="AnthropicClient.Models.AnthropicHeaders.html" name="" title="AnthropicHeaders">AnthropicHeaders</a>
</li>
<li>
<a href="AnthropicClient.Models.AnthropicModel.html" name="" title="AnthropicModel">AnthropicModel</a>
</li>
<li>
<a href="AnthropicClient.Models.AnthropicModels.html" name="" title="AnthropicModels">AnthropicModels</a>
</li>
@@ -66,6 +69,9 @@
<li>
<a href="AnthropicClient.Models.CacheControlType.html" name="" title="CacheControlType">CacheControlType</a>
</li>
<li>
<a href="AnthropicClient.Models.CanceledMessageBatchResult.html" name="" title="CanceledMessageBatchResult">CanceledMessageBatchResult</a>
</li>
<li>
<a href="AnthropicClient.Models.Content.html" name="" title="Content">Content</a>
</li>
@@ -108,12 +114,18 @@
<li>
<a href="AnthropicClient.Models.ErrorType.html" name="" title="ErrorType">ErrorType</a>
</li>
<li>
<a href="AnthropicClient.Models.ErroredMessageBatchResult.html" name="" title="ErroredMessageBatchResult">ErroredMessageBatchResult</a>
</li>
<li>
<a href="AnthropicClient.Models.EventData.html" name="" title="EventData">EventData</a>
</li>
<li>
<a href="AnthropicClient.Models.EventType.html" name="" title="EventType">EventType</a>
</li>
<li>
<a href="AnthropicClient.Models.ExpiredMessageBatchResult.html" name="" title="ExpiredMessageBatchResult">ExpiredMessageBatchResult</a>
</li>
<li>
<a href="AnthropicClient.Models.FunctionParameterAttribute.html" name="" title="FunctionParameterAttribute">FunctionParameterAttribute</a>
</li>
@@ -147,6 +159,33 @@
<li>
<a href="AnthropicClient.Models.Message.html" name="" title="Message">Message</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchDeleteResponse.html" name="" title="MessageBatchDeleteResponse">MessageBatchDeleteResponse</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchRequest.html" name="" title="MessageBatchRequest">MessageBatchRequest</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchRequestCounts.html" name="" title="MessageBatchRequestCounts">MessageBatchRequestCounts</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchRequestItem.html" name="" title="MessageBatchRequestItem">MessageBatchRequestItem</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchResponse.html" name="" title="MessageBatchResponse">MessageBatchResponse</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchResult.html" name="" title="MessageBatchResult">MessageBatchResult</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchResultItem.html" name="" title="MessageBatchResultItem">MessageBatchResultItem</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchResultType.html" name="" title="MessageBatchResultType">MessageBatchResultType</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageBatchStatus.html" name="" title="MessageBatchStatus">MessageBatchStatus</a>
</li>
<li>
<a href="AnthropicClient.Models.MessageCompleteEventData.html" name="" title="MessageCompleteEventData">MessageCompleteEventData</a>
</li>
@@ -177,6 +216,15 @@
<li>
<a href="AnthropicClient.Models.OverloadedError.html" name="" title="OverloadedError">OverloadedError</a>
</li>
<li>
<a href="AnthropicClient.Models.Page.html" name="" title="Page">Page</a>
</li>
<li>
<a href="AnthropicClient.Models.Page-1.html" name="" title="Page&lt;T&gt;">Page&lt;T&gt;</a>
</li>
<li>
<a href="AnthropicClient.Models.PagingRequest.html" name="" title="PagingRequest">PagingRequest</a>
</li>
<li>
<a href="AnthropicClient.Models.PermissionError.html" name="" title="PermissionError">PermissionError</a>
</li>
@@ -195,6 +243,9 @@
<li>
<a href="AnthropicClient.Models.StreamMessageRequest.html" name="" title="StreamMessageRequest">StreamMessageRequest</a>
</li>
<li>
<a href="AnthropicClient.Models.SucceededMessageBatchResult.html" name="" title="SucceededMessageBatchResult">SucceededMessageBatchResult</a>
</li>
<li>
<a href="AnthropicClient.Models.TextContent.html" name="" title="TextContent">TextContent</a>
</li>
+1 -1
View File
File diff suppressed because one or more lines are too long
+216
View File
@@ -171,6 +171,62 @@ if (response.IsFailure)
Console.WriteLine(&quot;Token Count: {0}&quot;, response.Value.InputTokens);
</code></pre>
<h3 id="list-models">List Models</h3>
<p>The <code>AnthropicApiClient</code> exposes a method named <code>ListModelsAsync</code> that can be used to list the available models. The method takes an optional <code>PagingRequest</code> instance as a parameter.</p>
<pre><code class="lang-csharp">using AnthropicClient;
var response = await client.ListModelsAsync();
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to list models&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
foreach (var model in response.Value.Data)
{
Console.WriteLine(&quot;Model Id: {0}&quot;, model.Id);
Console.WriteLine(&quot;Model Name: {0}&quot;, model.DisplayName);
}
</code></pre>
<p>Using the <code>PagingRequest</code> instance allows you to specify the number of models to return and the page of models to return.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var response = await client.ListModelsAsync(new PagingRequest(afterId: &quot;claude-3-5-sonnet-20241022&quot;, limit: 2));
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to list models&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
foreach (var model in response.Value.Data)
{
Console.WriteLine(&quot;Model Id: {0}&quot;, model.Id);
Console.WriteLine(&quot;Model Name: {0}&quot;, model.DisplayName);
}
</code></pre>
<h3 id="get-model">Get Model</h3>
<p>The <code>AnthropicApiClient</code> exposes a method named <code>GetModelAsync</code> that can be used to get a model by its id.</p>
<pre><code class="lang-csharp">using AnthropicClient;
var response = await client.GetModelAsync(&quot;claude-3-5-sonnet-20241022&quot;);
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to get model&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
Console.WriteLine(&quot;Model Id: {0}&quot;, response.Value.Id);
</code></pre>
<h3 id="create-a-message">Create a message</h3>
<p>The <code>AnthropicApiClient</code> exposes a method named <code>CreateMessageAsync</code> that can be used to create a message. The method requires a <code>MessageRequest</code> or a <code>StreamMessageRequest</code> instance as a parameter. The <code>MessageRequest</code> class is used to create a message whose response is not streamed and the <code>StreamMessageRequest</code> class is used to create a message whose response is streamed. The <code>MessageRequest</code> instance's properties can be set to configure how the message is created.</p>
<h4 id="non-streaming">Non-Streaming</h4>
@@ -860,6 +916,166 @@ foreach (var content in response.Value.Content)
}
}
</code></pre>
<h3 id="message-batches">Message Batches</h3>
<p>Anthropic provides a feature called <a href="https://docs.anthropic.com/en/docs/build-with-claude/message-batches">Message Batches</a> that allows you to send multiple messages in a single request. This feature is covered in depth in <a href="https://docs.anthropic.com/en/docs/build-with-claude/message-batches">Anthropic's API Documentation</a>.</p>
<h4 id="create-a-message-batch">Create a message batch</h4>
<p>You can create a message batch that will consist of one or more requests to create messages.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent(&quot;Hello!&quot;)])]
)
),
]);
var response = await client.CreateMessageBatchAsync(request);
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to create message batch&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
Console.WriteLine(&quot;Message Batch Id: {0}&quot;, response.Value.Id);
</code></pre>
<h4 id="get-a-message-batch">Get a message batch</h4>
<p>You can retrieve a message batch by its id.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var response = await client.GetMessageBatchAsync(&quot;batch-id&quot;);
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to get message batch&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
Console.WriteLine(&quot;Message Batch Id: {0}&quot;, response.Value.Id);
</code></pre>
<h4 id="get-a-message-batch-results">Get a message batch results</h4>
<p>You can retrieve the results of a message batch by its id. The results are returned as an <code>IAsyncEnumerable</code> collection so that they can be streamed and processed as they are received.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var response = await client.GetMessageBatchResultsAsync(&quot;batch-id&quot;);
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to get message batch results&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
await foreach (var item in response.Value)
{
Console.WriteLine(&quot;Item Custom Id: {0}&quot;, result.CustomId);
switch (item.Result)
{
case SucceededMessageBatchResult successResult:
foreach (var content in successResult.Message.Content)
{
if (content is TextContent textContent)
{
Console.WriteLine(&quot;Message Batch Result: {0}&quot;, textContent.Text);
}
}
break;
default:
Console.WriteLine(&quot;Message Batch Result: {0}&quot;, item.Result.Type);
break;
}
}
</code></pre>
<h4 id="list-message-batches">List message batches</h4>
<p>You can retrieve a page of message batches.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var response = await client.ListMessageBatchesAsync();
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to list message batches&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
foreach (var batch in response.Value.Data)
{
Console.WriteLine(&quot;Message Batch Id: {0}&quot;, batch.Id);
}
</code></pre>
<h4 id="list-all-message-batches">List all message batches</h4>
<p>You can also retrieve all the pages of message batches without having to implement pagination yourself. This is done by returning an <code>IAsyncEnumerable</code> collection that can be streamed and processed as the pages are received.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var pageResponses = client.ListAllMessageBatchesAsync();
await foreach (var response in pageResponses)
{
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to list message batches&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
foreach (var batch in response.Value.Data)
{
Console.WriteLine(&quot;Message Batch Id: {0}&quot;, batch.Id);
}
}
</code></pre>
<h4 id="cancel-a-message-batch">Cancel a message batch</h4>
<p>You can cancel a message batch by its id.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var response = await client.CancelMessageBatchAsync(&quot;batch-id&quot;);
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to cancel message batch&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
Console.WriteLine(&quot;Message Batch Id: {0}&quot;, response.Value.Id);
Console.WriteLine(&quot;Message Batch Status: {0}&quot;, response.Value.ProcessingStatus);
</code></pre>
<h4 id="delete-a-message-batch">Delete a message batch</h4>
<p>You can delete a message batch that is no longer being processed by its id.</p>
<pre><code class="lang-csharp">using AnthropicClient;
using AnthropicClient.Models;
var response = await client.DeleteMessageBatchAsync(&quot;batch-id&quot;);
if (response.IsFailure)
{
Console.WriteLine(&quot;Failed to delete message batch&quot;);
Console.WriteLine(&quot;Error Type: {0}&quot;, response.Error.Error.Type);
Console.WriteLine(&quot;Error Message: {0}&quot;, response.Error.Error.Message);
return;
}
Console.WriteLine(&quot;Message Batch Id: {0}&quot;, response.Value.Id);
</code></pre>
</article>
+89 -4
View File
File diff suppressed because one or more lines are too long
+170
View File
@@ -70,6 +70,16 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.AnthropicModel.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.AnthropicModel.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.AnthropicModels.yml",
@@ -150,6 +160,16 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.CanceledMessageBatchResult.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.CanceledMessageBatchResult.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.Content.yml",
@@ -290,6 +310,16 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.ErroredMessageBatchResult.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.ErroredMessageBatchResult.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.EventData.yml",
@@ -310,6 +340,16 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.ExpiredMessageBatchResult.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.ExpiredMessageBatchResult.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.FunctionParameterAttribute.yml",
@@ -420,6 +460,96 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchDeleteResponse.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchDeleteResponse.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchRequest.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchRequest.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchRequestCounts.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchRequestCounts.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchRequestItem.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchRequestItem.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchResponse.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchResponse.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchResult.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchResult.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchResultItem.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchResultItem.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchResultType.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchResultType.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageBatchStatus.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.MessageBatchStatus.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.MessageCompleteEventData.yml",
@@ -520,6 +650,36 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.Page-1.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.Page-1.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.Page.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.Page.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.PagingRequest.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.PagingRequest.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.PermissionError.yml",
@@ -580,6 +740,16 @@
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.SucceededMessageBatchResult.yml",
"output": {
".html": {
"relative_path": "api/AnthropicClient.Models.SucceededMessageBatchResult.html"
}
},
"version": ""
},
{
"type": "ManagedReference",
"source_relative_path": "api/AnthropicClient.Models.TextContent.yml",
+1098
View File
File diff suppressed because it is too large Load Diff
+137 -110
View File
@@ -1,7 +1,7 @@
using System.Net.Http.Headers;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using AnthropicClient.Json;
using AnthropicClient.Models;
@@ -9,62 +9,14 @@ using AnthropicClient.Utils;
namespace AnthropicClient;
/// <summary>
/// Represents a client for interacting with the Anthropic API.
/// </summary>
public interface IAnthropicApiClient
{
/// <summary>
/// Creates a message asynchronously.
/// </summary>
/// <param name="request">The message request to create.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/>.</returns>
Task<AnthropicResult<MessageResponse>> CreateMessageAsync(MessageRequest request);
/// <summary>
/// Creates a message asynchronously and streams the response.
/// </summary>
/// <param name="request">The message request to create.</param>
/// <returns>An asynchronous enumerable that yields the response event by event.</returns>
IAsyncEnumerable<AnthropicEvent> CreateMessageAsync(StreamMessageRequest request);
/// <summary>
/// Counts the tokens in a message asynchronously.
/// </summary>
/// <param name="request">The count message tokens request.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="TokenCountResponse"/>.</returns>
Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request);
/// <summary>
/// Lists the models asynchronously.
/// </summary>
/// <param name="request">The paging request to use for listing the models.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="Page{T}"/> where T is <see cref="AnthropicModel"/>.</returns>
Task<AnthropicResult<Page<AnthropicModel>>> ListModelsAsync(PagingRequest? request = null);
/// <summary>
/// Lists the models asynchronously
/// </summary>
/// <param name="limit">The maximum number of models to return in each page.</param>
/// <returns>An asynchronous enumerable that yields the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="Page{T}"/> where T is <see cref="AnthropicModel"/>.</returns>
///
IAsyncEnumerable<AnthropicResult<Page<AnthropicModel>>> ListAllModelsAsync(int limit = 20);
/// <summary>
/// Gets a model by its ID asynchronously.
/// </summary>
/// <param name="modelId">The ID of the model to get.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="AnthropicModel"/>.</returns>
Task<AnthropicResult<AnthropicModel>> GetModelAsync(string modelId);
}
/// <inheritdoc cref="IAnthropicApiClient"/>
public class AnthropicApiClient : IAnthropicApiClient
{
private const string BaseUrl = "https://api.anthropic.com/v1/";
private const string ApiKeyHeader = "x-api-key";
private const string MessagesEndpoint = "messages";
private const string CountTokensEndpoint = "messages/count_tokens";
private string CountTokensEndpoint => $"{MessagesEndpoint}/count_tokens";
private string MessageBatchesEndpoint => $"{MessagesEndpoint}/batches";
private const string ModelsEndpoint = "models";
private const string JsonContentType = "application/json";
private const string EventPrefix = "event:";
@@ -101,9 +53,9 @@ public class AnthropicApiClient : IAnthropicApiClient
}
/// <inheritdoc/>
public async Task<AnthropicResult<MessageResponse>> CreateMessageAsync(MessageRequest request)
public async Task<AnthropicResult<MessageResponse>> CreateMessageAsync(MessageRequest request, CancellationToken cancellationToken = default)
{
var response = await SendRequestAsync(MessagesEndpoint, request);
var response = await SendRequestAsync(MessagesEndpoint, request, cancellationToken);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
var responseContent = await response.Content.ReadAsStringAsync();
@@ -124,13 +76,14 @@ public class AnthropicApiClient : IAnthropicApiClient
}
/// <inheritdoc/>
public async IAsyncEnumerable<AnthropicEvent> CreateMessageAsync(StreamMessageRequest request)
public async IAsyncEnumerable<AnthropicEvent> CreateMessageAsync(StreamMessageRequest request, [EnumeratorCancellation] CancellationToken cancellationToken = default)
{
var response = await SendRequestAsync(MessagesEndpoint, request);
var response = await SendRequestAsync(MessagesEndpoint, request, cancellationToken);
if (response.IsSuccessStatusCode is false)
{
var error = Deserialize<AnthropicError>(await response.Content.ReadAsStringAsync()) ?? new AnthropicError();
var errorContent = await response.Content.ReadAsStringAsync();
var error = Deserialize<AnthropicError>(errorContent) ?? new AnthropicError();
yield return new AnthropicEvent(EventType.Error, new ErrorEventData(error.Error));
yield break;
}
@@ -288,62 +241,138 @@ public class AnthropicApiClient : IAnthropicApiClient
}
/// <inheritdoc/>
public async Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request)
public async Task<AnthropicResult<MessageBatchResponse>> CreateMessageBatchAsync(MessageBatchRequest request, CancellationToken cancellationToken = default)
{
var response = await SendRequestAsync(CountTokensEndpoint, request);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
var responseContent = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode is false)
{
var error = Deserialize<AnthropicError>(responseContent) ?? new AnthropicError();
return AnthropicResult<TokenCountResponse>.Failure(error, anthropicHeaders);
}
var msgResponse = Deserialize<TokenCountResponse>(responseContent) ?? new TokenCountResponse();
return AnthropicResult<TokenCountResponse>.Success(msgResponse, anthropicHeaders);
var response = await SendRequestAsync(MessageBatchesEndpoint, request, cancellationToken);
return await CreateResultAsync<MessageBatchResponse>(response);
}
/// <inheritdoc/>
public async Task<AnthropicResult<Page<AnthropicModel>>> ListModelsAsync(PagingRequest? request = null)
public async Task<AnthropicResult<MessageBatchResponse>> GetMessageBatchAsync(string batchId, CancellationToken cancellationToken = default)
{
var response = await SendRequestAsync($"{MessageBatchesEndpoint}/{batchId}", cancellationToken: cancellationToken);
return await CreateResultAsync<MessageBatchResponse>(response);
}
/// <inheritdoc/>
public async Task<AnthropicResult<Page<MessageBatchResponse>>> ListMessageBatchesAsync(PagingRequest? request = null, CancellationToken cancellationToken = default)
{
var pagingRequest = request ?? new PagingRequest();
var endpoint = $"{MessageBatchesEndpoint}?{pagingRequest.ToQueryParameters()}";
var response = await SendRequestAsync(endpoint, cancellationToken: cancellationToken);
return await CreateResultAsync<Page<MessageBatchResponse>>(response);
}
/// <inheritdoc/>
public async IAsyncEnumerable<AnthropicResult<Page<MessageBatchResponse>>> ListAllMessageBatchesAsync(int limit = 20, [EnumeratorCancellation] CancellationToken cancellationToken = default)
{
await foreach (var result in GetAllPagesAsync<MessageBatchResponse>(MessageBatchesEndpoint, limit, cancellationToken))
{
yield return result;
}
}
/// <inheritdoc/>
public async Task<AnthropicResult<MessageBatchResponse>> CancelMessageBatchAsync(string batchId, CancellationToken cancellationToken = default)
{
var endpoint = $"{MessageBatchesEndpoint}/{batchId}/cancel";
var response = await SendRequestAsync(endpoint, HttpMethod.Post, cancellationToken);
return await CreateResultAsync<MessageBatchResponse>(response);
}
/// <inheritdoc/>
public async Task<AnthropicResult<MessageBatchDeleteResponse>> DeleteMessageBatchAsync(string batchId, CancellationToken cancellationToken = default)
{
var endpoint = $"{MessageBatchesEndpoint}/{batchId}";
var response = await SendRequestAsync(endpoint, HttpMethod.Delete, cancellationToken);
return await CreateResultAsync<MessageBatchDeleteResponse>(response);
}
/// <inheritdoc/>
public async Task<AnthropicResult<IAsyncEnumerable<MessageBatchResultItem>>> GetMessageBatchResultsAsync(string batchId, CancellationToken cancellationToken = default)
{
var response = await SendRequestAsync($"{MessageBatchesEndpoint}/{batchId}/results", cancellationToken: cancellationToken);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
if (response.IsSuccessStatusCode is false)
{
var content = await response.Content.ReadAsStringAsync();
var error = Deserialize<AnthropicError>(content) ?? new AnthropicError();
return AnthropicResult<IAsyncEnumerable<MessageBatchResultItem>>.Failure(error, anthropicHeaders);
}
return AnthropicResult<IAsyncEnumerable<MessageBatchResultItem>>.Success(ReadResultsAsync(), anthropicHeaders);
async IAsyncEnumerable<MessageBatchResultItem> ReadResultsAsync()
{
using var responseContent = await response.Content.ReadAsStreamAsync();
using var streamReader = new StreamReader(responseContent);
var line = await streamReader.ReadLineAsync();
while (line is not null)
{
var resultItem = Deserialize<MessageBatchResultItem>(line) ?? new MessageBatchResultItem();
yield return resultItem;
line = await streamReader.ReadLineAsync();
}
}
}
/// <inheritdoc/>
public async Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request, CancellationToken cancellationToken = default)
{
var response = await SendRequestAsync(CountTokensEndpoint, request, cancellationToken);
return await CreateResultAsync<TokenCountResponse>(response);
}
/// <inheritdoc/>
public async Task<AnthropicResult<Page<AnthropicModel>>> ListModelsAsync(PagingRequest? request = null, CancellationToken cancellationToken = default)
{
var pagingRequest = request ?? new PagingRequest();
var endpoint = $"{ModelsEndpoint}?{pagingRequest.ToQueryParameters()}";
var response = await SendRequestAsync(endpoint);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
var responseContent = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode is false)
{
var error = Deserialize<AnthropicError>(responseContent) ?? new AnthropicError();
return AnthropicResult<Page<AnthropicModel>>.Failure(error, anthropicHeaders);
}
var page = Deserialize<Page<AnthropicModel>>(responseContent) ?? new Page<AnthropicModel>();
return AnthropicResult<Page<AnthropicModel>>.Success(page, anthropicHeaders);
var response = await SendRequestAsync(endpoint, cancellationToken: cancellationToken);
return await CreateResultAsync<Page<AnthropicModel>>(response);
}
/// <inheritdoc/>
public async IAsyncEnumerable<AnthropicResult<Page<AnthropicModel>>> ListAllModelsAsync(int limit = 20)
public async IAsyncEnumerable<AnthropicResult<Page<AnthropicModel>>> ListAllModelsAsync(int limit = 20, [EnumeratorCancellation] CancellationToken cancellationToken = default)
{
await foreach (var result in GetAllPagesAsync<AnthropicModel>(ModelsEndpoint, limit, cancellationToken))
{
yield return result;
}
}
/// <inheritdoc/>
public async Task<AnthropicResult<AnthropicModel>> GetModelAsync(string modelId, CancellationToken cancellationToken = default)
{
var endpoint = $"{ModelsEndpoint}/{modelId}";
var response = await SendRequestAsync(endpoint, cancellationToken: cancellationToken);
return await CreateResultAsync<AnthropicModel>(response);
}
private async IAsyncEnumerable<AnthropicResult<Page<T>>> GetAllPagesAsync<T>(string endpoint, int limit = 20, [EnumeratorCancellation] CancellationToken cancellationToken = default)
{
var pagingRequest = new PagingRequest(limit: limit);
string Endpoint() => $"{ModelsEndpoint}?{pagingRequest.ToQueryParameters()}";
string Endpoint() => $"{endpoint}?{pagingRequest.ToQueryParameters()}";
bool hasMore;
do
{
var response = await SendRequestAsync(Endpoint());
var response = await SendRequestAsync(Endpoint(), cancellationToken: cancellationToken);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
var responseContent = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode is false)
{
var error = Deserialize<AnthropicError>(responseContent) ?? new AnthropicError();
yield return AnthropicResult<Page<AnthropicModel>>.Failure(error, anthropicHeaders);
yield return AnthropicResult<Page<T>>.Failure(error, anthropicHeaders);
yield break;
}
var page = Deserialize<Page<AnthropicModel>>(responseContent) ?? new Page<AnthropicModel>();
var page = Deserialize<Page<T>>(responseContent) ?? new Page<T>();
if (page.HasMore && page.LastId is not null)
{
@@ -355,28 +384,10 @@ public class AnthropicApiClient : IAnthropicApiClient
hasMore = false;
}
yield return AnthropicResult<Page<AnthropicModel>>.Success(page, anthropicHeaders);
yield return AnthropicResult<Page<T>>.Success(page, anthropicHeaders);
} while (hasMore);
}
/// <inheritdoc/>
public async Task<AnthropicResult<AnthropicModel>> GetModelAsync(string modelId)
{
var endpoint = $"{ModelsEndpoint}/{modelId}";
var response = await SendRequestAsync(endpoint);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
var responseContent = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode is false)
{
var error = Deserialize<AnthropicError>(responseContent) ?? new AnthropicError();
return AnthropicResult<AnthropicModel>.Failure(error, anthropicHeaders);
}
var model = Deserialize<AnthropicModel>(responseContent) ?? new AnthropicModel();
return AnthropicResult<AnthropicModel>.Success(model, anthropicHeaders);
}
private ToolCall? GetToolCall(MessageResponse response, List<Tool> tools)
{
var toolUse = response.Content.OfType<ToolUseContent>().FirstOrDefault();
@@ -396,16 +407,32 @@ public class AnthropicApiClient : IAnthropicApiClient
return new ToolCall(tool, toolUse);
}
private async Task<HttpResponseMessage> SendRequestAsync(string endpoint)
private async Task<AnthropicResult<T>> CreateResultAsync<T>(HttpResponseMessage response) where T : new()
{
return await _httpClient.GetAsync(endpoint);
var anthropicHeaders = new AnthropicHeaders(response.Headers);
var responseContent = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode is false)
{
var error = Deserialize<AnthropicError>(responseContent) ?? new AnthropicError();
return AnthropicResult<T>.Failure(error, anthropicHeaders);
}
var model = Deserialize<T>(responseContent) ?? new T();
return AnthropicResult<T>.Success(model, anthropicHeaders);
}
private async Task<HttpResponseMessage> SendRequestAsync<T>(string endpoint, T request)
private async Task<HttpResponseMessage> SendRequestAsync(string endpoint, HttpMethod? method = null, CancellationToken cancellationToken = default)
{
var request = new HttpRequestMessage(method ?? HttpMethod.Get, endpoint);
return await _httpClient.SendAsync(request, cancellationToken);
}
private async Task<HttpResponseMessage> SendRequestAsync<T>(string endpoint, T request, CancellationToken cancellationToken = default)
{
var requestJson = Serialize(request);
var requestContent = new StringContent(requestJson, Encoding.UTF8, JsonContentType);
return await _httpClient.PostAsync(endpoint, requestContent);
return await _httpClient.PostAsync(endpoint, requestContent, cancellationToken);
}
private string Serialize<T>(T obj) => JsonSerializer.Serialize(obj, JsonSerializationOptions.DefaultOptions);
+3 -3
View File
@@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>latest</LangVersion>
<PackageId>AnthropicClient</PackageId>
<Version>0.5.0</Version>
<Version>0.6.1</Version>
<Authors>Stevan Freeborn</Authors>
<Description>Anthropic Client Library</Description>
<PackageProjectUrl>https://anthropicclient.stevanfreeborn.com/</PackageProjectUrl>
@@ -34,8 +34,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
+29
View File
@@ -2,6 +2,35 @@
All notable changes to this project will be documented in this file. See [versionize](https://github.com/versionize/versionize) for commit guidelines.
<a name="0.6.1"></a>
## [0.6.1](https://www.github.com/StevanFreeborn/anthropic-client/releases/tag/v0.6.1) (2025-05-19)
### Bug Fixes
* cleanup based on copilot review comments ([5d4fb29](https://www.github.com/StevanFreeborn/anthropic-client/commit/5d4fb290ba24095ea564cf8a33366dd53ab4ba44))
* cleanup copilot mistakes with passing cancellation token to methods that don't accept them ([595326c](https://www.github.com/StevanFreeborn/anthropic-client/commit/595326c7a9454e3c9d4a5c9d95777e723896e1a0))
* copilot first attempt ([0a1c6a0](https://www.github.com/StevanFreeborn/anthropic-client/commit/0a1c6a0135d997baa5475d1f6417772bae160a05))
<a name="0.6.0"></a>
## [0.6.0](https://www.github.com/StevanFreeborn/anthropic-client/releases/tag/v0.6.0) (2025-01-15)
### Features
* add CancelMessageBatchAsync method and corresponding tests ([c11600c](https://www.github.com/StevanFreeborn/anthropic-client/commit/c11600c77040eebfab4df1153d07774357d87ce2))
* add class for representing batch statuses ([f8e01bf](https://www.github.com/StevanFreeborn/anthropic-client/commit/f8e01bf4878e07f823d524408ed59a2232960a7b))
* add DeleteMessageBatchAsync method and MessageBatchDeleteResponse model with tests ([56b3a53](https://www.github.com/StevanFreeborn/anthropic-client/commit/56b3a53a2a31070693351525379b6a675b068496))
* add ListAllMessageBatchesAsync method and corresponding tests ([180a090](https://www.github.com/StevanFreeborn/anthropic-client/commit/180a0901959b88b27981f063b0be7a267a141802))
* implement CreateMessageBatchAsync method ([9548754](https://www.github.com/StevanFreeborn/anthropic-client/commit/9548754d6cab73d21c7b7a28264374e79dcb8bab))
* implement GetMessageBatchAsync method ([c5f3c5e](https://www.github.com/StevanFreeborn/anthropic-client/commit/c5f3c5eca549a89ac6b8197b833767c0ca4465c5))
* implement GetMessageBatchResultsAsync method ([c56adf3](https://www.github.com/StevanFreeborn/anthropic-client/commit/c56adf394c62aca10c89f1d8650635cefe248d50))
* implement ListMessageBatchesAsync method ([ca2ecdc](https://www.github.com/StevanFreeborn/anthropic-client/commit/ca2ecdcfc79a5ff96c22eb564e7fc8be22e82a6f))
### Bug Fixes
* default nullable properties to actually datetimeoffset min value when new'd up ([0a6d89b](https://www.github.com/StevanFreeborn/anthropic-client/commit/0a6d89bd77e165a0ae63dacd9f854bd49ba817ce))
* make correct properties nullable ([15f5ad4](https://www.github.com/StevanFreeborn/anthropic-client/commit/15f5ad49e7f41215c3b089cdfe3873182223ce2d))
* use proper count tokens endpoint ([5e247a3](https://www.github.com/StevanFreeborn/anthropic-client/commit/5e247a3c3afb9a3dad954eaa5890de106ae2edb9))
<a name="0.5.0"></a>
## [0.5.0](https://www.github.com/StevanFreeborn/anthropic-client/releases/tag/v0.5.0) (2025-01-06)
+114
View File
@@ -0,0 +1,114 @@
using AnthropicClient.Models;
namespace AnthropicClient;
/// <summary>
/// Represents a client for interacting with the Anthropic API.
/// </summary>
public interface IAnthropicApiClient
{
/// <summary>
/// Creates a message asynchronously.
/// </summary>
/// <param name="request">The message request to create.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/>.</returns>
Task<AnthropicResult<MessageResponse>> CreateMessageAsync(MessageRequest request, CancellationToken cancellationToken = default);
/// <summary>
/// Creates a message asynchronously and streams the response.
/// </summary>
/// <param name="request">The message request to create.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>An asynchronous enumerable that yields the response event by event.</returns>
IAsyncEnumerable<AnthropicEvent> CreateMessageAsync(StreamMessageRequest request, CancellationToken cancellationToken = default);
/// <summary>
/// Creates a batch of messages asynchronously.
/// </summary>
/// <param name="request">The message batch request to create.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="MessageBatchResponse"/>.</returns>
Task<AnthropicResult<MessageBatchResponse>> CreateMessageBatchAsync(MessageBatchRequest request, CancellationToken cancellationToken = default);
/// <summary>
/// Gets a message batch asynchronously.
/// </summary>
/// <param name="batchId">The ID of the message batch to get.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="MessageBatchResponse"/>.</returns>
Task<AnthropicResult<MessageBatchResponse>> GetMessageBatchAsync(string batchId, CancellationToken cancellationToken = default);
/// <summary>
/// Lists the message batches asynchronously.
/// </summary>
/// <param name="request">The paging request to use for listing the message batches.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="Page{T}"/> where T is <see cref="MessageBatchResponse"/>.</returns>
Task<AnthropicResult<Page<MessageBatchResponse>>> ListMessageBatchesAsync(PagingRequest? request = null, CancellationToken cancellationToken = default);
/// <summary>
/// Lists all message batches asynchronously.
/// </summary>
/// <param name="limit">The maximum number of message batches to return in each page.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>An asynchronous enumerable that yields the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="Page{T}"/> where T is <see cref="MessageBatchResponse"/>.</returns>
IAsyncEnumerable<AnthropicResult<Page<MessageBatchResponse>>> ListAllMessageBatchesAsync(int limit = 20, CancellationToken cancellationToken = default);
/// <summary>
/// Cancels a message batch asynchronously.
/// </summary>
/// <param name="batchId">The ID of the message batch to cancel.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="MessageBatchResponse"/>.</returns>
Task<AnthropicResult<MessageBatchResponse>> CancelMessageBatchAsync(string batchId, CancellationToken cancellationToken = default);
/// <summary>
/// Deletes a message batch asynchronously.
/// </summary>
/// <param name="batchId">The ID of the message batch to delete.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="MessageBatchDeleteResponse"/>.</returns>
Task<AnthropicResult<MessageBatchDeleteResponse>> DeleteMessageBatchAsync(string batchId, CancellationToken cancellationToken = default);
/// <summary>
/// Gets the results of a message batch asynchronously.
/// </summary>
/// <param name="batchId">The ID of the message batch to get the results for.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="IAsyncEnumerable{T}"/> where T is <see cref="MessageBatchResultItem"/>.</returns>
Task<AnthropicResult<IAsyncEnumerable<MessageBatchResultItem>>> GetMessageBatchResultsAsync(string batchId, CancellationToken cancellationToken = default);
/// <summary>
/// Counts the tokens in a message asynchronously.
/// </summary>
/// <param name="request">The count message tokens request.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="TokenCountResponse"/>.</returns>
Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request, CancellationToken cancellationToken = default);
/// <summary>
/// Lists models asynchronously, returning a single page of results.
/// </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>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="Page{T}"/> where T is <see cref="AnthropicModel"/>.</returns>
Task<AnthropicResult<Page<AnthropicModel>>> ListModelsAsync(PagingRequest? request = null, CancellationToken cancellationToken = default);
/// <summary>
/// Lists all models asynchronously, returning every page of results.
/// </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>
/// <returns>An asynchronous enumerable that yields the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="Page{T}"/> where T is <see cref="AnthropicModel"/>.</returns>
///
IAsyncEnumerable<AnthropicResult<Page<AnthropicModel>>> ListAllModelsAsync(int limit = 20, CancellationToken cancellationToken = default);
/// <summary>
/// Gets a model by its ID asynchronously.
/// </summary>
/// <param name="modelId">The ID of the model to get.</param>
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the response as an <see cref="AnthropicResult{T}"/> where T is <see cref="AnthropicModel"/>.</returns>
Task<AnthropicResult<AnthropicModel>> GetModelAsync(string modelId, CancellationToken cancellationToken = default);
}
@@ -1,4 +1,3 @@
using System.Diagnostics;
using System.Text.Json;
using System.Text.Json.Serialization;
@@ -1,4 +1,3 @@
using System.Diagnostics;
using System.Text.Json;
using System.Text.Json.Serialization;
@@ -17,6 +17,7 @@ static class JsonSerializationOptions
new EventDataConverter(),
new ContentDeltaConverter(),
new JsonStringEnumConverter(),
new MessageBatchResultConverter(),
},
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
};
@@ -0,0 +1,29 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using AnthropicClient.Models;
namespace AnthropicClient.Json;
class MessageBatchResultConverter : JsonConverter<MessageBatchResult>
{
public override MessageBatchResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
using var jsonDocument = JsonDocument.ParseValue(ref reader);
var root = jsonDocument.RootElement;
var type = root.GetProperty("type").GetString();
return type switch
{
MessageBatchResultType.Succeeded => JsonSerializer.Deserialize<SucceededMessageBatchResult>(root.GetRawText(), options)!,
MessageBatchResultType.Errored => JsonSerializer.Deserialize<ErroredMessageBatchResult>(root.GetRawText(), options)!,
MessageBatchResultType.Canceled => JsonSerializer.Deserialize<CanceledMessageBatchResult>(root.GetRawText(), options)!,
MessageBatchResultType.Expired => JsonSerializer.Deserialize<ExpiredMessageBatchResult>(root.GetRawText(), options)!,
_ => throw new JsonException($"Unknown message batch result type: {type}")
};
}
public override void Write(Utf8JsonWriter writer, MessageBatchResult value, JsonSerializerOptions options)
{
JsonSerializer.Serialize(writer, value, value.GetType(), options);
}
}
@@ -0,0 +1,14 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch result that was cancelled.
/// </summary>
public class CanceledMessageBatchResult : MessageBatchResult
{
/// <summary>
/// Initializes a new instance of the <see cref="CanceledMessageBatchResult"/> class.
/// </summary>
public CanceledMessageBatchResult() : base(MessageBatchResultType.Canceled)
{
}
}
@@ -0,0 +1,19 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch result that contains an error response.
/// </summary>
public class ErroredMessageBatchResult : MessageBatchResult
{
/// <summary>
/// Gets the error of the message batch result.
/// </summary>
public AnthropicError Error { get; init; } = new AnthropicError();
/// <summary>
/// Initializes a new instance of the <see cref="ErroredMessageBatchResult"/> class.
/// </summary>
public ErroredMessageBatchResult() : base(MessageBatchResultType.Errored)
{
}
}
@@ -0,0 +1,14 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch result that has expired.
/// </summary>
public class ExpiredMessageBatchResult : MessageBatchResult
{
/// <summary>
/// Initializes a new instance of the <see cref="ExpiredMessageBatchResult"/> class.
/// </summary>
public ExpiredMessageBatchResult() : base(MessageBatchResultType.Expired)
{
}
}
@@ -0,0 +1,17 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch delete response.
/// </summary>
public class MessageBatchDeleteResponse
{
/// <summary>
/// Gets the ID of the message batch that was deleted.
/// </summary>
public string Id { get; init; } = string.Empty;
/// <summary>
/// Gets the type of the message batch response.
/// </summary>
public string Type { get; init; } = string.Empty;
}
@@ -0,0 +1,28 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents a request to create a batch of messages.
/// </summary>
public class MessageBatchRequest
{
/// <summary>
/// Gets the requests to create messages.
/// </summary>
public List<MessageBatchRequestItem> Requests { get; init; } = [];
/// <summary>
/// Initializes a new instance of the <see cref="MessageBatchRequest"/> class.
/// </summary>
/// <param name="requests">The requests to create messages.</param>
/// <exception cref="ArgumentException">Thrown when <paramref name="requests"/> is empty.</exception>
/// <returns>An instance of the <see cref="MessageBatchRequest"/> class.</returns>
public MessageBatchRequest(List<MessageBatchRequestItem> requests)
{
if (requests.Count == 0)
{
throw new ArgumentException($"{nameof(requests)} must not be empty.", nameof(requests));
}
Requests = requests;
}
}
@@ -0,0 +1,39 @@
using System.Text.Json.Serialization;
using AnthropicClient.Utils;
namespace AnthropicClient.Models;
/// <summary>
/// Represents an item in a batch of messages.
/// </summary>
public class MessageBatchRequestItem
{
/// <summary>
/// Gets the custom identifier for the message.
/// </summary>
[JsonPropertyName("custom_id")]
public string CustomId { get; init; }
/// <summary>
/// Gets the message request parameters.
/// </summary>
public MessageRequest Params { get; init; }
/// <summary>
/// Initializes a new instance of the <see cref="MessageBatchRequestItem"/> class.
/// </summary>
/// <param name="customId">The custom identifier for the message.</param>
/// <param name="messageRequest">The message request parameters.</param>
/// <exception cref="ArgumentException">Thrown when <paramref name="customId"/> is null or whitespace.</exception>
/// <exception cref="ArgumentException">Thrown when <paramref name="messageRequest"/> is null.</exception>
/// <returns>An instance of the <see cref="MessageBatchRequestItem"/> class.</returns>
public MessageBatchRequestItem(string customId, MessageRequest messageRequest)
{
ArgumentValidator.ThrowIfNullOrWhitespace(customId, nameof(customId));
ArgumentValidator.ThrowIfNull(messageRequest, nameof(messageRequest));
CustomId = customId;
Params = messageRequest;
}
}
@@ -0,0 +1,98 @@
using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
/// <summary>
/// Represents a response to a batch of messages.
/// </summary>
public class MessageBatchResponse
{
/// <summary>
/// Gets the identifier of the batch.
/// </summary>
public string Id { get; init; } = string.Empty;
/// <summary>
/// Gets the type of the batch.
/// </summary>
public string Type { get; init; } = string.Empty;
/// <summary>
/// Gets the processing status of the batch.
/// </summary>
[JsonPropertyName("processing_status")]
public string ProcessingStatus { get; init; } = string.Empty;
/// <summary>
/// Gets the counts of requests in the batch.
/// </summary>
[JsonPropertyName("request_counts")]
public MessageBatchRequestCounts RequestCounts { get; init; } = new();
/// <summary>
/// Gets the date and time when the batch ended.
/// </summary>
[JsonPropertyName("ended_at")]
public DateTimeOffset? EndedAt { get; init; } = DateTimeOffset.MinValue;
/// <summary>
/// Gets the date and time when the batch was created.
/// </summary>
[JsonPropertyName("created_at")]
public DateTimeOffset CreatedAt { get; init; }
/// <summary>
/// Gets the date and time when the batch expires.
/// </summary>
[JsonPropertyName("expires_at")]
public DateTimeOffset ExpiresAt { get; init; }
/// <summary>
/// Gets the date and time when the batch was archived.
/// </summary>
[JsonPropertyName("archived_at")]
public DateTimeOffset? ArchivedAt { get; init; } = DateTimeOffset.MinValue;
/// <summary>
/// Gets the date and time when the batch cancellation was initiated.
/// </summary>
[JsonPropertyName("cancel_initiated_at")]
public DateTimeOffset? CancelInitiatedAt { get; init; } = DateTimeOffset.MinValue;
/// <summary>
/// Gets the URL to the results of the batch.
/// </summary>
[JsonPropertyName("results_url")]
public string? ResultsUrl { get; init; } = string.Empty;
}
/// <summary>
/// Represents the counts of requests in a batch of messages.
/// </summary>
public class MessageBatchRequestCounts
{
/// <summary>
/// Gets the number of requests in the batch that are processing.
/// </summary>
public int Processing { get; init; }
/// <summary>
/// Gets the number of requests in the batch that succeeded.
/// </summary>
public int Succeeded { get; init; }
/// <summary>
/// Gets the number of requests in the batch that errored.
/// </summary>
public int Errored { get; init; }
/// <summary>
/// Gets the number of requests in the batch that were cancelled.
/// </summary>
public int Canceled { get; init; }
/// <summary>
/// Gets the number of requests in the batch that expired.
/// </summary>
public int Expired { get; init; }
}
@@ -0,0 +1,26 @@
using AnthropicClient.Utils;
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch result.
/// </summary>
public abstract class MessageBatchResult
{
/// <summary>
/// Gets the type of the message batch result.
/// </summary>
public string Type { get; init; } = string.Empty;
/// <summary>
/// Initializes a new instance of the <see cref="MessageBatchResult"/> class.
/// </summary>
/// <param name="type">The type of the message batch result.</param>
/// <returns>An instance of the <see cref="MessageBatchResult"/> class.</returns>
public MessageBatchResult(string type)
{
ArgumentValidator.ThrowIfNullOrWhitespace(type, nameof(type));
Type = type;
}
}
@@ -0,0 +1,20 @@
using System.Text.Json.Serialization;
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch result item.
/// </summary>
public class MessageBatchResultItem
{
/// <summary>
/// Gets the custom ID of the message batch result item.
/// </summary>
[JsonPropertyName("custom_id")]
public string CustomId { get; init; } = string.Empty;
/// <summary>
/// Gets the result of the message batch result item.
/// </summary>
public MessageBatchResult Result { get; init; } = default!;
}
@@ -0,0 +1,27 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents the types of message batch results.
/// </summary>
public static class MessageBatchResultType
{
/// <summary>
/// Represents a succeeded message batch result.
/// </summary>
public const string Succeeded = "succeeded";
/// <summary>
/// Represents an errored message batch result.
/// </summary>
public const string Errored = "errored";
/// <summary>
/// Represents a canceled message batch result.
/// </summary>
public const string Canceled = "canceled";
/// <summary>
/// Represents an expired message batch result.
/// </summary>
public const string Expired = "expired";
}
@@ -0,0 +1,22 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents the status of a message batch.
/// </summary>
public static class MessageBatchStatus
{
/// <summary>
/// The status of a message batch that is being canceled.
/// </summary>
public const string Canceling = "canceling";
/// <summary>
/// The status of a message batch that is in progress.
/// </summary>
public const string InProgress = "in_progress";
/// <summary>
/// The status of a message batch that has ended.
/// </summary>
public const string Ended = "ended";
}
@@ -0,0 +1,20 @@
namespace AnthropicClient.Models;
/// <summary>
/// Represents a message batch result that contains a message response.
/// </summary>
public class SucceededMessageBatchResult : MessageBatchResult
{
/// <summary>
/// Gets the message of the message batch result.
/// </summary>
public MessageResponse Message { get; init; } = new MessageResponse();
/// <summary>
/// Initializes a new instance of the <see cref="SucceededMessageBatchResult"/> class.
/// </summary>
/// <returns>An instance of the <see cref="SucceededMessageBatchResult"/> class.</returns>
public SucceededMessageBatchResult() : base(MessageBatchResultType.Succeeded)
{
}
}
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
@@ -10,21 +10,21 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.2" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="FluentAssertions" Version="7.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="RichardSzalay.MockHttp" Version="7.0.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
<PackageReference Include="SystemTextJson.JsonDiffPatch.Xunit" Version="2.0.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.0" />
<PackageReference Include="coverlet.collector" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.2">
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
@@ -1,10 +1,9 @@
using AnthropicClient.Tests.Files;
namespace AnthropicClient.Tests.EndToEnd;
public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(configFixture)
public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndToEndTest(configFixture)
{
private string GetTestFilePath(string fileName) =>
Path.Combine(Directory.GetCurrentDirectory(), "Files", fileName);
[Fact]
public async Task CreateMessageAsync_WhenCalled_ItShouldReturnResponse()
{
@@ -63,7 +62,7 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
[Fact]
public async Task CreateMessageAsync_WhenImageIsSent_ItShouldReturnResponse()
{
var imagePath = GetTestFilePath("elephant.jpg");
var imagePath = TestFileHelper.GetTestFilePath("elephant.jpg");
var mediaType = "image/jpeg";
var bytes = await File.ReadAllBytesAsync(imagePath);
var base64Data = Convert.ToBase64String(bytes);
@@ -102,7 +101,7 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
{
var client = CreateClient(new HttpClient());
var storyPath = GetTestFilePath("story.txt");
var storyPath = TestFileHelper.GetTestFilePath("story.txt");
var storyText = await File.ReadAllTextAsync(storyPath);
var request = new MessageRequest(
@@ -141,7 +140,7 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
{
var client = CreateClient(new HttpClient());
var storyPath = GetTestFilePath("story.txt");
var storyPath = TestFileHelper.GetTestFilePath("story.txt");
var storyText = await File.ReadAllTextAsync(storyPath);
var request = new MessageRequest(
@@ -217,7 +216,7 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
[Fact]
public async Task CreateMessageAsync_WhenProvidedWithPDF_ItShouldReturnResponse()
{
var pdfPath = GetTestFilePath("addendum.pdf");
var pdfPath = TestFileHelper.GetTestFilePath("addendum.pdf");
var bytes = await File.ReadAllBytesAsync(pdfPath);
var base64Data = Convert.ToBase64String(bytes);
@@ -253,7 +252,7 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
[Fact]
public async Task CreateMessageAsync_WhenProvidedWithPDFWithCacheControl_ItShouldUseCache()
{
var pdfPath = GetTestFilePath("addendum.pdf");
var pdfPath = TestFileHelper.GetTestFilePath("addendum.pdf");
var bytes = await File.ReadAllBytesAsync(pdfPath);
var base64Data = Convert.ToBase64String(bytes);
@@ -341,4 +340,121 @@ public class ClientTests(ConfigurationFixture configFixture) : EndToEndTest(conf
result.Value.Should().BeOfType<AnthropicModel>();
result.Value.Id.Should().Be(AnthropicModels.Claude3Haiku);
}
[Fact]
public async Task CreateMessageBatchAsync_WhenCalled_ItShouldReturnResponse()
{
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var result = await _client.CreateMessageBatchAsync(request);
result.IsSuccess.Should().BeTrue();
result.Value.Should().BeOfType<MessageBatchResponse>();
result.Value.Id.Should().NotBeNullOrEmpty();
}
[Fact]
public async Task GetMessageBatchAsync_WhenCalled_ItShouldReturnResponse()
{
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var createResult = await _client.CreateMessageBatchAsync(request);
var getResult = await _client.GetMessageBatchAsync(createResult.Value.Id);
getResult.IsSuccess.Should().BeTrue();
getResult.Value.Should().BeOfType<MessageBatchResponse>();
getResult.Value.Id.Should().Be(createResult.Value.Id);
}
[Fact]
public async Task ListMessageBatchesAsync_WhenCalled_ItShouldReturnResponse()
{
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var createResult = await _client.CreateMessageBatchAsync(request);
var result = await _client.ListMessageBatchesAsync();
result.IsSuccess.Should().BeTrue();
result.Value.Should().BeOfType<Page<MessageBatchResponse>>();
result.Value.Data.Should().HaveCountGreaterThan(0);
result.Value.Data.Should().ContainSingle(b => b.Id == createResult.Value.Id);
}
[Fact]
public async Task ListAllMessageBatchesAsync_WhenCalled_ItShouldReturnResponse()
{
var createRequest = (string id) => new MessageBatchRequest([
new(
id,
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var requestNumberOne = createRequest(Guid.NewGuid().ToString());
var requestNumberTwo = createRequest(Guid.NewGuid().ToString());
var createResultOne = await _client.CreateMessageBatchAsync(requestNumberOne);
var createResultTwo = await _client.CreateMessageBatchAsync(requestNumberTwo);
var responses = await _client.ListAllMessageBatchesAsync(limit: 1).ToListAsync();
responses.Should().HaveCountGreaterThan(2);
var batches = responses
.Where(r => r.IsSuccess)
.Select(r => r.Value)
.SelectMany(r => r.Data);
batches.Should().ContainSingle(b => b.Id == createResultOne.Value.Id);
batches.Should().ContainSingle(b => b.Id == createResultTwo.Value.Id);
}
[Fact]
public async Task CancelMessageBatchAsync_WhenCalled_ItShouldReturnResponse()
{
var request = new MessageBatchRequest([
new(
Guid.NewGuid().ToString(),
new(
model: AnthropicModels.Claude3Haiku,
messages: [new(MessageRole.User, [new TextContent("Hello!")])]
)
),
]);
var createResult = await _client.CreateMessageBatchAsync(request);
var result = await _client.CancelMessageBatchAsync(createResult.Value.Id);
result.IsSuccess.Should().BeTrue();
result.Value.Should().BeOfType<MessageBatchResponse>();
result.Value.Id.Should().Be(createResult.Value.Id);
result.Value.ProcessingStatus.Should().Be(MessageBatchStatus.Canceling);
}
}
@@ -0,0 +1,7 @@
namespace AnthropicClient.Tests.Files;
static class TestFileHelper
{
public static string GetTestFilePath(string fileName) =>
Path.Combine(Directory.GetCurrentDirectory(), "Files", fileName);
}
@@ -0,0 +1,5 @@
{"custom_id":"my-fifth-request","result":{"type":"errored","error":{"type":"error","error":{"type":"not_found_error","message":"The requested resource could not be found."}}}}
{"custom_id":"my-fourth-request","result":{"type":"expired"}}
{"custom_id":"my-third-request","result":{"type":"canceled"}}
{"custom_id":"my-second-request","result":{"type":"succeeded","message":{"id":"msg_014VwiXbi91y3JMjcpyGBHX5","type":"message","role":"assistant","model":"claude-3-5-sonnet-20240620","content":[{"type":"text","text":"Hello again! It's nice to see you. How can I assist you today? Is there anything specific you'd like to chat about or any questions you have?"}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":11,"output_tokens":36}}}}
{"custom_id":"my-first-request","result":{"type":"succeeded","message":{"id":"msg_01FqfsLoHwgeFbguDgpz48m7","type":"message","role":"assistant","model":"claude-3-5-sonnet-20240620","content":[{"type":"text","text":"Hello! How can I assist you today? Feel free to ask me any questions or let me know if there's anything you'd like to chat about."}],"stop_reason":"end_turn","stop_sequence":null,"usage":{"input_tokens":10,"output_tokens":34}}}}
File diff suppressed because it is too large Load Diff
@@ -1,6 +1,8 @@
using AnthropicClient.Tests.Unit;
namespace AnthropicClient.Tests.Integration;
public class IntegrationTest
public class IntegrationTest : SerializationTest
{
protected readonly MockHttpMessageHandler _mockHttpMessageHandler = new();
protected AnthropicApiClient Client => CreateClient();
@@ -16,6 +18,7 @@ public static class MockHttpMessageHandlerExtensions
private const string BaseUrl = "https://api.anthropic.com/v1";
private static readonly string MessagesEndpoint = $"{BaseUrl}/messages";
private static readonly string CountTokensEndpoint = $"{BaseUrl}/messages/count_tokens";
private static readonly string MessageBatchesEndpoint = $"{BaseUrl}/messages/batches";
private static readonly string ModelsEndpoint = $"{BaseUrl}/models";
private static MockedRequest SetupBaseRequest(
@@ -64,4 +67,40 @@ public static class MockHttpMessageHandlerExtensions
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Get, $"{ModelsEndpoint}/{modelId}");
}
public static MockedRequest WhenCreateMessageBatchRequest(this MockHttpMessageHandler mockHttpMessageHandler)
{
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Post, MessageBatchesEndpoint);
}
public static MockedRequest WhenGetMessageBatchRequest(this MockHttpMessageHandler mockHttpMessageHandler, string batchId)
{
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Get, $"{MessageBatchesEndpoint}/{batchId}");
}
public static MockedRequest WhenGetMessageBatchResultsRequest(this MockHttpMessageHandler mockHttpMessageHandler, string batchId)
{
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Get, $"{MessageBatchesEndpoint}/{batchId}/results");
}
public static MockedRequest WhenListMessageBatchesRequest(this MockHttpMessageHandler mockHttpMessageHandler)
{
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Get, MessageBatchesEndpoint);
}
public static MockedRequest WhenCancelMessageBatchRequest(this MockHttpMessageHandler mockHttpMessageHandler, string batchId)
{
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Post, $"{MessageBatchesEndpoint}/{batchId}/cancel");
}
public static MockedRequest WhenDeleteMessageBatchRequest(this MockHttpMessageHandler mockHttpMessageHandler, string batchId)
{
return mockHttpMessageHandler
.SetupBaseRequest(HttpMethod.Delete, $"{MessageBatchesEndpoint}/{batchId}");
}
}
@@ -0,0 +1,34 @@
namespace AnthropicClient.Tests.Unit.Models;
public class CanceledMessageBatchResultTests : SerializationTest
{
private const string SampleJson = @"{
""type"": ""canceled""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnAnInstanceWithPropertiesSet()
{
var result = new CanceledMessageBatchResult();
result.Type.Should().Be(MessageBatchResultType.Canceled);
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var result = new CanceledMessageBatchResult();
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedProperties()
{
var result = Deserialize<CanceledMessageBatchResult>(SampleJson);
result!.Type.Should().Be(MessageBatchResultType.Canceled);
}
}
@@ -0,0 +1,48 @@
namespace AnthropicClient.Tests.Unit.Models;
public class ErroredMessageBatchResultTests : SerializationTest
{
private const string SampleJson = @"{
""type"": ""errored"",
""error"": {
""type"": ""error"",
""error"": {
""type"": ""api_error"",
""message"": ""An error occurred.""
}
}
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnAnInstanceWithPropertiesSet()
{
var result = new ErroredMessageBatchResult();
result.Type.Should().Be(MessageBatchResultType.Errored);
result.Error.Error.Should().BeOfType<ApiError>();
result.Error.Error.Message.Should().BeEmpty();
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var result = new ErroredMessageBatchResult
{
Error = new(new ApiError("An error occurred."))
};
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedProperties()
{
var result = Deserialize<ErroredMessageBatchResult>(SampleJson);
result!.Type.Should().Be(MessageBatchResultType.Errored);
result.Error.Error.Should().BeOfType<ApiError>();
result.Error.Error.Message.Should().Be("An error occurred.");
}
}
@@ -0,0 +1,34 @@
namespace AnthropicClient.Tests.Unit.Models;
public class ExpiredMessageBatchResultTests : SerializationTest
{
private const string SampleJson = @"{
""type"": ""expired""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnAnInstanceWithPropertiesSet()
{
var result = new ExpiredMessageBatchResult();
result.Type.Should().Be(MessageBatchResultType.Expired);
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var result = new ExpiredMessageBatchResult();
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedProperties()
{
var result = Deserialize<ExpiredMessageBatchResult>(SampleJson);
result!.Type.Should().Be(MessageBatchResultType.Expired);
}
}
@@ -0,0 +1,41 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchDeleteResponseTests : SerializationTest
{
private const string SampleJson = @"{
""id"": ""test-id"",
""type"": ""test-type""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnAnInstanceWithPropertiesSet()
{
var result = new MessageBatchDeleteResponse();
result.Id.Should().BeEmpty();
result.Type.Should().BeEmpty();
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var result = new MessageBatchDeleteResponse
{
Id = "test-id",
Type = "test-type"
};
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedValues()
{
var result = Deserialize<MessageBatchDeleteResponse>(SampleJson);
result!.Id.Should().Be("test-id");
result.Type.Should().Be("test-type");
}
}
@@ -0,0 +1,36 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchRequestItemTests : SerializationTest
{
[Fact]
public void Constructor_WhenCalled_ItShouldReturnInstanceWithPropertiesSet()
{
var customId = "custom_id";
var messageRequest = new MessageRequest();
var result = new MessageBatchRequestItem(customId, messageRequest);
result.Should().BeOfType<MessageBatchRequestItem>();
result.CustomId.Should().Be(customId);
result.Params.Should().BeSameAs(messageRequest);
}
[Theory]
[InlineData("")]
[InlineData(" ")]
[InlineData(null)]
public void Constructor_WhenCalledAndCustomIdIsInvalid_ItShouldThrowException(string? customId)
{
var act = () => new MessageBatchRequestItem(customId!, new MessageRequest());
act.Should().Throw<ArgumentException>();
}
[Fact]
public void Constructor_WhenCalledAndMessageRequestIsNull_ItShouldThrowException()
{
var act = () => new MessageBatchRequestItem("custom_id", null!);
act.Should().Throw<ArgumentException>();
}
}
@@ -0,0 +1,84 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchRequestTests : SerializationTest
{
private const string SampleJson = @"{
""requests"": [
{
""custom_id"": ""my-first-request"",
""params"": {
""model"": ""claude-3-5-sonnet-20241022"",
""messages"": [
{""role"": ""user"", ""content"": [{ ""text"": ""Hello, world"", ""type"": ""text"" }]}
],
""max_tokens"": 1024,
""stop_sequences"": [],
""temperature"": 0.0,
""stream"": false
}
},
{
""custom_id"": ""my-second-request"",
""params"": {
""model"": ""claude-3-5-sonnet-20241022"",
""messages"": [
{""role"": ""user"", ""content"": [{ ""text"": ""Hi again, friend"", ""type"": ""text"" }]}
],
""max_tokens"": 1024,
""stop_sequences"": [],
""temperature"": 0.0,
""stream"": false
}
}
]
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnInstanceWithPropertiesSet()
{
var requests = new List<MessageBatchRequestItem> { new("custom_id", new()) };
var result = new MessageBatchRequest(requests);
result.Should().BeOfType<MessageBatchRequest>();
result.Requests.Should().BeSameAs(requests);
}
[Fact]
public void Constructor_WhenCalledWithEmptyRequests_ItShouldThrowException()
{
var act = () => new MessageBatchRequest([]);
act.Should().Throw<ArgumentException>();
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var requests = new List<MessageBatchRequestItem>
{
new("my-first-request", new()
{
Model = "claude-3-5-sonnet-20241022",
MaxTokens = 1024,
Messages = [
new() { Role = "user", Content = [new TextContent("Hello, world")] }
]
}),
new("my-second-request", new()
{
Model = "claude-3-5-sonnet-20241022",
MaxTokens = 1024,
Messages = [
new() { Role = "user", Content = [new TextContent("Hi again, friend")] }
]
})
};
var result = new MessageBatchRequest(requests);
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
}
@@ -0,0 +1,115 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchResponseTests : SerializationTest
{
private const string SampleJson = @"{
""id"": ""msgbatch_013Zva2CMHLNnXjNJJKqJ2EF"",
""type"": ""message_batch"",
""processing_status"": ""in_progress"",
""request_counts"": {
""processing"": 100,
""succeeded"": 50,
""errored"": 30,
""canceled"": 10,
""expired"": 10
},
""ended_at"": ""2024-08-20T18:37:24.100435Z"",
""created_at"": ""2024-08-20T18:37:24.100435Z"",
""expires_at"": ""2024-08-20T18:37:24.100435Z"",
""archived_at"": ""2024-08-20T18:37:24.100435Z"",
""cancel_initiated_at"": ""2024-08-20T18:37:24.100435Z"",
""results_url"": ""https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnInstanceWithPropertiesSet()
{
var result = new MessageBatchResponse();
result.Should().BeOfType<MessageBatchResponse>();
result.Id.Should().BeEmpty();
result.Type.Should().BeEmpty();
result.ProcessingStatus.Should().BeEmpty();
result.RequestCounts.Should().BeEquivalentTo(new MessageBatchRequestCounts());
result.EndedAt.Should().Be(DateTimeOffset.MinValue);
result.CreatedAt.Should().Be(DateTimeOffset.MinValue);
result.ExpiresAt.Should().Be(DateTimeOffset.MinValue);
result.ArchivedAt.Should().Be(DateTimeOffset.MinValue);
result.CancelInitiatedAt.Should().Be(DateTimeOffset.MinValue);
result.ResultsUrl.Should().BeEmpty();
}
[Fact]
public void JsonSerialization_WhenDeserialized_ItShouldHaveExpectedValues()
{
var result = Deserialize<MessageBatchResponse>(SampleJson);
result.Should().BeEquivalentTo(new MessageBatchResponse
{
Id = "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
Type = "message_batch",
ProcessingStatus = "in_progress",
RequestCounts = new()
{
Processing = 100,
Succeeded = 50,
Errored = 30,
Canceled = 10,
Expired = 10
},
EndedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
CreatedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
ExpiresAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
ArchivedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
CancelInitiatedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
ResultsUrl = "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results"
});
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var expectedJson = @"{
""id"": ""msgbatch_013Zva2CMHLNnXjNJJKqJ2EF"",
""type"": ""message_batch"",
""processing_status"": ""in_progress"",
""request_counts"": {
""processing"": 100,
""succeeded"": 50,
""errored"": 30,
""canceled"": 10,
""expired"": 10
},
""ended_at"": ""2024-08-20T18:37:24.100435+00:00"",
""created_at"": ""2024-08-20T18:37:24.100435+00:00"",
""expires_at"": ""2024-08-20T18:37:24.100435+00:00"",
""archived_at"": ""2024-08-20T18:37:24.100435+00:00"",
""cancel_initiated_at"": ""2024-08-20T18:37:24.100435+00:00"",
""results_url"": ""https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results""
}";
var result = Serialize(new MessageBatchResponse
{
Id = "msgbatch_013Zva2CMHLNnXjNJJKqJ2EF",
Type = "message_batch",
ProcessingStatus = "in_progress",
RequestCounts = new()
{
Processing = 100,
Succeeded = 50,
Errored = 30,
Canceled = 10,
Expired = 10
},
EndedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
CreatedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
ExpiresAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
ArchivedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
CancelInitiatedAt = DateTimeOffset.Parse("2024-08-20T18:37:24.100435Z"),
ResultsUrl = "https://api.anthropic.com/v1/messages/batches/msgbatch_013Zva2CMHLNnXjNJJKqJ2EF/results"
});
JsonAssert.Equal(expectedJson, result);
}
}
@@ -0,0 +1,14 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchResultItemTests
{
[Fact]
public void Constructor_WhenCalled_ItShouldReturnInstanceWithPropertiesSet()
{
var result = new MessageBatchResultItem();
result.Should().BeOfType<MessageBatchResultItem>();
result.CustomId.Should().BeEmpty();
result.Result.Should().Be(default);
}
}
@@ -0,0 +1,25 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchResultTests : SerializationTest
{
[Fact]
public void JsonDeserialization_WhenHasUnknownType_ItShouldThrowException()
{
var json = @"{""type"":""unknown""}";
var action = () => Deserialize<MessageBatchResult>(json);
action.Should().Throw<JsonException>();
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var expectedJson = @"{""type"":""expired""}";
var messageBatchResult = new ExpiredMessageBatchResult();
var json = Serialize<MessageBatchResult>(messageBatchResult);
JsonAssert.Equal(expectedJson, json);
}
}
@@ -0,0 +1,36 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchResultTypeTests
{
[Fact]
public void Succeeded_WhenCalled_ItShouldReturnExpectedValue()
{
var result = MessageBatchResultType.Succeeded;
result.Should().Be("succeeded");
}
[Fact]
public void Errored_WhenCalled_ItShouldReturnExpectedValue()
{
var result = MessageBatchResultType.Errored;
result.Should().Be("errored");
}
[Fact]
public void Canceled_WhenCalled_ItShouldReturnExpectedValue()
{
var result = MessageBatchResultType.Canceled;
result.Should().Be("canceled");
}
[Fact]
public void Expired_WhenCalled_ItShouldReturnExpectedValue()
{
var result = MessageBatchResultType.Expired;
result.Should().Be("expired");
}
}
@@ -0,0 +1,22 @@
namespace AnthropicClient.Tests.Unit.Models;
public class MessageBatchStatusTests
{
[Fact]
public void Canceling_WhenCalled_ItShouldReturnCancelingStatus()
{
MessageBatchStatus.Canceling.Should().Be("canceling");
}
[Fact]
public void InProgress_WhenCalled_ItShouldReturnCancelingStatus()
{
MessageBatchStatus.InProgress.Should().Be("in_progress");
}
[Fact]
public void Ended_WhenCalled_ItShouldReturnCancelingStatus()
{
MessageBatchStatus.Ended.Should().Be("ended");
}
}
@@ -0,0 +1,95 @@
namespace AnthropicClient.Tests.Unit.Models;
public class SucceededMessageBatchResultTests : SerializationTest
{
private const string SampleJson = @"{
""message"": {
""id"": ""msg_01FqfsLoHwgeFbguDgpz48m7"",
""model"": ""claude-3-5-sonnet-20240620"",
""role"": ""assistant"",
""stop_reason"": ""end_turn"",
""type"": ""message"",
""usage"": {
""input_tokens"": 10,
""output_tokens"": 34,
""cache_creation_input_tokens"": 0,
""cache_read_input_tokens"": 0
},
""content"": [
{
""text"": ""Hello! How can I assist you today? Feel free to ask me any questions or let me know if there\u0027s anything you\u0027d like to chat about."",
""type"": ""text""
}
]
},
""type"": ""succeeded""
}";
[Fact]
public void Constructor_WhenCalled_ItShouldReturnAnInstanceWithPropertiesSet()
{
var result = new SucceededMessageBatchResult();
result.Type.Should().Be(MessageBatchResultType.Succeeded);
result.Message.Should().BeEquivalentTo(new MessageResponse());
}
[Fact]
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
{
var result = new SucceededMessageBatchResult
{
Message = new MessageResponse
{
Id = "msg_01FqfsLoHwgeFbguDgpz48m7",
Type = "message",
Role = "assistant",
Model = "claude-3-5-sonnet-20240620",
Content = [
new TextContent()
{
Text = "Hello! How can I assist you today? Feel free to ask me any questions or let me know if there's anything you'd like to chat about."
}
],
StopReason = "end_turn",
Usage = new()
{
InputTokens = 10,
OutputTokens = 34
}
}
};
var json = Serialize(result);
JsonAssert.Equal(SampleJson, json);
}
[Fact]
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedValues()
{
var result = Deserialize<SucceededMessageBatchResult>(SampleJson);
result!.Type.Should().Be(MessageBatchResultType.Succeeded);
result.Message.Should().BeEquivalentTo(new MessageResponse
{
Id = "msg_01FqfsLoHwgeFbguDgpz48m7",
Type = "message",
Role = "assistant",
Model = "claude-3-5-sonnet-20240620",
Content = [
new TextContent()
{
Text = "Hello! How can I assist you today? Feel free to ask me any questions or let me know if there's anything you'd like to chat about."
}
],
StopReason = "end_turn",
StopSequence = null,
Usage = new()
{
InputTokens = 10,
OutputTokens = 34
}
});
}
}
@@ -1,5 +1,3 @@
using System.Text.Json.Nodes;
namespace AnthropicClient.Tests.Unit.Models;
public class ToolCallTests : SerializationTest
@@ -1,5 +1,3 @@
using AnthropicClient.Json;
namespace AnthropicClient.Tests.Unit;
public class SerializationTest