Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
071c9c133b | ||
|
|
b859859548 | ||
|
|
21ce029f09 | ||
|
|
723476b18f | ||
|
|
1f83899eb8 | ||
|
|
267972ca94 | ||
|
|
7657e661d0 | ||
|
|
b48baffb60 | ||
|
|
ad3b990138 | ||
|
|
ea4c8230bc | ||
|
|
0aaf6e0995 | ||
|
|
d1e88a52ac | ||
|
|
9cb8443f94 | ||
|
|
9d5c620167 | ||
|
|
c212ebffcd | ||
|
|
35c4147379 | ||
|
|
e52540eec3 | ||
|
|
b26e663960 | ||
|
|
f4ffcf5fbc | ||
|
|
914495ab97 | ||
|
|
1cad19d9c6 | ||
|
|
e674b9afe6 | ||
|
|
307c0da0c9 |
@@ -201,6 +201,150 @@ if (response.IsFailure)
|
|||||||
Console.WriteLine("Model Id: {0}", response.Value.Id);
|
Console.WriteLine("Model Id: {0}", response.Value.Id);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Files API
|
||||||
|
|
||||||
|
The `AnthropicApiClient` provides support for the Anthropic Files API, which allows you to upload and manage files for use with the Anthropic API.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The Files API is currently in beta. To use the Files API, you’ll need to include the beta feature header: `anthropic-beta: files-api-2025-04-14`
|
||||||
|
|
||||||
|
#### Create a File
|
||||||
|
|
||||||
|
You can create a file using the Files API in several ways:
|
||||||
|
|
||||||
|
##### From a Byte Array
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var fileBytes = await File.ReadAllBytesAsync("path/to/file.txt");
|
||||||
|
var request = new CreateFileRequest(fileBytes, "file.txt", "text/plain");
|
||||||
|
var result = await client.CreateFileAsync(request);
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
var file = result.Value;
|
||||||
|
Console.WriteLine($"Created file: {file.Name} (ID: {file.Id})");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### From a Stream
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using var fileStream = File.OpenRead("path/to/file.txt");
|
||||||
|
var request = new CreateFileRequest(fileStream, "file.txt", "text/plain");
|
||||||
|
|
||||||
|
var result = await client.CreateFileAsync(request);
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
var file = result.Value;
|
||||||
|
Console.WriteLine($"Created file: {file.Name} (ID: {file.Id})");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### List Files
|
||||||
|
|
||||||
|
You can list files in your account using pagination:
|
||||||
|
|
||||||
|
##### Single Page
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var result = await client.ListFilesAsync();
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
var page = result.Value;
|
||||||
|
Console.WriteLine($"Found {page.Data.Count} files");
|
||||||
|
|
||||||
|
foreach (var file in page.Data)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"- {file.Name} (ID: {file.Id}, Size: {file.Size} bytes)");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (page.HasMore)
|
||||||
|
{
|
||||||
|
Console.WriteLine("More files available...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### With Pagination Options
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var pagingRequest = new PagingRequest(afterId: "file_12345", limit: 10);
|
||||||
|
var result = await client.ListFilesAsync(pagingRequest);
|
||||||
|
```
|
||||||
|
|
||||||
|
##### All Files (Multiple Pages)
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
await foreach (var pageResult in client.ListAllFilesAsync(limit: 20))
|
||||||
|
{
|
||||||
|
if (pageResult.IsSuccess)
|
||||||
|
{
|
||||||
|
var page = pageResult.Value;
|
||||||
|
foreach (var file in page.Data)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"- {file.Name} (ID: {file.Id})");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Get File Information
|
||||||
|
|
||||||
|
Retrieve metadata about a specific file:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var result = await client.GetFileInfoAsync("file_12345");
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
var file = result.Value;
|
||||||
|
Console.WriteLine($"File: {file.Name}");
|
||||||
|
Console.WriteLine($"ID: {file.Id}");
|
||||||
|
Console.WriteLine($"MIME Type: {file.MimeType}");
|
||||||
|
Console.WriteLine($"Size: {file.Size} bytes");
|
||||||
|
Console.WriteLine($"Created: {file.CreatedAt}");
|
||||||
|
Console.WriteLine($"Downloadable: {file.Downloadable}");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Get File Content
|
||||||
|
|
||||||
|
Download the content of a file as a stream:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var result = await client.GetFileAsync("file_12345");
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
using var contentStream = result.Value;
|
||||||
|
using var reader = new StreamReader(contentStream);
|
||||||
|
var content = await reader.ReadToEndAsync();
|
||||||
|
|
||||||
|
Console.WriteLine("File content:");
|
||||||
|
Console.WriteLine(content);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Delete a File
|
||||||
|
|
||||||
|
Remove a file from your account:
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
var result = await client.DeleteFileAsync("file_12345");
|
||||||
|
|
||||||
|
if (result.IsSuccess)
|
||||||
|
{
|
||||||
|
var deleteResponse = result.Value;
|
||||||
|
Console.WriteLine($"Deleted file: {deleteResponse.Id}");
|
||||||
|
Console.WriteLine($"Type: {deleteResponse.Type}");
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> The Files API has certain limitations on file size, supported file types, and usage quotas. Please refer to the [Anthropic API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/files) for the most up-to-date information on these limitations.
|
||||||
|
|
||||||
### Create a message
|
### Create a message
|
||||||
|
|
||||||
The `AnthropicApiClient` exposes a method named `CreateMessageAsync` that can be used to create a message. The method requires a `MessageRequest` or a `StreamMessageRequest` instance as a parameter. The `MessageRequest` class is used to create a message whose response is not streamed and the `StreamMessageRequest` class is used to create a message whose response is streamed. The `MessageRequest` instance's properties can be set to configure how the message is created.
|
The `AnthropicApiClient` exposes a method named `CreateMessageAsync` that can be used to create a message. The method requires a `MessageRequest` or a `StreamMessageRequest` instance as a parameter. The `MessageRequest` class is used to create a message whose response is not streamed and the `StreamMessageRequest` class is used to create a message whose response is streamed. The `MessageRequest` instance's properties can be set to configure how the message is created.
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_CancelMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.CancelMessageBatchAsync(System.String,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_CancelMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.CancelMessageBatchAsync(System.String,System.Threading.CancellationToken)">
|
||||||
CancelMessageBatchAsync(string, CancellationToken)
|
CancelMessageBatchAsync(string, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L276"><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/#L303"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Cancels a message batch asynchronously.</p>
|
<div class="markdown level1 summary"><p>Cancels a message batch asynchronously.</p>
|
||||||
@@ -251,7 +251,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest,System.Threading.CancellationToken)">
|
||||||
CountMessageTokensAsync(CountMessageTokensRequest, CancellationToken)
|
CountMessageTokensAsync(CountMessageTokensRequest, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L324"><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/#L351"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
|
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
|
||||||
@@ -377,7 +377,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageBatchAsync_AnthropicClient_Models_MessageBatchRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageBatchAsync(AnthropicClient.Models.MessageBatchRequest,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageBatchAsync_AnthropicClient_Models_MessageBatchRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageBatchAsync(AnthropicClient.Models.MessageBatchRequest,System.Threading.CancellationToken)">
|
||||||
CreateMessageBatchAsync(MessageBatchRequest, CancellationToken)
|
CreateMessageBatchAsync(MessageBatchRequest, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L244"><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/#L271"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a batch of messages asynchronously.</p>
|
<div class="markdown level1 summary"><p>Creates a batch of messages asynchronously.</p>
|
||||||
@@ -419,7 +419,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_DeleteMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.DeleteMessageBatchAsync(System.String,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_DeleteMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.DeleteMessageBatchAsync(System.String,System.Threading.CancellationToken)">
|
||||||
DeleteMessageBatchAsync(string, CancellationToken)
|
DeleteMessageBatchAsync(string, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L284"><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/#L311"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Deletes a message batch asynchronously.</p>
|
<div class="markdown level1 summary"><p>Deletes a message batch asynchronously.</p>
|
||||||
@@ -461,7 +461,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_GetMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchAsync(System.String,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_GetMessageBatchAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchAsync(System.String,System.Threading.CancellationToken)">
|
||||||
GetMessageBatchAsync(string, CancellationToken)
|
GetMessageBatchAsync(string, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L251"><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/#L278"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets a message batch asynchronously.</p>
|
<div class="markdown level1 summary"><p>Gets a message batch asynchronously.</p>
|
||||||
@@ -503,7 +503,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_GetMessageBatchResultsAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchResultsAsync(System.String,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_GetMessageBatchResultsAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.GetMessageBatchResultsAsync(System.String,System.Threading.CancellationToken)">
|
||||||
GetMessageBatchResultsAsync(string, CancellationToken)
|
GetMessageBatchResultsAsync(string, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L292"><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/#L319"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the results of a message batch asynchronously.</p>
|
<div class="markdown level1 summary"><p>Gets the results of a message batch asynchronously.</p>
|
||||||
@@ -545,7 +545,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_GetModelAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.GetModelAsync(System.String,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_GetModelAsync_System_String_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.GetModelAsync(System.String,System.Threading.CancellationToken)">
|
||||||
GetModelAsync(string, CancellationToken)
|
GetModelAsync(string, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L349"><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/#L376"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets a model by its ID asynchronously.</p>
|
<div class="markdown level1 summary"><p>Gets a model by its ID asynchronously.</p>
|
||||||
@@ -587,7 +587,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_ListAllMessageBatchesAsync_System_Int32_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListAllMessageBatchesAsync(System.Int32,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_ListAllMessageBatchesAsync_System_Int32_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListAllMessageBatchesAsync(System.Int32,System.Threading.CancellationToken)">
|
||||||
ListAllMessageBatchesAsync(int, CancellationToken)
|
ListAllMessageBatchesAsync(int, CancellationToken)
|
||||||
<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/#L294"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Lists all message batches asynchronously.</p>
|
<div class="markdown level1 summary"><p>Lists all message batches asynchronously.</p>
|
||||||
@@ -629,7 +629,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_ListAllModelsAsync_System_Int32_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListAllModelsAsync(System.Int32,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_ListAllModelsAsync_System_Int32_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListAllModelsAsync(System.Int32,System.Threading.CancellationToken)">
|
||||||
ListAllModelsAsync(int, CancellationToken)
|
ListAllModelsAsync(int, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L340"><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/#L367"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Lists all models asynchronously, returning every page of results.</p>
|
<div class="markdown level1 summary"><p>Lists all models asynchronously, returning every page of results.</p>
|
||||||
@@ -671,7 +671,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_ListMessageBatchesAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListMessageBatchesAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_ListMessageBatchesAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListMessageBatchesAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)">
|
||||||
ListMessageBatchesAsync(PagingRequest?, CancellationToken)
|
ListMessageBatchesAsync(PagingRequest?, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L258"><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/#L285"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Lists the message batches asynchronously.</p>
|
<div class="markdown level1 summary"><p>Lists the message batches asynchronously.</p>
|
||||||
@@ -713,7 +713,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_ListModelsAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListModelsAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)">
|
<h3 id="AnthropicClient_AnthropicApiClient_ListModelsAsync_AnthropicClient_Models_PagingRequest_System_Threading_CancellationToken_" data-uid="AnthropicClient.AnthropicApiClient.ListModelsAsync(AnthropicClient.Models.PagingRequest,System.Threading.CancellationToken)">
|
||||||
ListModelsAsync(PagingRequest?, CancellationToken)
|
ListModelsAsync(PagingRequest?, CancellationToken)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L331"><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/#L358"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Lists models asynchronously, returning a single page of results.</p>
|
<div class="markdown level1 summary"><p>Lists models asynchronously, returning a single page of results.</p>
|
||||||
|
|||||||
@@ -0,0 +1,306 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class Base64Source | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class Base64Source | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a base64 source.">
|
||||||
|
<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_Base64Source.md&value=---%0Auid%3A%20AnthropicClient.Models.Base64Source%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.Base64Source">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_Base64Source" data-uid="AnthropicClient.Models.Base64Source" class="text-break">
|
||||||
|
Class Base64Source <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Base64Source.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 a base64 source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class Base64Source : Source</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.Source.html">Source</a></div>
|
||||||
|
<div><span class="xref">Base64Source</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist derived">
|
||||||
|
<dt>Derived</dt>
|
||||||
|
<dd>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.DocumentSource.html">DocumentSource</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.ImageSource.html">ImageSource</a></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type">Source.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_Base64Source__ctor_" data-uid="AnthropicClient.Models.Base64Source.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Base64Source__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.Base64Source.#ctor(System.String,System.String)">
|
||||||
|
Base64Source(string, string)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Base64Source.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.Base64Source.html">Base64Source</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public Base64Source(string mediaType, string data)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>mediaType</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The media type of the source.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>data</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The data of the source.</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 the media type is invalid.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
<dd><p>Thrown when the media type or data is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Base64Source_Data_" data-uid="AnthropicClient.Models.Base64Source.Data*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Base64Source_Data" data-uid="AnthropicClient.Models.Base64Source.Data">
|
||||||
|
Data
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Base64Source.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the data of the source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public string Data { 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_Base64Source_MediaType_" data-uid="AnthropicClient.Models.Base64Source.MediaType*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Base64Source_MediaType" data-uid="AnthropicClient.Models.Base64Source.MediaType">
|
||||||
|
MediaType
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Base64Source.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the media type of the source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("media_type")]
|
||||||
|
public string MediaType { 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/Base64Source.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,291 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CharacterLocationCitation | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CharacterLocationCitation | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a citation for specific locations within text content.">
|
||||||
|
<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_CharacterLocationCitation.md&value=---%0Auid%3A%20AnthropicClient.Models.CharacterLocationCitation%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.CharacterLocationCitation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CharacterLocationCitation" data-uid="AnthropicClient.Models.CharacterLocationCitation" class="text-break">
|
||||||
|
Class CharacterLocationCitation <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CharacterLocationCitation.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 citation for specific locations within text content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class CharacterLocationCitation : Citation</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.Citation.html">Citation</a></div>
|
||||||
|
<div><span class="xref">CharacterLocationCitation</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_Type">Citation.Type</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_CitedText">Citation.CitedText</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentIndex">Citation.DocumentIndex</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentTitle">Citation.DocumentTitle</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_CharacterLocationCitation__ctor_" data-uid="AnthropicClient.Models.CharacterLocationCitation.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CharacterLocationCitation__ctor" data-uid="AnthropicClient.Models.CharacterLocationCitation.#ctor">
|
||||||
|
CharacterLocationCitation()
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CharacterLocationCitation.cs/#L26"><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.CharacterLocationCitation.html">CharacterLocationCitation</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public CharacterLocationCitation()</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CharacterLocationCitation_EndCharIndex_" data-uid="AnthropicClient.Models.CharacterLocationCitation.EndCharIndex*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CharacterLocationCitation_EndCharIndex" data-uid="AnthropicClient.Models.CharacterLocationCitation.EndCharIndex">
|
||||||
|
EndCharIndex
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CharacterLocationCitation.cs/#L19"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the end character index of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("end_char_index")]
|
||||||
|
public int EndCharIndex { 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_CharacterLocationCitation_StartCharIndex_" data-uid="AnthropicClient.Models.CharacterLocationCitation.StartCharIndex*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CharacterLocationCitation_StartCharIndex" data-uid="AnthropicClient.Models.CharacterLocationCitation.StartCharIndex">
|
||||||
|
StartCharIndex
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CharacterLocationCitation.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the start character index of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("start_char_index")]
|
||||||
|
public int StartCharIndex { 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/CharacterLocationCitation.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,357 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class Citation | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class Citation | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a citation">
|
||||||
|
<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_Citation.md&value=---%0Auid%3A%20AnthropicClient.Models.Citation%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.Citation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_Citation" data-uid="AnthropicClient.Models.Citation" class="text-break">
|
||||||
|
Class Citation <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Citation.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 citation</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public abstract class Citation</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">Citation</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist derived">
|
||||||
|
<dt>Derived</dt>
|
||||||
|
<dd>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.CharacterLocationCitation.html">CharacterLocationCitation</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.ContentBlockLocationCitation.html">ContentBlockLocationCitation</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.PageLocationCitation.html">PageLocationCitation</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_Citation__ctor_" data-uid="AnthropicClient.Models.Citation.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Citation__ctor_System_String_" data-uid="AnthropicClient.Models.Citation.#ctor(System.String)">
|
||||||
|
Citation(string)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Citation.cs/#L38"><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.Citation.html">Citation</a> class with a specified type.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">protected Citation(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 citation.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Citation_CitedText_" data-uid="AnthropicClient.Models.Citation.CitedText*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Citation_CitedText" data-uid="AnthropicClient.Models.Citation.CitedText">
|
||||||
|
CitedText
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Citation.cs/#L18"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the text that is cited.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("cited_text")]
|
||||||
|
public string CitedText { 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_Citation_DocumentIndex_" data-uid="AnthropicClient.Models.Citation.DocumentIndex*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Citation_DocumentIndex" data-uid="AnthropicClient.Models.Citation.DocumentIndex">
|
||||||
|
DocumentIndex
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Citation.cs/#L24"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the document index of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("document_index")]
|
||||||
|
public int DocumentIndex { 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_Citation_DocumentTitle_" data-uid="AnthropicClient.Models.Citation.DocumentTitle*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Citation_DocumentTitle" data-uid="AnthropicClient.Models.Citation.DocumentTitle">
|
||||||
|
DocumentTitle
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Citation.cs/#L30"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the title of the document from which the citation is made.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("document_title")]
|
||||||
|
public string DocumentTitle { 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_Citation_Type_" data-uid="AnthropicClient.Models.Citation.Type*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Citation_Type" data-uid="AnthropicClient.Models.Citation.Type">
|
||||||
|
Type
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Citation.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the type of the citation.</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/Citation.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,260 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CitationDelta | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CitationDelta | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a citation delta.">
|
||||||
|
<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_CitationDelta.md&value=---%0Auid%3A%20AnthropicClient.Models.CitationDelta%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.CitationDelta">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CitationDelta" data-uid="AnthropicClient.Models.CitationDelta" class="text-break">
|
||||||
|
Class CitationDelta <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationDelta.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 a citation delta.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class CitationDelta : ContentDelta</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.ContentDelta.html">ContentDelta</a></div>
|
||||||
|
<div><span class="xref">CitationDelta</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.ContentDelta.html#AnthropicClient_Models_ContentDelta_Type">ContentDelta.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_CitationDelta__ctor_" data-uid="AnthropicClient.Models.CitationDelta.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CitationDelta__ctor_AnthropicClient_Models_Citation_" data-uid="AnthropicClient.Models.CitationDelta.#ctor(AnthropicClient.Models.Citation)">
|
||||||
|
CitationDelta(Citation)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationDelta.cs/#L28"><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.CitationDelta.html">CitationDelta</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public CitationDelta(Citation citation)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>citation</code> <a class="xref" href="AnthropicClient.Models.Citation.html">Citation</a></dt>
|
||||||
|
<dd><p>The citation to associate with this delta.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Exceptions</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
<dd><p>Thrown when <code class="paramref">citation</code> is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CitationDelta_Citation_" data-uid="AnthropicClient.Models.CitationDelta.Citation*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CitationDelta_Citation" data-uid="AnthropicClient.Models.CitationDelta.Citation">
|
||||||
|
Citation
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationDelta.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the citation associated with this delta.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public Citation Citation { get; init; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.Citation.html">Citation</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/CitationDelta.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,213 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CitationOption | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CitationOption | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents whether citations are enabled for a document.">
|
||||||
|
<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_CitationOption.md&value=---%0Auid%3A%20AnthropicClient.Models.CitationOption%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.CitationOption">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CitationOption" data-uid="AnthropicClient.Models.CitationOption" class="text-break">
|
||||||
|
Class CitationOption <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationOption.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 whether citations are enabled for a document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class CitationOption</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">CitationOption</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_CitationOption_Enabled_" data-uid="AnthropicClient.Models.CitationOption.Enabled*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CitationOption_Enabled" data-uid="AnthropicClient.Models.CitationOption.Enabled">
|
||||||
|
Enabled
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationOption.cs/#L11"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets a value indicating whether citations are enabled for the document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public bool Enabled { 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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<div class="contribution d-print-none">
|
||||||
|
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationOption.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 CitationType | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CitationType | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="The types of citations that can be returned by the Anthropic API.">
|
||||||
|
<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_CitationType.md&value=---%0Auid%3A%20AnthropicClient.Models.CitationType%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.CitationType">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CitationType" data-uid="AnthropicClient.Models.CitationType" class="text-break">
|
||||||
|
Class CitationType <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationType.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>The types of citations that can be returned by the Anthropic API.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public static class CitationType</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">CitationType</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_CitationType_CharacterLocation" data-uid="AnthropicClient.Models.CitationType.CharacterLocation">
|
||||||
|
CharacterLocation
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationType.cs/#L11"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>A citation that refers to a specific character in the text.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string CharacterLocation = "char_location"</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_CitationType_ContentBlockLocation" data-uid="AnthropicClient.Models.CitationType.ContentBlockLocation">
|
||||||
|
ContentBlockLocation
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationType.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>A citation that refers to a specific section in the text.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string ContentBlockLocation = "content_block_location"</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_CitationType_PageLocation" data-uid="AnthropicClient.Models.CitationType.PageLocation">
|
||||||
|
PageLocation
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CitationType.cs/#L16"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>A citation that refers to a specific page in the text.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string PageLocation = "page_location"</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/CitationType.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,291 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class ContentBlockLocationCitation | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class ContentBlockLocationCitation | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a citation for content blocks within custom content.">
|
||||||
|
<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_ContentBlockLocationCitation.md&value=---%0Auid%3A%20AnthropicClient.Models.ContentBlockLocationCitation%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.ContentBlockLocationCitation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_ContentBlockLocationCitation" data-uid="AnthropicClient.Models.ContentBlockLocationCitation" class="text-break">
|
||||||
|
Class ContentBlockLocationCitation <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentBlockLocationCitation.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 citation for content blocks within custom content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class ContentBlockLocationCitation : Citation</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.Citation.html">Citation</a></div>
|
||||||
|
<div><span class="xref">ContentBlockLocationCitation</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_Type">Citation.Type</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_CitedText">Citation.CitedText</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentIndex">Citation.DocumentIndex</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentTitle">Citation.DocumentTitle</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_ContentBlockLocationCitation__ctor_" data-uid="AnthropicClient.Models.ContentBlockLocationCitation.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ContentBlockLocationCitation__ctor" data-uid="AnthropicClient.Models.ContentBlockLocationCitation.#ctor">
|
||||||
|
ContentBlockLocationCitation()
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentBlockLocationCitation.cs/#L26"><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.ContentBlockLocationCitation.html">ContentBlockLocationCitation</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public ContentBlockLocationCitation()</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_ContentBlockLocationCitation_EndBlockIndex_" data-uid="AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ContentBlockLocationCitation_EndBlockIndex" data-uid="AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex">
|
||||||
|
EndBlockIndex
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentBlockLocationCitation.cs/#L19"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the end block index of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("end_block_index")]
|
||||||
|
public int EndBlockIndex { 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_ContentBlockLocationCitation_StartBlockIndex_" data-uid="AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ContentBlockLocationCitation_StartBlockIndex" data-uid="AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex">
|
||||||
|
StartBlockIndex
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentBlockLocationCitation.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the start block index of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("start_block_index")]
|
||||||
|
public int StartBlockIndex { 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/ContentBlockLocationCitation.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>
|
||||||
@@ -120,6 +120,7 @@ Class ContentDelta <a class="header-action link-secondary" title="View source"
|
|||||||
<dl class="typelist derived">
|
<dl class="typelist derived">
|
||||||
<dt>Derived</dt>
|
<dt>Derived</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.CitationDelta.html">CitationDelta</a></div>
|
||||||
<div><a class="xref" href="AnthropicClient.Models.JsonDelta.html">JsonDelta</a></div>
|
<div><a class="xref" href="AnthropicClient.Models.JsonDelta.html">JsonDelta</a></div>
|
||||||
<div><a class="xref" href="AnthropicClient.Models.TextDelta.html">TextDelta</a></div>
|
<div><a class="xref" href="AnthropicClient.Models.TextDelta.html">TextDelta</a></div>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -154,6 +154,37 @@ Class ContentDeltaType <a class="header-action link-secondary" title="View sour
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ContentDeltaType_CitationDelta" data-uid="AnthropicClient.Models.ContentDeltaType.CitationDelta">
|
||||||
|
CitationDelta
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentDeltaType.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The citation_delta.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string CitationDelta = "citations_delta"</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_ContentDeltaType_JsonDelta" data-uid="AnthropicClient.Models.ContentDeltaType.JsonDelta">
|
<h3 id="AnthropicClient_Models_ContentDeltaType_JsonDelta" data-uid="AnthropicClient.Models.ContentDeltaType.JsonDelta">
|
||||||
JsonDelta
|
JsonDelta
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentDeltaType.cs/#L16"><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/Models/ContentDeltaType.cs/#L16"><i class="bi bi-code-slash"></i></a>
|
||||||
|
|||||||
@@ -0,0 +1,259 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CustomSource | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CustomSource | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a custom source that contains a list of text content.">
|
||||||
|
<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_CustomSource.md&value=---%0Auid%3A%20AnthropicClient.Models.CustomSource%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.CustomSource">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CustomSource" data-uid="AnthropicClient.Models.CustomSource" class="text-break">
|
||||||
|
Class CustomSource <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CustomSource.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 a custom source that contains a list of text content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class CustomSource : Source</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.Source.html">Source</a></div>
|
||||||
|
<div><span class="xref">CustomSource</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type">Source.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_CustomSource__ctor_" data-uid="AnthropicClient.Models.CustomSource.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CustomSource__ctor_System_Collections_Generic_List_AnthropicClient_Models_TextContent__" data-uid="AnthropicClient.Models.CustomSource.#ctor(System.Collections.Generic.List{AnthropicClient.Models.TextContent})">
|
||||||
|
CustomSource(List<TextContent>)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CustomSource.cs/#L27"><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.CustomSource.html">CustomSource</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public CustomSource(List<TextContent> content)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>content</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a>></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Exceptions</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
<dd><p>Thrown when the content is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CustomSource_Content_" data-uid="AnthropicClient.Models.CustomSource.Content*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CustomSource_Content" data-uid="AnthropicClient.Models.CustomSource.Content">
|
||||||
|
Content
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CustomSource.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the list of text content that makes up the custom source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public List<TextContent> Content { 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><<a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</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/CustomSource.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>
|
||||||
@@ -160,11 +160,92 @@ Class DocumentContent <a class="header-action link-secondary" title="View sourc
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentContent__ctor_" data-uid="AnthropicClient.Models.DocumentContent.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_DocumentContent__ctor_AnthropicClient_Models_Source_" data-uid="AnthropicClient.Models.DocumentContent.#ctor(AnthropicClient.Models.Source)">
|
||||||
|
DocumentContent(Source)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L78"><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.DocumentContent.html">DocumentContent</a> class with a document source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public DocumentContent(Source source)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>source</code> <a class="xref" href="AnthropicClient.Models.Source.html">Source</a></dt>
|
||||||
|
<dd><p>The document source.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Exceptions</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
<dd><p>Thrown when the source is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentContent__ctor_" data-uid="AnthropicClient.Models.DocumentContent.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_DocumentContent__ctor_AnthropicClient_Models_Source_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.DocumentContent.#ctor(AnthropicClient.Models.Source,AnthropicClient.Models.CacheControl)">
|
||||||
|
DocumentContent(Source, CacheControl)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L92"><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.DocumentContent.html">DocumentContent</a> class with a document source and cache control.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public DocumentContent(Source source, CacheControl cacheControl)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>source</code> <a class="xref" href="AnthropicClient.Models.Source.html">Source</a></dt>
|
||||||
|
<dd><p>The document source.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>cacheControl</code> <a class="xref" href="AnthropicClient.Models.CacheControl.html">CacheControl</a></dt>
|
||||||
|
<dd><p>The cache control to be used for the content.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Exceptions</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
<dd><p>Thrown when the source is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_DocumentContent__ctor_" data-uid="AnthropicClient.Models.DocumentContent.#ctor*"></a>
|
<a id="AnthropicClient_Models_DocumentContent__ctor_" data-uid="AnthropicClient.Models.DocumentContent.#ctor*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentContent__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.DocumentContent.#ctor(System.String,System.String)">
|
<h3 id="AnthropicClient_Models_DocumentContent__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.DocumentContent.#ctor(System.String,System.String)">
|
||||||
DocumentContent(string, string)
|
DocumentContent(string, string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.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/Models/DocumentContent.cs/#L50"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.DocumentContent.html">DocumentContent</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.DocumentContent.html">DocumentContent</a> class.</p>
|
||||||
@@ -206,7 +287,7 @@ Class DocumentContent <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentContent__ctor_System_String_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.DocumentContent.#ctor(System.String,System.String,AnthropicClient.Models.CacheControl)">
|
<h3 id="AnthropicClient_Models_DocumentContent__ctor_System_String_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.DocumentContent.#ctor(System.String,System.String,AnthropicClient.Models.CacheControl)">
|
||||||
DocumentContent(string, string, CacheControl)
|
DocumentContent(string, string, CacheControl)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L50"><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/Models/DocumentContent.cs/#L65"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.DocumentContent.html">DocumentContent</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.DocumentContent.html">DocumentContent</a> class.</p>
|
||||||
@@ -251,6 +332,70 @@ Class DocumentContent <a class="header-action link-secondary" title="View sourc
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentContent_Citations_" data-uid="AnthropicClient.Models.DocumentContent.Citations*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_DocumentContent_Citations" data-uid="AnthropicClient.Models.DocumentContent.Citations">
|
||||||
|
Citations
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L30"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets whether citations are enabled for the document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public CitationOption? Citations { get; init; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CitationOption.html">CitationOption</a></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentContent_Context_" data-uid="AnthropicClient.Models.DocumentContent.Context*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_DocumentContent_Context" data-uid="AnthropicClient.Models.DocumentContent.Context">
|
||||||
|
Context
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L25"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the context of the document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public string? Context { 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_DocumentContent_Source_" data-uid="AnthropicClient.Models.DocumentContent.Source*"></a>
|
<a id="AnthropicClient_Models_DocumentContent_Source_" data-uid="AnthropicClient.Models.DocumentContent.Source*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentContent_Source" data-uid="AnthropicClient.Models.DocumentContent.Source">
|
<h3 id="AnthropicClient_Models_DocumentContent_Source" data-uid="AnthropicClient.Models.DocumentContent.Source">
|
||||||
@@ -263,7 +408,7 @@ Class DocumentContent <a class="header-action link-secondary" title="View sourc
|
|||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
<div class="codewrapper">
|
<div class="codewrapper">
|
||||||
<pre><code class="lang-csharp hljs">public DocumentSource Source { get; init; }</code></pre>
|
<pre><code class="lang-csharp hljs">public Source Source { get; init; }</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -272,7 +417,39 @@ Class DocumentContent <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
<h4 class="section">Property Value</h4>
|
<h4 class="section">Property Value</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.DocumentSource.html">DocumentSource</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.Source.html">Source</a></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentContent_Title_" data-uid="AnthropicClient.Models.DocumentContent.Title*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_DocumentContent_Title" data-uid="AnthropicClient.Models.DocumentContent.Title">
|
||||||
|
Title
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L20"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the title of the document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public string? Title { 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>
|
<dd></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Class DocumentSource <a class="header-action link-secondary" title="View source
|
|||||||
<div class="markdown conceptual"></div>
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
<div class="codewrapper">
|
<div class="codewrapper">
|
||||||
<pre><code class="lang-csharp hljs">public class DocumentSource</code></pre>
|
<pre><code class="lang-csharp hljs">public class DocumentSource : Base64Source</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -112,6 +112,8 @@ Class DocumentSource <a class="header-action link-secondary" title="View source
|
|||||||
<dt>Inheritance</dt>
|
<dt>Inheritance</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.Source.html">Source</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.Base64Source.html">Base64Source</a></div>
|
||||||
<div><span class="xref">DocumentSource</span></div>
|
<div><span class="xref">DocumentSource</span></div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -121,6 +123,15 @@ Class DocumentSource <a class="header-action link-secondary" title="View source
|
|||||||
<dl class="typelist inheritedMembers">
|
<dl class="typelist inheritedMembers">
|
||||||
<dt>Inherited Members</dt>
|
<dt>Inherited Members</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_MediaType">Base64Source.MediaType</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_Data">Base64Source.Data</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type">Source.Type</a>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -157,7 +168,7 @@ Class DocumentSource <a class="header-action link-secondary" title="View source
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentSource__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.DocumentSource.#ctor(System.String,System.String)">
|
<h3 id="AnthropicClient_Models_DocumentSource__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.DocumentSource.#ctor(System.String,System.String)">
|
||||||
DocumentSource(string, string)
|
DocumentSource(string, string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentSource.cs/#L41"><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/Models/DocumentSource.cs/#L25"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.DocumentSource.html">DocumentSource</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.DocumentSource.html">DocumentSource</a> class.</p>
|
||||||
@@ -198,107 +209,6 @@ Class DocumentSource <a class="header-action link-secondary" title="View source
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section" id="properties">Properties
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_DocumentSource_Data_" data-uid="AnthropicClient.Models.DocumentSource.Data*"></a>
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentSource_Data" data-uid="AnthropicClient.Models.DocumentSource.Data">
|
|
||||||
Data
|
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentSource.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the data of the document.</p>
|
|
||||||
</div>
|
|
||||||
<div class="markdown level1 conceptual"></div>
|
|
||||||
|
|
||||||
<div class="codewrapper">
|
|
||||||
<pre><code class="lang-csharp hljs">public string Data { 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_DocumentSource_MediaType_" data-uid="AnthropicClient.Models.DocumentSource.MediaType*"></a>
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentSource_MediaType" data-uid="AnthropicClient.Models.DocumentSource.MediaType">
|
|
||||||
MediaType
|
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentSource.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the media type of the document.</p>
|
|
||||||
</div>
|
|
||||||
<div class="markdown level1 conceptual"></div>
|
|
||||||
|
|
||||||
<div class="codewrapper">
|
|
||||||
<pre><code class="lang-csharp hljs">[JsonPropertyName("media_type")]
|
|
||||||
public string MediaType { 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_DocumentSource_Type_" data-uid="AnthropicClient.Models.DocumentSource.Type*"></a>
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_DocumentSource_Type" data-uid="AnthropicClient.Models.DocumentSource.Type">
|
|
||||||
Type
|
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentSource.cs/#L26"><i class="bi bi-code-slash"></i></a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the type of encoding of the document data.</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>
|
</article>
|
||||||
|
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ Class ImageContent <a class="header-action link-secondary" title="View source"
|
|||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
<div class="codewrapper">
|
<div class="codewrapper">
|
||||||
<pre><code class="lang-csharp hljs">public ImageSource Source { get; init; }</code></pre>
|
<pre><code class="lang-csharp hljs">public Source Source { get; init; }</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ Class ImageContent <a class="header-action link-secondary" title="View source"
|
|||||||
|
|
||||||
<h4 class="section">Property Value</h4>
|
<h4 class="section">Property Value</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.ImageSource.html">ImageSource</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.Source.html">Source</a></dt>
|
||||||
<dd></dd>
|
<dd></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Class ImageSource <a class="header-action link-secondary" title="View source" h
|
|||||||
<div class="markdown conceptual"></div>
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
<div class="codewrapper">
|
<div class="codewrapper">
|
||||||
<pre><code class="lang-csharp hljs">public class ImageSource</code></pre>
|
<pre><code class="lang-csharp hljs">public class ImageSource : Base64Source</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -112,6 +112,8 @@ Class ImageSource <a class="header-action link-secondary" title="View source" h
|
|||||||
<dt>Inheritance</dt>
|
<dt>Inheritance</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.Source.html">Source</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.Base64Source.html">Base64Source</a></div>
|
||||||
<div><span class="xref">ImageSource</span></div>
|
<div><span class="xref">ImageSource</span></div>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -121,6 +123,15 @@ Class ImageSource <a class="header-action link-secondary" title="View source" h
|
|||||||
<dl class="typelist inheritedMembers">
|
<dl class="typelist inheritedMembers">
|
||||||
<dt>Inherited Members</dt>
|
<dt>Inherited Members</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_MediaType">Base64Source.MediaType</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_Data">Base64Source.Data</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type">Source.Type</a>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -157,7 +168,7 @@ Class ImageSource <a class="header-action link-secondary" title="View source" h
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_ImageSource__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.ImageSource.#ctor(System.String,System.String)">
|
<h3 id="AnthropicClient_Models_ImageSource__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.ImageSource.#ctor(System.String,System.String)">
|
||||||
ImageSource(string, string)
|
ImageSource(string, string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ImageSource.cs/#L41"><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/Models/ImageSource.cs/#L25"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.ImageSource.html">ImageSource</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.ImageSource.html">ImageSource</a> class.</p>
|
||||||
@@ -198,107 +209,6 @@ Class ImageSource <a class="header-action link-secondary" title="View source" h
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section" id="properties">Properties
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_ImageSource_Data_" data-uid="AnthropicClient.Models.ImageSource.Data*"></a>
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_ImageSource_Data" data-uid="AnthropicClient.Models.ImageSource.Data">
|
|
||||||
Data
|
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ImageSource.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the data of the image.</p>
|
|
||||||
</div>
|
|
||||||
<div class="markdown level1 conceptual"></div>
|
|
||||||
|
|
||||||
<div class="codewrapper">
|
|
||||||
<pre><code class="lang-csharp hljs">public string Data { 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_ImageSource_MediaType_" data-uid="AnthropicClient.Models.ImageSource.MediaType*"></a>
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_ImageSource_MediaType" data-uid="AnthropicClient.Models.ImageSource.MediaType">
|
|
||||||
MediaType
|
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ImageSource.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the media type of the image.</p>
|
|
||||||
</div>
|
|
||||||
<div class="markdown level1 conceptual"></div>
|
|
||||||
|
|
||||||
<div class="codewrapper">
|
|
||||||
<pre><code class="lang-csharp hljs">[JsonPropertyName("media_type")]
|
|
||||||
public string MediaType { 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_ImageSource_Type_" data-uid="AnthropicClient.Models.ImageSource.Type*"></a>
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_ImageSource_Type" data-uid="AnthropicClient.Models.ImageSource.Type">
|
|
||||||
Type
|
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ImageSource.cs/#L26"><i class="bi bi-code-slash"></i></a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the type of encoding of the image data.</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>
|
</article>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,291 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class PageLocationCitation | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class PageLocationCitation | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a citation for text within a page of a document.">
|
||||||
|
<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_PageLocationCitation.md&value=---%0Auid%3A%20AnthropicClient.Models.PageLocationCitation%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.PageLocationCitation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_PageLocationCitation" data-uid="AnthropicClient.Models.PageLocationCitation" class="text-break">
|
||||||
|
Class PageLocationCitation <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PageLocationCitation.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 citation for text within a page of a document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class PageLocationCitation : Citation</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.Citation.html">Citation</a></div>
|
||||||
|
<div><span class="xref">PageLocationCitation</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_Type">Citation.Type</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_CitedText">Citation.CitedText</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentIndex">Citation.DocumentIndex</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentTitle">Citation.DocumentTitle</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_PageLocationCitation__ctor_" data-uid="AnthropicClient.Models.PageLocationCitation.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_PageLocationCitation__ctor" data-uid="AnthropicClient.Models.PageLocationCitation.#ctor">
|
||||||
|
PageLocationCitation()
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PageLocationCitation.cs/#L26"><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.PageLocationCitation.html">PageLocationCitation</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public PageLocationCitation()</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_PageLocationCitation_EndPageNumber_" data-uid="AnthropicClient.Models.PageLocationCitation.EndPageNumber*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_PageLocationCitation_EndPageNumber" data-uid="AnthropicClient.Models.PageLocationCitation.EndPageNumber">
|
||||||
|
EndPageNumber
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PageLocationCitation.cs/#L19"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the end page number of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("end_page_number")]
|
||||||
|
public int EndPageNumber { 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_PageLocationCitation_StartPageNumber_" data-uid="AnthropicClient.Models.PageLocationCitation.StartPageNumber*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_PageLocationCitation_StartPageNumber" data-uid="AnthropicClient.Models.PageLocationCitation.StartPageNumber">
|
||||||
|
StartPageNumber
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/PageLocationCitation.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the start page number of the citation.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("start_page_number")]
|
||||||
|
public int StartPageNumber { 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/PageLocationCitation.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,258 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class Source | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class Source | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a base class for sources.">
|
||||||
|
<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_Source.md&value=---%0Auid%3A%20AnthropicClient.Models.Source%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.Source">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_Source" data-uid="AnthropicClient.Models.Source" class="text-break">
|
||||||
|
Class Source <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Source.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 base class for sources.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public abstract class Source</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">Source</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist derived">
|
||||||
|
<dt>Derived</dt>
|
||||||
|
<dd>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.Base64Source.html">Base64Source</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.CustomSource.html">CustomSource</a></div>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.TextSource.html">TextSource</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_Source__ctor_" data-uid="AnthropicClient.Models.Source.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Source__ctor_System_String_" data-uid="AnthropicClient.Models.Source.#ctor(System.String)">
|
||||||
|
Source(string)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Source.cs/#L18"><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.Source.html">Source</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">protected Source(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 source.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Source_Type_" data-uid="AnthropicClient.Models.Source.Type*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Source_Type" data-uid="AnthropicClient.Models.Source.Type">
|
||||||
|
Type
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Source.cs/#L11"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the type of the source.</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/Source.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 SourceType | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class SourceType | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents the types of document sources that can be used in the Anthropic API.">
|
||||||
|
<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_SourceType.md&value=---%0Auid%3A%20AnthropicClient.Models.SourceType%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.SourceType">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_SourceType" data-uid="AnthropicClient.Models.SourceType" class="text-break">
|
||||||
|
Class SourceType <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SourceType.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 document sources that can be used in the Anthropic API.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public static class SourceType</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">SourceType</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_SourceType_Base64" data-uid="AnthropicClient.Models.SourceType.Base64">
|
||||||
|
Base64
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SourceType.cs/#L11"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The base64 encoded document source type.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Base64 = "base64"</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_SourceType_Content" data-uid="AnthropicClient.Models.SourceType.Content">
|
||||||
|
Content
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SourceType.cs/#L16"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The custom content document source type.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Content = "content"</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_SourceType_Text" data-uid="AnthropicClient.Models.SourceType.Text">
|
||||||
|
Text
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/SourceType.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The text document source type.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Text = "text"</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/SourceType.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>
|
||||||
@@ -164,7 +164,7 @@ Class TextContent <a class="header-action link-secondary" title="View source" h
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_TextContent__ctor_System_String_" data-uid="AnthropicClient.Models.TextContent.#ctor(System.String)">
|
<h3 id="AnthropicClient_Models_TextContent__ctor_System_String_" data-uid="AnthropicClient.Models.TextContent.#ctor(System.String)">
|
||||||
TextContent(string)
|
TextContent(string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextContent.cs/#L33"><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/Models/TextContent.cs/#L38"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a> class.</p>
|
||||||
@@ -203,7 +203,7 @@ Class TextContent <a class="header-action link-secondary" title="View source" h
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_TextContent__ctor_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.TextContent.#ctor(System.String,AnthropicClient.Models.CacheControl)">
|
<h3 id="AnthropicClient_Models_TextContent__ctor_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.TextContent.#ctor(System.String,AnthropicClient.Models.CacheControl)">
|
||||||
TextContent(string, CacheControl)
|
TextContent(string, CacheControl)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextContent.cs/#L47"><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/Models/TextContent.cs/#L52"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a> class.</p>
|
||||||
@@ -245,6 +245,38 @@ Class TextContent <a class="header-action link-secondary" title="View source" h
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_TextContent_Citations_" data-uid="AnthropicClient.Models.TextContent.Citations*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_TextContent_Citations" data-uid="AnthropicClient.Models.TextContent.Citations">
|
||||||
|
Citations
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextContent.cs/#L20"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the citations associated with the text content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public Citation[]? Citations { get; init; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.Citation.html">Citation</a>[]</dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_TextContent_Text_" data-uid="AnthropicClient.Models.TextContent.Text*"></a>
|
<a id="AnthropicClient_Models_TextContent_Text_" data-uid="AnthropicClient.Models.TextContent.Text*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_TextContent_Text" data-uid="AnthropicClient.Models.TextContent.Text">
|
<h3 id="AnthropicClient_Models_TextContent_Text" data-uid="AnthropicClient.Models.TextContent.Text">
|
||||||
|
|||||||
@@ -0,0 +1,293 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class TextSource | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class TextSource | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a text document source.">
|
||||||
|
<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_TextSource.md&value=---%0Auid%3A%20AnthropicClient.Models.TextSource%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%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 "{query}"">
|
||||||
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||||||
|
<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.TextSource">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_TextSource" data-uid="AnthropicClient.Models.TextSource" class="text-break">
|
||||||
|
Class TextSource <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextSource.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 text document source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class TextSource : Source</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.Source.html">Source</a></div>
|
||||||
|
<div><span class="xref">TextSource</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type">Source.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_TextSource__ctor_" data-uid="AnthropicClient.Models.TextSource.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_TextSource__ctor_System_String_" data-uid="AnthropicClient.Models.TextSource.#ctor(System.String)">
|
||||||
|
TextSource(string)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextSource.cs/#L27"><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.TextSource.html">TextSource</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public TextSource(string data)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>data</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The data of the document.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Exceptions</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
<dd><p>Thrown when the data is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_TextSource_Data_" data-uid="AnthropicClient.Models.TextSource.Data*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_TextSource_Data" data-uid="AnthropicClient.Models.TextSource.Data">
|
||||||
|
Data
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextSource.cs/#L19"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the data of the source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public string Data { 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_TextSource_MediaType_" data-uid="AnthropicClient.Models.TextSource.MediaType*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_TextSource_MediaType" data-uid="AnthropicClient.Models.TextSource.MediaType">
|
||||||
|
MediaType
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextSource.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the media type of the source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("media_type")]
|
||||||
|
public string MediaType { get; }</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/TextSource.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>
|
||||||
@@ -142,6 +142,11 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.AutoToolChoice.html">AutoToolChoice</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.AutoToolChoice.html">AutoToolChoice</a></dt>
|
||||||
<dd><p>Represents the auto tool choice mode.</p>
|
<dd><p>Represents the auto tool choice mode.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.Base64Source.html">Base64Source</a></dt>
|
||||||
|
<dd><p>Represents a base64 source.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -162,11 +167,41 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.CanceledMessageBatchResult.html">CanceledMessageBatchResult</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.CanceledMessageBatchResult.html">CanceledMessageBatchResult</a></dt>
|
||||||
<dd><p>Represents a message batch result that was cancelled.</p>
|
<dd><p>Represents a message batch result that was cancelled.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CharacterLocationCitation.html">CharacterLocationCitation</a></dt>
|
||||||
|
<dd><p>Represents a citation for specific locations within text content.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.Citation.html">Citation</a></dt>
|
||||||
|
<dd><p>Represents a citation</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CitationDelta.html">CitationDelta</a></dt>
|
||||||
|
<dd><p>Represents a citation delta.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CitationOption.html">CitationOption</a></dt>
|
||||||
|
<dd><p>Represents whether citations are enabled for a document.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CitationType.html">CitationType</a></dt>
|
||||||
|
<dd><p>The types of citations that can be returned by the Anthropic API.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.Content.html">Content</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.Content.html">Content</a></dt>
|
||||||
<dd><p>Represents part of the content of a message.</p>
|
<dd><p>Represents part of the content of a message.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.ContentBlockLocationCitation.html">ContentBlockLocationCitation</a></dt>
|
||||||
|
<dd><p>Represents a citation for content blocks within custom content.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -202,6 +237,11 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.CountMessageTokensRequest.html">CountMessageTokensRequest</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.CountMessageTokensRequest.html">CountMessageTokensRequest</a></dt>
|
||||||
<dd><p>Represents a request to count the number of tokens in a message.</p>
|
<dd><p>Represents a request to count the number of tokens in a message.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CustomSource.html">CustomSource</a></dt>
|
||||||
|
<dd><p>Represents a custom source that contains a list of text content.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -402,6 +442,11 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.Page.html">Page</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.Page.html">Page</a></dt>
|
||||||
<dd><p>Represents a page.</p>
|
<dd><p>Represents a page.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.PageLocationCitation.html">PageLocationCitation</a></dt>
|
||||||
|
<dd><p>Represents a citation for text within a page of a document.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -427,6 +472,16 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.RateLimitError.html">RateLimitError</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.RateLimitError.html">RateLimitError</a></dt>
|
||||||
<dd><p>Represents a rate_limit error.</p>
|
<dd><p>Represents a rate_limit error.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.Source.html">Source</a></dt>
|
||||||
|
<dd><p>Represents a base class for sources.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.SourceType.html">SourceType</a></dt>
|
||||||
|
<dd><p>Represents the types of document sources that can be used in the Anthropic API.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -457,6 +512,11 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.TextDelta.html">TextDelta</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.TextDelta.html">TextDelta</a></dt>
|
||||||
<dd><p>Represents a text delta.</p>
|
<dd><p>Represents a text delta.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.TextSource.html">TextSource</a></dt>
|
||||||
|
<dd><p>Represents a text document source.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
|
|||||||
@@ -60,6 +60,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.AutoToolChoice.html" name="" title="AutoToolChoice">AutoToolChoice</a>
|
<a href="AnthropicClient.Models.AutoToolChoice.html" name="" title="AutoToolChoice">AutoToolChoice</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.Base64Source.html" name="" title="Base64Source">Base64Source</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.BaseMessageRequest.html" name="" title="BaseMessageRequest">BaseMessageRequest</a>
|
<a href="AnthropicClient.Models.BaseMessageRequest.html" name="" title="BaseMessageRequest">BaseMessageRequest</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -72,9 +75,27 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.CanceledMessageBatchResult.html" name="" title="CanceledMessageBatchResult">CanceledMessageBatchResult</a>
|
<a href="AnthropicClient.Models.CanceledMessageBatchResult.html" name="" title="CanceledMessageBatchResult">CanceledMessageBatchResult</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CharacterLocationCitation.html" name="" title="CharacterLocationCitation">CharacterLocationCitation</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.Citation.html" name="" title="Citation">Citation</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CitationDelta.html" name="" title="CitationDelta">CitationDelta</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CitationOption.html" name="" title="CitationOption">CitationOption</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CitationType.html" name="" title="CitationType">CitationType</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.Content.html" name="" title="Content">Content</a>
|
<a href="AnthropicClient.Models.Content.html" name="" title="Content">Content</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.ContentBlockLocationCitation.html" name="" title="ContentBlockLocationCitation">ContentBlockLocationCitation</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.ContentDelta.html" name="" title="ContentDelta">ContentDelta</a>
|
<a href="AnthropicClient.Models.ContentDelta.html" name="" title="ContentDelta">ContentDelta</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -96,6 +117,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.CountMessageTokensRequest.html" name="" title="CountMessageTokensRequest">CountMessageTokensRequest</a>
|
<a href="AnthropicClient.Models.CountMessageTokensRequest.html" name="" title="CountMessageTokensRequest">CountMessageTokensRequest</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CustomSource.html" name="" title="CustomSource">CustomSource</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.DocumentContent.html" name="" title="DocumentContent">DocumentContent</a>
|
<a href="AnthropicClient.Models.DocumentContent.html" name="" title="DocumentContent">DocumentContent</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -219,6 +243,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.Page.html" name="" title="Page">Page</a>
|
<a href="AnthropicClient.Models.Page.html" name="" title="Page">Page</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.PageLocationCitation.html" name="" title="PageLocationCitation">PageLocationCitation</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.Page-1.html" name="" title="Page<T>">Page<T></a>
|
<a href="AnthropicClient.Models.Page-1.html" name="" title="Page<T>">Page<T></a>
|
||||||
</li>
|
</li>
|
||||||
@@ -234,6 +261,12 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.RateLimitError.html" name="" title="RateLimitError">RateLimitError</a>
|
<a href="AnthropicClient.Models.RateLimitError.html" name="" title="RateLimitError">RateLimitError</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.Source.html" name="" title="Source">Source</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.SourceType.html" name="" title="SourceType">SourceType</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.SpecificToolChoice.html" name="" title="SpecificToolChoice">SpecificToolChoice</a>
|
<a href="AnthropicClient.Models.SpecificToolChoice.html" name="" title="SpecificToolChoice">SpecificToolChoice</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -252,6 +285,9 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.TextDelta.html" name="" title="TextDelta">TextDelta</a>
|
<a href="AnthropicClient.Models.TextDelta.html" name="" title="TextDelta">TextDelta</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.TextSource.html" name="" title="TextSource">TextSource</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.TokenCountResponse.html" name="" title="TokenCountResponse">TokenCountResponse</a>
|
<a href="AnthropicClient.Models.TokenCountResponse.html" name="" title="TokenCountResponse">TokenCountResponse</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+171
@@ -916,6 +916,177 @@ foreach (var content in response.Value.Content)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<h3 id="citations">Citations</h3>
|
||||||
|
<p>Anthropic provides a feature called <a href="https://docs.anthropic.com/en/docs/build-with-claude/citations">Citations</a> that allows Claude to provide citations for information extracted from documents. This feature enables Claude to reference specific parts of the source material when answering questions, making it easier to verify information and understand the context of responses.</p>
|
||||||
|
<p>Citations can be enabled for documents and will return references to the specific locations in the source material where information was found. This library provides comprehensive support for citations through strongly-typed models that represent different types of citation locations.</p>
|
||||||
|
<h4 id="enabling-citations-for-documents">Enabling Citations for Documents</h4>
|
||||||
|
<p>You can enable citations for documents by setting the <code>Citations</code> property on <code>DocumentContent</code> instances:</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var request = new MessageRequest(
|
||||||
|
model: AnthropicModels.Claude35Sonnet,
|
||||||
|
messages: [
|
||||||
|
new(MessageRole.User, [
|
||||||
|
new DocumentContent(new TextSource("The grass is green. The sky is blue."))
|
||||||
|
{
|
||||||
|
Title = "My Document",
|
||||||
|
Context = "This is a trustworthy document.",
|
||||||
|
Citations = new() { Enabled = true }
|
||||||
|
},
|
||||||
|
new TextContent("What color is the grass and sky?")
|
||||||
|
])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(request);
|
||||||
|
|
||||||
|
if (response.IsSuccess is false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to create message");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var content in response.Value.Content)
|
||||||
|
{
|
||||||
|
switch (content)
|
||||||
|
{
|
||||||
|
case TextContent textContent:
|
||||||
|
Console.WriteLine("Response: {0}", textContent.Text);
|
||||||
|
|
||||||
|
if (textContent.Citations is not null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Citations:");
|
||||||
|
foreach (var citation in textContent.Citations)
|
||||||
|
{
|
||||||
|
Console.WriteLine(" - Cited Text: {0}", citation.CitedText);
|
||||||
|
Console.WriteLine(" Document: {0}", citation.DocumentTitle);
|
||||||
|
Console.WriteLine(" Type: {0}", citation.Type);
|
||||||
|
|
||||||
|
switch (citation)
|
||||||
|
{
|
||||||
|
case CharacterLocationCitation charCitation:
|
||||||
|
Console.WriteLine(
|
||||||
|
" Character Range: {0}-{1}",
|
||||||
|
charCitation.StartCharIndex, charCitation.EndCharIndex
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case PageLocationCitation pageCitation:
|
||||||
|
Console.WriteLine(
|
||||||
|
" Page Range: {0}-{1}",
|
||||||
|
pageCitation.StartPageNumber, pageCitation.EndPageNumber
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case ContentBlockLocationCitation blockCitation:
|
||||||
|
Console.WriteLine(
|
||||||
|
" Block Range: {0}-{1}",
|
||||||
|
blockCitation.StartBlockIndex, blockCitation.EndBlockIndex
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h4 id="citations-with-pdf-documents">Citations with PDF Documents</h4>
|
||||||
|
<p>Citations work particularly well with PDF documents, providing page-level references:</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var pdfBytes = await File.ReadAllBytesAsync("document.pdf");
|
||||||
|
var base64Data = Convert.ToBase64String(pdfBytes);
|
||||||
|
|
||||||
|
var request = new MessageRequest(
|
||||||
|
model: AnthropicModels.Claude35Sonnet,
|
||||||
|
messages: [
|
||||||
|
new(MessageRole.User, [
|
||||||
|
new DocumentContent("application/pdf", base64Data)
|
||||||
|
{
|
||||||
|
Title = "Research Paper",
|
||||||
|
Citations = new() { Enabled = true }
|
||||||
|
},
|
||||||
|
new TextContent("Summarize the key findings from this research paper.")
|
||||||
|
])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(request);
|
||||||
|
|
||||||
|
if (response.IsSuccess is false)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to create message");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var content in response.Value.Content)
|
||||||
|
{
|
||||||
|
switch (content)
|
||||||
|
{
|
||||||
|
case TextContent textContent:
|
||||||
|
Console.WriteLine("Summary: {0}", textContent.Text);
|
||||||
|
|
||||||
|
if (textContent.Citations is not null)
|
||||||
|
{
|
||||||
|
Console.WriteLine("\nCitations:");
|
||||||
|
foreach (var citation in textContent.Citations.OfType<PageLocationCitation>())
|
||||||
|
{
|
||||||
|
Console.WriteLine(
|
||||||
|
" - \"{0}\" (Pages {1}-{2})",
|
||||||
|
citation.CitedText,
|
||||||
|
citation.StartPageNumber,
|
||||||
|
citation.EndPageNumber
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h4 id="citations-in-streaming-responses">Citations in Streaming Responses</h4>
|
||||||
|
<p>Citations are also supported in streaming responses through the <code>CitationDelta</code> events:</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var request = new StreamMessageRequest(
|
||||||
|
model: AnthropicModels.Claude35Sonnet,
|
||||||
|
messages: [
|
||||||
|
new(MessageRole.User, [
|
||||||
|
new DocumentContent(new TextSource("The grass is green. The sky is blue."))
|
||||||
|
{
|
||||||
|
Citations = new() { Enabled = true }
|
||||||
|
},
|
||||||
|
new TextContent("What color is the grass?")
|
||||||
|
])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
var events = client.CreateMessageAsync(request);
|
||||||
|
|
||||||
|
await foreach (var e in events)
|
||||||
|
{
|
||||||
|
switch (e.Data)
|
||||||
|
{
|
||||||
|
case ContentDeltaEventData contentData:
|
||||||
|
switch (contentData.Delta)
|
||||||
|
{
|
||||||
|
case CitationDelta citationDelta:
|
||||||
|
Console.WriteLine("Citation: {0}", citationDelta.Citation.CitedText);
|
||||||
|
Console.WriteLine("Type: {0}", citationDelta.Citation.Type);
|
||||||
|
break;
|
||||||
|
case TextDelta textDelta:
|
||||||
|
Console.Write(textDelta.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
<h3 id="message-batches">Message Batches</h3>
|
<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>
|
<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>
|
<h4 id="create-a-message-batch">Create a message batch</h4>
|
||||||
|
|||||||
+69
-9
File diff suppressed because one or more lines are too long
@@ -178,6 +178,20 @@
|
|||||||
"Title": "AnthropicClient.Models.AutoToolChoice",
|
"Title": "AnthropicClient.Models.AutoToolChoice",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.AutoToolChoice.yml\" sourcestartlinenumber=\"1\">Represents the auto tool choice mode.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.AutoToolChoice.yml\" sourcestartlinenumber=\"1\">Represents the auto tool choice mode.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.Base64Source.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.Base64Source.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.Base64Source",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Base64Source.yml\" sourcestartlinenumber=\"1\">Represents a base64 source.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.BaseMessageRequest.yml",
|
"source_relative_path": "api/AnthropicClient.Models.BaseMessageRequest.yml",
|
||||||
@@ -234,6 +248,76 @@
|
|||||||
"Title": "AnthropicClient.Models.CanceledMessageBatchResult",
|
"Title": "AnthropicClient.Models.CanceledMessageBatchResult",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CanceledMessageBatchResult.yml\" sourcestartlinenumber=\"1\">Represents a message batch result that was cancelled.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CanceledMessageBatchResult.yml\" sourcestartlinenumber=\"1\">Represents a message batch result that was cancelled.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CharacterLocationCitation.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CharacterLocationCitation.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.CharacterLocationCitation",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CharacterLocationCitation.yml\" sourcestartlinenumber=\"1\">Represents a citation for specific locations within text content.</p>\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.Citation.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.Citation.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.Citation",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Citation.yml\" sourcestartlinenumber=\"1\">Represents a citation</p>\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CitationDelta.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CitationDelta.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.CitationDelta",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CitationDelta.yml\" sourcestartlinenumber=\"1\">Represents a citation delta.</p>\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CitationOption.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CitationOption.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.CitationOption",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CitationOption.yml\" sourcestartlinenumber=\"1\">Represents whether citations are enabled for a document.</p>\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CitationType.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CitationType.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.CitationType",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CitationType.yml\" sourcestartlinenumber=\"1\">The types of citations that can be returned by the Anthropic API.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.Content.yml",
|
"source_relative_path": "api/AnthropicClient.Models.Content.yml",
|
||||||
@@ -248,6 +332,20 @@
|
|||||||
"Title": "AnthropicClient.Models.Content",
|
"Title": "AnthropicClient.Models.Content",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Content.yml\" sourcestartlinenumber=\"1\">Represents part of the content of a message.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Content.yml\" sourcestartlinenumber=\"1\">Represents part of the content of a message.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.ContentBlockLocationCitation.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.ContentBlockLocationCitation.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.ContentBlockLocationCitation",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.ContentBlockLocationCitation.yml\" sourcestartlinenumber=\"1\">Represents a citation for content blocks within custom content.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.ContentDelta.yml",
|
"source_relative_path": "api/AnthropicClient.Models.ContentDelta.yml",
|
||||||
@@ -346,6 +444,20 @@
|
|||||||
"Title": "AnthropicClient.Models.CountMessageTokensRequest",
|
"Title": "AnthropicClient.Models.CountMessageTokensRequest",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CountMessageTokensRequest.yml\" sourcestartlinenumber=\"1\">Represents a request to count the number of tokens in a message.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CountMessageTokensRequest.yml\" sourcestartlinenumber=\"1\">Represents a request to count the number of tokens in a message.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CustomSource.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CustomSource.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.CustomSource",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.CustomSource.yml\" sourcestartlinenumber=\"1\">Represents a custom source that contains a list of text content.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.DocumentContent.yml",
|
"source_relative_path": "api/AnthropicClient.Models.DocumentContent.yml",
|
||||||
@@ -934,6 +1046,20 @@
|
|||||||
"Title": "AnthropicClient.Models.Page",
|
"Title": "AnthropicClient.Models.Page",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Page.yml\" sourcestartlinenumber=\"1\">Represents a page.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Page.yml\" sourcestartlinenumber=\"1\">Represents a page.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.PageLocationCitation.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.PageLocationCitation.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.PageLocationCitation",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.PageLocationCitation.yml\" sourcestartlinenumber=\"1\">Represents a citation for text within a page of a document.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.PagingRequest.yml",
|
"source_relative_path": "api/AnthropicClient.Models.PagingRequest.yml",
|
||||||
@@ -990,6 +1116,34 @@
|
|||||||
"Title": "AnthropicClient.Models.RateLimitError",
|
"Title": "AnthropicClient.Models.RateLimitError",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.RateLimitError.yml\" sourcestartlinenumber=\"1\">Represents a rate_limit error.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.RateLimitError.yml\" sourcestartlinenumber=\"1\">Represents a rate_limit error.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.Source.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.Source.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.Source",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.Source.yml\" sourcestartlinenumber=\"1\">Represents a base class for sources.</p>\n"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.SourceType.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.SourceType.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.SourceType",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.SourceType.yml\" sourcestartlinenumber=\"1\">Represents the types of document sources that can be used in the Anthropic API.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.SpecificToolChoice.yml",
|
"source_relative_path": "api/AnthropicClient.Models.SpecificToolChoice.yml",
|
||||||
@@ -1074,6 +1228,20 @@
|
|||||||
"Title": "AnthropicClient.Models.TextDelta",
|
"Title": "AnthropicClient.Models.TextDelta",
|
||||||
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.TextDelta.yml\" sourcestartlinenumber=\"1\">Represents a text delta.</p>\n"
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.TextDelta.yml\" sourcestartlinenumber=\"1\">Represents a text delta.</p>\n"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.TextSource.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.TextSource.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": "",
|
||||||
|
"Uid": null,
|
||||||
|
"IsMRef": true,
|
||||||
|
"Title": "AnthropicClient.Models.TextSource",
|
||||||
|
"Summary": "<p sourcefile=\"api/AnthropicClient.Models.TextSource.yml\" sourcestartlinenumber=\"1\">Represents a text document source.</p>\n"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.TokenCountResponse.yml",
|
"source_relative_path": "api/AnthropicClient.Models.TokenCountResponse.yml",
|
||||||
|
|||||||
+589
-78
@@ -927,6 +927,57 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.AutoToolChoice.New
|
fullName.vb: AnthropicClient.Models.AutoToolChoice.New
|
||||||
nameWithType: AutoToolChoice.AutoToolChoice
|
nameWithType: AutoToolChoice.AutoToolChoice
|
||||||
nameWithType.vb: AutoToolChoice.New
|
nameWithType.vb: AutoToolChoice.New
|
||||||
|
- uid: AnthropicClient.Models.Base64Source
|
||||||
|
name: Base64Source
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html
|
||||||
|
commentId: T:AnthropicClient.Models.Base64Source
|
||||||
|
fullName: AnthropicClient.Models.Base64Source
|
||||||
|
nameWithType: Base64Source
|
||||||
|
- uid: AnthropicClient.Models.Base64Source.#ctor(System.String,System.String)
|
||||||
|
name: Base64Source(string, string)
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source__ctor_System_String_System_String_
|
||||||
|
commentId: M:AnthropicClient.Models.Base64Source.#ctor(System.String,System.String)
|
||||||
|
name.vb: New(String, String)
|
||||||
|
fullName: AnthropicClient.Models.Base64Source.Base64Source(string, string)
|
||||||
|
fullName.vb: AnthropicClient.Models.Base64Source.New(String, String)
|
||||||
|
nameWithType: Base64Source.Base64Source(string, string)
|
||||||
|
nameWithType.vb: Base64Source.New(String, String)
|
||||||
|
- uid: AnthropicClient.Models.Base64Source.#ctor*
|
||||||
|
name: Base64Source
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Base64Source.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.Base64Source.Base64Source
|
||||||
|
fullName.vb: AnthropicClient.Models.Base64Source.New
|
||||||
|
nameWithType: Base64Source.Base64Source
|
||||||
|
nameWithType.vb: Base64Source.New
|
||||||
|
- uid: AnthropicClient.Models.Base64Source.Data
|
||||||
|
name: Data
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_Data
|
||||||
|
commentId: P:AnthropicClient.Models.Base64Source.Data
|
||||||
|
fullName: AnthropicClient.Models.Base64Source.Data
|
||||||
|
nameWithType: Base64Source.Data
|
||||||
|
- uid: AnthropicClient.Models.Base64Source.Data*
|
||||||
|
name: Data
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_Data_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Base64Source.Data
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Base64Source.Data
|
||||||
|
nameWithType: Base64Source.Data
|
||||||
|
- uid: AnthropicClient.Models.Base64Source.MediaType
|
||||||
|
name: MediaType
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_MediaType
|
||||||
|
commentId: P:AnthropicClient.Models.Base64Source.MediaType
|
||||||
|
fullName: AnthropicClient.Models.Base64Source.MediaType
|
||||||
|
nameWithType: Base64Source.MediaType
|
||||||
|
- uid: AnthropicClient.Models.Base64Source.MediaType*
|
||||||
|
name: MediaType
|
||||||
|
href: api/AnthropicClient.Models.Base64Source.html#AnthropicClient_Models_Base64Source_MediaType_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Base64Source.MediaType
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Base64Source.MediaType
|
||||||
|
nameWithType: Base64Source.MediaType
|
||||||
- uid: AnthropicClient.Models.BaseMessageRequest
|
- uid: AnthropicClient.Models.BaseMessageRequest
|
||||||
name: BaseMessageRequest
|
name: BaseMessageRequest
|
||||||
href: api/AnthropicClient.Models.BaseMessageRequest.html
|
href: api/AnthropicClient.Models.BaseMessageRequest.html
|
||||||
@@ -1209,6 +1260,215 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.CanceledMessageBatchResult.New
|
fullName.vb: AnthropicClient.Models.CanceledMessageBatchResult.New
|
||||||
nameWithType: CanceledMessageBatchResult.CanceledMessageBatchResult
|
nameWithType: CanceledMessageBatchResult.CanceledMessageBatchResult
|
||||||
nameWithType.vb: CanceledMessageBatchResult.New
|
nameWithType.vb: CanceledMessageBatchResult.New
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation
|
||||||
|
name: CharacterLocationCitation
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html
|
||||||
|
commentId: T:AnthropicClient.Models.CharacterLocationCitation
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation
|
||||||
|
nameWithType: CharacterLocationCitation
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation.#ctor
|
||||||
|
name: CharacterLocationCitation()
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html#AnthropicClient_Models_CharacterLocationCitation__ctor
|
||||||
|
commentId: M:AnthropicClient.Models.CharacterLocationCitation.#ctor
|
||||||
|
name.vb: New()
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation.CharacterLocationCitation()
|
||||||
|
fullName.vb: AnthropicClient.Models.CharacterLocationCitation.New()
|
||||||
|
nameWithType: CharacterLocationCitation.CharacterLocationCitation()
|
||||||
|
nameWithType.vb: CharacterLocationCitation.New()
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation.#ctor*
|
||||||
|
name: CharacterLocationCitation
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html#AnthropicClient_Models_CharacterLocationCitation__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CharacterLocationCitation.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation.CharacterLocationCitation
|
||||||
|
fullName.vb: AnthropicClient.Models.CharacterLocationCitation.New
|
||||||
|
nameWithType: CharacterLocationCitation.CharacterLocationCitation
|
||||||
|
nameWithType.vb: CharacterLocationCitation.New
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation.EndCharIndex
|
||||||
|
name: EndCharIndex
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html#AnthropicClient_Models_CharacterLocationCitation_EndCharIndex
|
||||||
|
commentId: P:AnthropicClient.Models.CharacterLocationCitation.EndCharIndex
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation.EndCharIndex
|
||||||
|
nameWithType: CharacterLocationCitation.EndCharIndex
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation.EndCharIndex*
|
||||||
|
name: EndCharIndex
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html#AnthropicClient_Models_CharacterLocationCitation_EndCharIndex_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CharacterLocationCitation.EndCharIndex
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation.EndCharIndex
|
||||||
|
nameWithType: CharacterLocationCitation.EndCharIndex
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation.StartCharIndex
|
||||||
|
name: StartCharIndex
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html#AnthropicClient_Models_CharacterLocationCitation_StartCharIndex
|
||||||
|
commentId: P:AnthropicClient.Models.CharacterLocationCitation.StartCharIndex
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation.StartCharIndex
|
||||||
|
nameWithType: CharacterLocationCitation.StartCharIndex
|
||||||
|
- uid: AnthropicClient.Models.CharacterLocationCitation.StartCharIndex*
|
||||||
|
name: StartCharIndex
|
||||||
|
href: api/AnthropicClient.Models.CharacterLocationCitation.html#AnthropicClient_Models_CharacterLocationCitation_StartCharIndex_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CharacterLocationCitation.StartCharIndex
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.CharacterLocationCitation.StartCharIndex
|
||||||
|
nameWithType: CharacterLocationCitation.StartCharIndex
|
||||||
|
- uid: AnthropicClient.Models.Citation
|
||||||
|
name: Citation
|
||||||
|
href: api/AnthropicClient.Models.Citation.html
|
||||||
|
commentId: T:AnthropicClient.Models.Citation
|
||||||
|
fullName: AnthropicClient.Models.Citation
|
||||||
|
nameWithType: Citation
|
||||||
|
- uid: AnthropicClient.Models.Citation.#ctor(System.String)
|
||||||
|
name: Citation(string)
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation__ctor_System_String_
|
||||||
|
commentId: M:AnthropicClient.Models.Citation.#ctor(System.String)
|
||||||
|
name.vb: New(String)
|
||||||
|
fullName: AnthropicClient.Models.Citation.Citation(string)
|
||||||
|
fullName.vb: AnthropicClient.Models.Citation.New(String)
|
||||||
|
nameWithType: Citation.Citation(string)
|
||||||
|
nameWithType.vb: Citation.New(String)
|
||||||
|
- uid: AnthropicClient.Models.Citation.#ctor*
|
||||||
|
name: Citation
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Citation.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.Citation.Citation
|
||||||
|
fullName.vb: AnthropicClient.Models.Citation.New
|
||||||
|
nameWithType: Citation.Citation
|
||||||
|
nameWithType.vb: Citation.New
|
||||||
|
- uid: AnthropicClient.Models.Citation.CitedText
|
||||||
|
name: CitedText
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_CitedText
|
||||||
|
commentId: P:AnthropicClient.Models.Citation.CitedText
|
||||||
|
fullName: AnthropicClient.Models.Citation.CitedText
|
||||||
|
nameWithType: Citation.CitedText
|
||||||
|
- uid: AnthropicClient.Models.Citation.CitedText*
|
||||||
|
name: CitedText
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_CitedText_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Citation.CitedText
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Citation.CitedText
|
||||||
|
nameWithType: Citation.CitedText
|
||||||
|
- uid: AnthropicClient.Models.Citation.DocumentIndex
|
||||||
|
name: DocumentIndex
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentIndex
|
||||||
|
commentId: P:AnthropicClient.Models.Citation.DocumentIndex
|
||||||
|
fullName: AnthropicClient.Models.Citation.DocumentIndex
|
||||||
|
nameWithType: Citation.DocumentIndex
|
||||||
|
- uid: AnthropicClient.Models.Citation.DocumentIndex*
|
||||||
|
name: DocumentIndex
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentIndex_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Citation.DocumentIndex
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Citation.DocumentIndex
|
||||||
|
nameWithType: Citation.DocumentIndex
|
||||||
|
- uid: AnthropicClient.Models.Citation.DocumentTitle
|
||||||
|
name: DocumentTitle
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentTitle
|
||||||
|
commentId: P:AnthropicClient.Models.Citation.DocumentTitle
|
||||||
|
fullName: AnthropicClient.Models.Citation.DocumentTitle
|
||||||
|
nameWithType: Citation.DocumentTitle
|
||||||
|
- uid: AnthropicClient.Models.Citation.DocumentTitle*
|
||||||
|
name: DocumentTitle
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_DocumentTitle_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Citation.DocumentTitle
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Citation.DocumentTitle
|
||||||
|
nameWithType: Citation.DocumentTitle
|
||||||
|
- uid: AnthropicClient.Models.Citation.Type
|
||||||
|
name: Type
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_Type
|
||||||
|
commentId: P:AnthropicClient.Models.Citation.Type
|
||||||
|
fullName: AnthropicClient.Models.Citation.Type
|
||||||
|
nameWithType: Citation.Type
|
||||||
|
- uid: AnthropicClient.Models.Citation.Type*
|
||||||
|
name: Type
|
||||||
|
href: api/AnthropicClient.Models.Citation.html#AnthropicClient_Models_Citation_Type_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Citation.Type
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Citation.Type
|
||||||
|
nameWithType: Citation.Type
|
||||||
|
- uid: AnthropicClient.Models.CitationDelta
|
||||||
|
name: CitationDelta
|
||||||
|
href: api/AnthropicClient.Models.CitationDelta.html
|
||||||
|
commentId: T:AnthropicClient.Models.CitationDelta
|
||||||
|
fullName: AnthropicClient.Models.CitationDelta
|
||||||
|
nameWithType: CitationDelta
|
||||||
|
- uid: AnthropicClient.Models.CitationDelta.#ctor(AnthropicClient.Models.Citation)
|
||||||
|
name: CitationDelta(Citation)
|
||||||
|
href: api/AnthropicClient.Models.CitationDelta.html#AnthropicClient_Models_CitationDelta__ctor_AnthropicClient_Models_Citation_
|
||||||
|
commentId: M:AnthropicClient.Models.CitationDelta.#ctor(AnthropicClient.Models.Citation)
|
||||||
|
name.vb: New(Citation)
|
||||||
|
fullName: AnthropicClient.Models.CitationDelta.CitationDelta(AnthropicClient.Models.Citation)
|
||||||
|
fullName.vb: AnthropicClient.Models.CitationDelta.New(AnthropicClient.Models.Citation)
|
||||||
|
nameWithType: CitationDelta.CitationDelta(Citation)
|
||||||
|
nameWithType.vb: CitationDelta.New(Citation)
|
||||||
|
- uid: AnthropicClient.Models.CitationDelta.#ctor*
|
||||||
|
name: CitationDelta
|
||||||
|
href: api/AnthropicClient.Models.CitationDelta.html#AnthropicClient_Models_CitationDelta__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CitationDelta.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.CitationDelta.CitationDelta
|
||||||
|
fullName.vb: AnthropicClient.Models.CitationDelta.New
|
||||||
|
nameWithType: CitationDelta.CitationDelta
|
||||||
|
nameWithType.vb: CitationDelta.New
|
||||||
|
- uid: AnthropicClient.Models.CitationDelta.Citation
|
||||||
|
name: Citation
|
||||||
|
href: api/AnthropicClient.Models.CitationDelta.html#AnthropicClient_Models_CitationDelta_Citation
|
||||||
|
commentId: P:AnthropicClient.Models.CitationDelta.Citation
|
||||||
|
fullName: AnthropicClient.Models.CitationDelta.Citation
|
||||||
|
nameWithType: CitationDelta.Citation
|
||||||
|
- uid: AnthropicClient.Models.CitationDelta.Citation*
|
||||||
|
name: Citation
|
||||||
|
href: api/AnthropicClient.Models.CitationDelta.html#AnthropicClient_Models_CitationDelta_Citation_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CitationDelta.Citation
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.CitationDelta.Citation
|
||||||
|
nameWithType: CitationDelta.Citation
|
||||||
|
- uid: AnthropicClient.Models.CitationOption
|
||||||
|
name: CitationOption
|
||||||
|
href: api/AnthropicClient.Models.CitationOption.html
|
||||||
|
commentId: T:AnthropicClient.Models.CitationOption
|
||||||
|
fullName: AnthropicClient.Models.CitationOption
|
||||||
|
nameWithType: CitationOption
|
||||||
|
- uid: AnthropicClient.Models.CitationOption.Enabled
|
||||||
|
name: Enabled
|
||||||
|
href: api/AnthropicClient.Models.CitationOption.html#AnthropicClient_Models_CitationOption_Enabled
|
||||||
|
commentId: P:AnthropicClient.Models.CitationOption.Enabled
|
||||||
|
fullName: AnthropicClient.Models.CitationOption.Enabled
|
||||||
|
nameWithType: CitationOption.Enabled
|
||||||
|
- uid: AnthropicClient.Models.CitationOption.Enabled*
|
||||||
|
name: Enabled
|
||||||
|
href: api/AnthropicClient.Models.CitationOption.html#AnthropicClient_Models_CitationOption_Enabled_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CitationOption.Enabled
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.CitationOption.Enabled
|
||||||
|
nameWithType: CitationOption.Enabled
|
||||||
|
- uid: AnthropicClient.Models.CitationType
|
||||||
|
name: CitationType
|
||||||
|
href: api/AnthropicClient.Models.CitationType.html
|
||||||
|
commentId: T:AnthropicClient.Models.CitationType
|
||||||
|
fullName: AnthropicClient.Models.CitationType
|
||||||
|
nameWithType: CitationType
|
||||||
|
- uid: AnthropicClient.Models.CitationType.CharacterLocation
|
||||||
|
name: CharacterLocation
|
||||||
|
href: api/AnthropicClient.Models.CitationType.html#AnthropicClient_Models_CitationType_CharacterLocation
|
||||||
|
commentId: F:AnthropicClient.Models.CitationType.CharacterLocation
|
||||||
|
fullName: AnthropicClient.Models.CitationType.CharacterLocation
|
||||||
|
nameWithType: CitationType.CharacterLocation
|
||||||
|
- uid: AnthropicClient.Models.CitationType.ContentBlockLocation
|
||||||
|
name: ContentBlockLocation
|
||||||
|
href: api/AnthropicClient.Models.CitationType.html#AnthropicClient_Models_CitationType_ContentBlockLocation
|
||||||
|
commentId: F:AnthropicClient.Models.CitationType.ContentBlockLocation
|
||||||
|
fullName: AnthropicClient.Models.CitationType.ContentBlockLocation
|
||||||
|
nameWithType: CitationType.ContentBlockLocation
|
||||||
|
- uid: AnthropicClient.Models.CitationType.PageLocation
|
||||||
|
name: PageLocation
|
||||||
|
href: api/AnthropicClient.Models.CitationType.html#AnthropicClient_Models_CitationType_PageLocation
|
||||||
|
commentId: F:AnthropicClient.Models.CitationType.PageLocation
|
||||||
|
fullName: AnthropicClient.Models.CitationType.PageLocation
|
||||||
|
nameWithType: CitationType.PageLocation
|
||||||
- uid: AnthropicClient.Models.Content
|
- uid: AnthropicClient.Models.Content
|
||||||
name: Content
|
name: Content
|
||||||
href: api/AnthropicClient.Models.Content.html
|
href: api/AnthropicClient.Models.Content.html
|
||||||
@@ -1269,6 +1529,57 @@ references:
|
|||||||
isSpec: "True"
|
isSpec: "True"
|
||||||
fullName: AnthropicClient.Models.Content.Type
|
fullName: AnthropicClient.Models.Content.Type
|
||||||
nameWithType: Content.Type
|
nameWithType: Content.Type
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation
|
||||||
|
name: ContentBlockLocationCitation
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html
|
||||||
|
commentId: T:AnthropicClient.Models.ContentBlockLocationCitation
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation
|
||||||
|
nameWithType: ContentBlockLocationCitation
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation.#ctor
|
||||||
|
name: ContentBlockLocationCitation()
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html#AnthropicClient_Models_ContentBlockLocationCitation__ctor
|
||||||
|
commentId: M:AnthropicClient.Models.ContentBlockLocationCitation.#ctor
|
||||||
|
name.vb: New()
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation.ContentBlockLocationCitation()
|
||||||
|
fullName.vb: AnthropicClient.Models.ContentBlockLocationCitation.New()
|
||||||
|
nameWithType: ContentBlockLocationCitation.ContentBlockLocationCitation()
|
||||||
|
nameWithType.vb: ContentBlockLocationCitation.New()
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation.#ctor*
|
||||||
|
name: ContentBlockLocationCitation
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html#AnthropicClient_Models_ContentBlockLocationCitation__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.ContentBlockLocationCitation.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation.ContentBlockLocationCitation
|
||||||
|
fullName.vb: AnthropicClient.Models.ContentBlockLocationCitation.New
|
||||||
|
nameWithType: ContentBlockLocationCitation.ContentBlockLocationCitation
|
||||||
|
nameWithType.vb: ContentBlockLocationCitation.New
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
name: EndBlockIndex
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html#AnthropicClient_Models_ContentBlockLocationCitation_EndBlockIndex
|
||||||
|
commentId: P:AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
nameWithType: ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex*
|
||||||
|
name: EndBlockIndex
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html#AnthropicClient_Models_ContentBlockLocationCitation_EndBlockIndex_
|
||||||
|
commentId: Overload:AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
nameWithType: ContentBlockLocationCitation.EndBlockIndex
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex
|
||||||
|
name: StartBlockIndex
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html#AnthropicClient_Models_ContentBlockLocationCitation_StartBlockIndex
|
||||||
|
commentId: P:AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex
|
||||||
|
nameWithType: ContentBlockLocationCitation.StartBlockIndex
|
||||||
|
- uid: AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex*
|
||||||
|
name: StartBlockIndex
|
||||||
|
href: api/AnthropicClient.Models.ContentBlockLocationCitation.html#AnthropicClient_Models_ContentBlockLocationCitation_StartBlockIndex_
|
||||||
|
commentId: Overload:AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.ContentBlockLocationCitation.StartBlockIndex
|
||||||
|
nameWithType: ContentBlockLocationCitation.StartBlockIndex
|
||||||
- uid: AnthropicClient.Models.ContentDelta
|
- uid: AnthropicClient.Models.ContentDelta
|
||||||
name: ContentDelta
|
name: ContentDelta
|
||||||
href: api/AnthropicClient.Models.ContentDelta.html
|
href: api/AnthropicClient.Models.ContentDelta.html
|
||||||
@@ -1364,6 +1675,12 @@ references:
|
|||||||
commentId: T:AnthropicClient.Models.ContentDeltaType
|
commentId: T:AnthropicClient.Models.ContentDeltaType
|
||||||
fullName: AnthropicClient.Models.ContentDeltaType
|
fullName: AnthropicClient.Models.ContentDeltaType
|
||||||
nameWithType: ContentDeltaType
|
nameWithType: ContentDeltaType
|
||||||
|
- uid: AnthropicClient.Models.ContentDeltaType.CitationDelta
|
||||||
|
name: CitationDelta
|
||||||
|
href: api/AnthropicClient.Models.ContentDeltaType.html#AnthropicClient_Models_ContentDeltaType_CitationDelta
|
||||||
|
commentId: F:AnthropicClient.Models.ContentDeltaType.CitationDelta
|
||||||
|
fullName: AnthropicClient.Models.ContentDeltaType.CitationDelta
|
||||||
|
nameWithType: ContentDeltaType.CitationDelta
|
||||||
- uid: AnthropicClient.Models.ContentDeltaType.JsonDelta
|
- uid: AnthropicClient.Models.ContentDeltaType.JsonDelta
|
||||||
name: JsonDelta
|
name: JsonDelta
|
||||||
href: api/AnthropicClient.Models.ContentDeltaType.html#AnthropicClient_Models_ContentDeltaType_JsonDelta
|
href: api/AnthropicClient.Models.ContentDeltaType.html#AnthropicClient_Models_ContentDeltaType_JsonDelta
|
||||||
@@ -1591,12 +1908,68 @@ references:
|
|||||||
isSpec: "True"
|
isSpec: "True"
|
||||||
fullName: AnthropicClient.Models.CountMessageTokensRequest.Tools
|
fullName: AnthropicClient.Models.CountMessageTokensRequest.Tools
|
||||||
nameWithType: CountMessageTokensRequest.Tools
|
nameWithType: CountMessageTokensRequest.Tools
|
||||||
|
- uid: AnthropicClient.Models.CustomSource
|
||||||
|
name: CustomSource
|
||||||
|
href: api/AnthropicClient.Models.CustomSource.html
|
||||||
|
commentId: T:AnthropicClient.Models.CustomSource
|
||||||
|
fullName: AnthropicClient.Models.CustomSource
|
||||||
|
nameWithType: CustomSource
|
||||||
|
- uid: AnthropicClient.Models.CustomSource.#ctor(System.Collections.Generic.List{AnthropicClient.Models.TextContent})
|
||||||
|
name: CustomSource(List<TextContent>)
|
||||||
|
href: api/AnthropicClient.Models.CustomSource.html#AnthropicClient_Models_CustomSource__ctor_System_Collections_Generic_List_AnthropicClient_Models_TextContent__
|
||||||
|
commentId: M:AnthropicClient.Models.CustomSource.#ctor(System.Collections.Generic.List{AnthropicClient.Models.TextContent})
|
||||||
|
name.vb: New(List(Of TextContent))
|
||||||
|
fullName: AnthropicClient.Models.CustomSource.CustomSource(System.Collections.Generic.List<AnthropicClient.Models.TextContent>)
|
||||||
|
fullName.vb: AnthropicClient.Models.CustomSource.New(System.Collections.Generic.List(Of AnthropicClient.Models.TextContent))
|
||||||
|
nameWithType: CustomSource.CustomSource(List<TextContent>)
|
||||||
|
nameWithType.vb: CustomSource.New(List(Of TextContent))
|
||||||
|
- uid: AnthropicClient.Models.CustomSource.#ctor*
|
||||||
|
name: CustomSource
|
||||||
|
href: api/AnthropicClient.Models.CustomSource.html#AnthropicClient_Models_CustomSource__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CustomSource.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.CustomSource.CustomSource
|
||||||
|
fullName.vb: AnthropicClient.Models.CustomSource.New
|
||||||
|
nameWithType: CustomSource.CustomSource
|
||||||
|
nameWithType.vb: CustomSource.New
|
||||||
|
- uid: AnthropicClient.Models.CustomSource.Content
|
||||||
|
name: Content
|
||||||
|
href: api/AnthropicClient.Models.CustomSource.html#AnthropicClient_Models_CustomSource_Content
|
||||||
|
commentId: P:AnthropicClient.Models.CustomSource.Content
|
||||||
|
fullName: AnthropicClient.Models.CustomSource.Content
|
||||||
|
nameWithType: CustomSource.Content
|
||||||
|
- uid: AnthropicClient.Models.CustomSource.Content*
|
||||||
|
name: Content
|
||||||
|
href: api/AnthropicClient.Models.CustomSource.html#AnthropicClient_Models_CustomSource_Content_
|
||||||
|
commentId: Overload:AnthropicClient.Models.CustomSource.Content
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.CustomSource.Content
|
||||||
|
nameWithType: CustomSource.Content
|
||||||
- uid: AnthropicClient.Models.DocumentContent
|
- uid: AnthropicClient.Models.DocumentContent
|
||||||
name: DocumentContent
|
name: DocumentContent
|
||||||
href: api/AnthropicClient.Models.DocumentContent.html
|
href: api/AnthropicClient.Models.DocumentContent.html
|
||||||
commentId: T:AnthropicClient.Models.DocumentContent
|
commentId: T:AnthropicClient.Models.DocumentContent
|
||||||
fullName: AnthropicClient.Models.DocumentContent
|
fullName: AnthropicClient.Models.DocumentContent
|
||||||
nameWithType: DocumentContent
|
nameWithType: DocumentContent
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.#ctor(AnthropicClient.Models.Source)
|
||||||
|
name: DocumentContent(Source)
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent__ctor_AnthropicClient_Models_Source_
|
||||||
|
commentId: M:AnthropicClient.Models.DocumentContent.#ctor(AnthropicClient.Models.Source)
|
||||||
|
name.vb: New(Source)
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.DocumentContent(AnthropicClient.Models.Source)
|
||||||
|
fullName.vb: AnthropicClient.Models.DocumentContent.New(AnthropicClient.Models.Source)
|
||||||
|
nameWithType: DocumentContent.DocumentContent(Source)
|
||||||
|
nameWithType.vb: DocumentContent.New(Source)
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.#ctor(AnthropicClient.Models.Source,AnthropicClient.Models.CacheControl)
|
||||||
|
name: DocumentContent(Source, CacheControl)
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent__ctor_AnthropicClient_Models_Source_AnthropicClient_Models_CacheControl_
|
||||||
|
commentId: M:AnthropicClient.Models.DocumentContent.#ctor(AnthropicClient.Models.Source,AnthropicClient.Models.CacheControl)
|
||||||
|
name.vb: New(Source, CacheControl)
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.DocumentContent(AnthropicClient.Models.Source, AnthropicClient.Models.CacheControl)
|
||||||
|
fullName.vb: AnthropicClient.Models.DocumentContent.New(AnthropicClient.Models.Source, AnthropicClient.Models.CacheControl)
|
||||||
|
nameWithType: DocumentContent.DocumentContent(Source, CacheControl)
|
||||||
|
nameWithType.vb: DocumentContent.New(Source, CacheControl)
|
||||||
- uid: AnthropicClient.Models.DocumentContent.#ctor(System.String,System.String)
|
- uid: AnthropicClient.Models.DocumentContent.#ctor(System.String,System.String)
|
||||||
name: DocumentContent(string, string)
|
name: DocumentContent(string, string)
|
||||||
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent__ctor_System_String_System_String_
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent__ctor_System_String_System_String_
|
||||||
@@ -1625,6 +1998,32 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.DocumentContent.New
|
fullName.vb: AnthropicClient.Models.DocumentContent.New
|
||||||
nameWithType: DocumentContent.DocumentContent
|
nameWithType: DocumentContent.DocumentContent
|
||||||
nameWithType.vb: DocumentContent.New
|
nameWithType.vb: DocumentContent.New
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.Citations
|
||||||
|
name: Citations
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Citations
|
||||||
|
commentId: P:AnthropicClient.Models.DocumentContent.Citations
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.Citations
|
||||||
|
nameWithType: DocumentContent.Citations
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.Citations*
|
||||||
|
name: Citations
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Citations_
|
||||||
|
commentId: Overload:AnthropicClient.Models.DocumentContent.Citations
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.Citations
|
||||||
|
nameWithType: DocumentContent.Citations
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.Context
|
||||||
|
name: Context
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Context
|
||||||
|
commentId: P:AnthropicClient.Models.DocumentContent.Context
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.Context
|
||||||
|
nameWithType: DocumentContent.Context
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.Context*
|
||||||
|
name: Context
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Context_
|
||||||
|
commentId: Overload:AnthropicClient.Models.DocumentContent.Context
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.Context
|
||||||
|
nameWithType: DocumentContent.Context
|
||||||
- uid: AnthropicClient.Models.DocumentContent.Source
|
- uid: AnthropicClient.Models.DocumentContent.Source
|
||||||
name: Source
|
name: Source
|
||||||
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Source
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Source
|
||||||
@@ -1638,6 +2037,19 @@ references:
|
|||||||
isSpec: "True"
|
isSpec: "True"
|
||||||
fullName: AnthropicClient.Models.DocumentContent.Source
|
fullName: AnthropicClient.Models.DocumentContent.Source
|
||||||
nameWithType: DocumentContent.Source
|
nameWithType: DocumentContent.Source
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.Title
|
||||||
|
name: Title
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Title
|
||||||
|
commentId: P:AnthropicClient.Models.DocumentContent.Title
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.Title
|
||||||
|
nameWithType: DocumentContent.Title
|
||||||
|
- uid: AnthropicClient.Models.DocumentContent.Title*
|
||||||
|
name: Title
|
||||||
|
href: api/AnthropicClient.Models.DocumentContent.html#AnthropicClient_Models_DocumentContent_Title_
|
||||||
|
commentId: Overload:AnthropicClient.Models.DocumentContent.Title
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.DocumentContent.Title
|
||||||
|
nameWithType: DocumentContent.Title
|
||||||
- uid: AnthropicClient.Models.DocumentSource
|
- uid: AnthropicClient.Models.DocumentSource
|
||||||
name: DocumentSource
|
name: DocumentSource
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html
|
href: api/AnthropicClient.Models.DocumentSource.html
|
||||||
@@ -1663,45 +2075,6 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.DocumentSource.New
|
fullName.vb: AnthropicClient.Models.DocumentSource.New
|
||||||
nameWithType: DocumentSource.DocumentSource
|
nameWithType: DocumentSource.DocumentSource
|
||||||
nameWithType.vb: DocumentSource.New
|
nameWithType.vb: DocumentSource.New
|
||||||
- uid: AnthropicClient.Models.DocumentSource.Data
|
|
||||||
name: Data
|
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html#AnthropicClient_Models_DocumentSource_Data
|
|
||||||
commentId: P:AnthropicClient.Models.DocumentSource.Data
|
|
||||||
fullName: AnthropicClient.Models.DocumentSource.Data
|
|
||||||
nameWithType: DocumentSource.Data
|
|
||||||
- uid: AnthropicClient.Models.DocumentSource.Data*
|
|
||||||
name: Data
|
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html#AnthropicClient_Models_DocumentSource_Data_
|
|
||||||
commentId: Overload:AnthropicClient.Models.DocumentSource.Data
|
|
||||||
isSpec: "True"
|
|
||||||
fullName: AnthropicClient.Models.DocumentSource.Data
|
|
||||||
nameWithType: DocumentSource.Data
|
|
||||||
- uid: AnthropicClient.Models.DocumentSource.MediaType
|
|
||||||
name: MediaType
|
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html#AnthropicClient_Models_DocumentSource_MediaType
|
|
||||||
commentId: P:AnthropicClient.Models.DocumentSource.MediaType
|
|
||||||
fullName: AnthropicClient.Models.DocumentSource.MediaType
|
|
||||||
nameWithType: DocumentSource.MediaType
|
|
||||||
- uid: AnthropicClient.Models.DocumentSource.MediaType*
|
|
||||||
name: MediaType
|
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html#AnthropicClient_Models_DocumentSource_MediaType_
|
|
||||||
commentId: Overload:AnthropicClient.Models.DocumentSource.MediaType
|
|
||||||
isSpec: "True"
|
|
||||||
fullName: AnthropicClient.Models.DocumentSource.MediaType
|
|
||||||
nameWithType: DocumentSource.MediaType
|
|
||||||
- uid: AnthropicClient.Models.DocumentSource.Type
|
|
||||||
name: Type
|
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html#AnthropicClient_Models_DocumentSource_Type
|
|
||||||
commentId: P:AnthropicClient.Models.DocumentSource.Type
|
|
||||||
fullName: AnthropicClient.Models.DocumentSource.Type
|
|
||||||
nameWithType: DocumentSource.Type
|
|
||||||
- uid: AnthropicClient.Models.DocumentSource.Type*
|
|
||||||
name: Type
|
|
||||||
href: api/AnthropicClient.Models.DocumentSource.html#AnthropicClient_Models_DocumentSource_Type_
|
|
||||||
commentId: Overload:AnthropicClient.Models.DocumentSource.Type
|
|
||||||
isSpec: "True"
|
|
||||||
fullName: AnthropicClient.Models.DocumentSource.Type
|
|
||||||
nameWithType: DocumentSource.Type
|
|
||||||
- uid: AnthropicClient.Models.EphemeralCacheControl
|
- uid: AnthropicClient.Models.EphemeralCacheControl
|
||||||
name: EphemeralCacheControl
|
name: EphemeralCacheControl
|
||||||
href: api/AnthropicClient.Models.EphemeralCacheControl.html
|
href: api/AnthropicClient.Models.EphemeralCacheControl.html
|
||||||
@@ -2283,45 +2656,6 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.ImageSource.New
|
fullName.vb: AnthropicClient.Models.ImageSource.New
|
||||||
nameWithType: ImageSource.ImageSource
|
nameWithType: ImageSource.ImageSource
|
||||||
nameWithType.vb: ImageSource.New
|
nameWithType.vb: ImageSource.New
|
||||||
- uid: AnthropicClient.Models.ImageSource.Data
|
|
||||||
name: Data
|
|
||||||
href: api/AnthropicClient.Models.ImageSource.html#AnthropicClient_Models_ImageSource_Data
|
|
||||||
commentId: P:AnthropicClient.Models.ImageSource.Data
|
|
||||||
fullName: AnthropicClient.Models.ImageSource.Data
|
|
||||||
nameWithType: ImageSource.Data
|
|
||||||
- uid: AnthropicClient.Models.ImageSource.Data*
|
|
||||||
name: Data
|
|
||||||
href: api/AnthropicClient.Models.ImageSource.html#AnthropicClient_Models_ImageSource_Data_
|
|
||||||
commentId: Overload:AnthropicClient.Models.ImageSource.Data
|
|
||||||
isSpec: "True"
|
|
||||||
fullName: AnthropicClient.Models.ImageSource.Data
|
|
||||||
nameWithType: ImageSource.Data
|
|
||||||
- uid: AnthropicClient.Models.ImageSource.MediaType
|
|
||||||
name: MediaType
|
|
||||||
href: api/AnthropicClient.Models.ImageSource.html#AnthropicClient_Models_ImageSource_MediaType
|
|
||||||
commentId: P:AnthropicClient.Models.ImageSource.MediaType
|
|
||||||
fullName: AnthropicClient.Models.ImageSource.MediaType
|
|
||||||
nameWithType: ImageSource.MediaType
|
|
||||||
- uid: AnthropicClient.Models.ImageSource.MediaType*
|
|
||||||
name: MediaType
|
|
||||||
href: api/AnthropicClient.Models.ImageSource.html#AnthropicClient_Models_ImageSource_MediaType_
|
|
||||||
commentId: Overload:AnthropicClient.Models.ImageSource.MediaType
|
|
||||||
isSpec: "True"
|
|
||||||
fullName: AnthropicClient.Models.ImageSource.MediaType
|
|
||||||
nameWithType: ImageSource.MediaType
|
|
||||||
- uid: AnthropicClient.Models.ImageSource.Type
|
|
||||||
name: Type
|
|
||||||
href: api/AnthropicClient.Models.ImageSource.html#AnthropicClient_Models_ImageSource_Type
|
|
||||||
commentId: P:AnthropicClient.Models.ImageSource.Type
|
|
||||||
fullName: AnthropicClient.Models.ImageSource.Type
|
|
||||||
nameWithType: ImageSource.Type
|
|
||||||
- uid: AnthropicClient.Models.ImageSource.Type*
|
|
||||||
name: Type
|
|
||||||
href: api/AnthropicClient.Models.ImageSource.html#AnthropicClient_Models_ImageSource_Type_
|
|
||||||
commentId: Overload:AnthropicClient.Models.ImageSource.Type
|
|
||||||
isSpec: "True"
|
|
||||||
fullName: AnthropicClient.Models.ImageSource.Type
|
|
||||||
nameWithType: ImageSource.Type
|
|
||||||
- uid: AnthropicClient.Models.ImageType
|
- uid: AnthropicClient.Models.ImageType
|
||||||
name: ImageType
|
name: ImageType
|
||||||
href: api/AnthropicClient.Models.ImageType.html
|
href: api/AnthropicClient.Models.ImageType.html
|
||||||
@@ -3510,6 +3844,57 @@ references:
|
|||||||
isSpec: "True"
|
isSpec: "True"
|
||||||
fullName: AnthropicClient.Models.Page.LastId
|
fullName: AnthropicClient.Models.Page.LastId
|
||||||
nameWithType: Page.LastId
|
nameWithType: Page.LastId
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation
|
||||||
|
name: PageLocationCitation
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html
|
||||||
|
commentId: T:AnthropicClient.Models.PageLocationCitation
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation
|
||||||
|
nameWithType: PageLocationCitation
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation.#ctor
|
||||||
|
name: PageLocationCitation()
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html#AnthropicClient_Models_PageLocationCitation__ctor
|
||||||
|
commentId: M:AnthropicClient.Models.PageLocationCitation.#ctor
|
||||||
|
name.vb: New()
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation.PageLocationCitation()
|
||||||
|
fullName.vb: AnthropicClient.Models.PageLocationCitation.New()
|
||||||
|
nameWithType: PageLocationCitation.PageLocationCitation()
|
||||||
|
nameWithType.vb: PageLocationCitation.New()
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation.#ctor*
|
||||||
|
name: PageLocationCitation
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html#AnthropicClient_Models_PageLocationCitation__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.PageLocationCitation.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation.PageLocationCitation
|
||||||
|
fullName.vb: AnthropicClient.Models.PageLocationCitation.New
|
||||||
|
nameWithType: PageLocationCitation.PageLocationCitation
|
||||||
|
nameWithType.vb: PageLocationCitation.New
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation.EndPageNumber
|
||||||
|
name: EndPageNumber
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html#AnthropicClient_Models_PageLocationCitation_EndPageNumber
|
||||||
|
commentId: P:AnthropicClient.Models.PageLocationCitation.EndPageNumber
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation.EndPageNumber
|
||||||
|
nameWithType: PageLocationCitation.EndPageNumber
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation.EndPageNumber*
|
||||||
|
name: EndPageNumber
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html#AnthropicClient_Models_PageLocationCitation_EndPageNumber_
|
||||||
|
commentId: Overload:AnthropicClient.Models.PageLocationCitation.EndPageNumber
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation.EndPageNumber
|
||||||
|
nameWithType: PageLocationCitation.EndPageNumber
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation.StartPageNumber
|
||||||
|
name: StartPageNumber
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html#AnthropicClient_Models_PageLocationCitation_StartPageNumber
|
||||||
|
commentId: P:AnthropicClient.Models.PageLocationCitation.StartPageNumber
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation.StartPageNumber
|
||||||
|
nameWithType: PageLocationCitation.StartPageNumber
|
||||||
|
- uid: AnthropicClient.Models.PageLocationCitation.StartPageNumber*
|
||||||
|
name: StartPageNumber
|
||||||
|
href: api/AnthropicClient.Models.PageLocationCitation.html#AnthropicClient_Models_PageLocationCitation_StartPageNumber_
|
||||||
|
commentId: Overload:AnthropicClient.Models.PageLocationCitation.StartPageNumber
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.PageLocationCitation.StartPageNumber
|
||||||
|
nameWithType: PageLocationCitation.StartPageNumber
|
||||||
- uid: AnthropicClient.Models.Page`1
|
- uid: AnthropicClient.Models.Page`1
|
||||||
name: Page<T>
|
name: Page<T>
|
||||||
href: api/AnthropicClient.Models.Page-1.html
|
href: api/AnthropicClient.Models.Page-1.html
|
||||||
@@ -3688,6 +4073,68 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.RateLimitError.New
|
fullName.vb: AnthropicClient.Models.RateLimitError.New
|
||||||
nameWithType: RateLimitError.RateLimitError
|
nameWithType: RateLimitError.RateLimitError
|
||||||
nameWithType.vb: RateLimitError.New
|
nameWithType.vb: RateLimitError.New
|
||||||
|
- uid: AnthropicClient.Models.Source
|
||||||
|
name: Source
|
||||||
|
href: api/AnthropicClient.Models.Source.html
|
||||||
|
commentId: T:AnthropicClient.Models.Source
|
||||||
|
fullName: AnthropicClient.Models.Source
|
||||||
|
nameWithType: Source
|
||||||
|
- uid: AnthropicClient.Models.Source.#ctor(System.String)
|
||||||
|
name: Source(string)
|
||||||
|
href: api/AnthropicClient.Models.Source.html#AnthropicClient_Models_Source__ctor_System_String_
|
||||||
|
commentId: M:AnthropicClient.Models.Source.#ctor(System.String)
|
||||||
|
name.vb: New(String)
|
||||||
|
fullName: AnthropicClient.Models.Source.Source(string)
|
||||||
|
fullName.vb: AnthropicClient.Models.Source.New(String)
|
||||||
|
nameWithType: Source.Source(string)
|
||||||
|
nameWithType.vb: Source.New(String)
|
||||||
|
- uid: AnthropicClient.Models.Source.#ctor*
|
||||||
|
name: Source
|
||||||
|
href: api/AnthropicClient.Models.Source.html#AnthropicClient_Models_Source__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Source.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.Source.Source
|
||||||
|
fullName.vb: AnthropicClient.Models.Source.New
|
||||||
|
nameWithType: Source.Source
|
||||||
|
nameWithType.vb: Source.New
|
||||||
|
- uid: AnthropicClient.Models.Source.Type
|
||||||
|
name: Type
|
||||||
|
href: api/AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type
|
||||||
|
commentId: P:AnthropicClient.Models.Source.Type
|
||||||
|
fullName: AnthropicClient.Models.Source.Type
|
||||||
|
nameWithType: Source.Type
|
||||||
|
- uid: AnthropicClient.Models.Source.Type*
|
||||||
|
name: Type
|
||||||
|
href: api/AnthropicClient.Models.Source.html#AnthropicClient_Models_Source_Type_
|
||||||
|
commentId: Overload:AnthropicClient.Models.Source.Type
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.Source.Type
|
||||||
|
nameWithType: Source.Type
|
||||||
|
- uid: AnthropicClient.Models.SourceType
|
||||||
|
name: SourceType
|
||||||
|
href: api/AnthropicClient.Models.SourceType.html
|
||||||
|
commentId: T:AnthropicClient.Models.SourceType
|
||||||
|
fullName: AnthropicClient.Models.SourceType
|
||||||
|
nameWithType: SourceType
|
||||||
|
- uid: AnthropicClient.Models.SourceType.Base64
|
||||||
|
name: Base64
|
||||||
|
href: api/AnthropicClient.Models.SourceType.html#AnthropicClient_Models_SourceType_Base64
|
||||||
|
commentId: F:AnthropicClient.Models.SourceType.Base64
|
||||||
|
fullName: AnthropicClient.Models.SourceType.Base64
|
||||||
|
nameWithType: SourceType.Base64
|
||||||
|
- uid: AnthropicClient.Models.SourceType.Content
|
||||||
|
name: Content
|
||||||
|
href: api/AnthropicClient.Models.SourceType.html#AnthropicClient_Models_SourceType_Content
|
||||||
|
commentId: F:AnthropicClient.Models.SourceType.Content
|
||||||
|
fullName: AnthropicClient.Models.SourceType.Content
|
||||||
|
nameWithType: SourceType.Content
|
||||||
|
- uid: AnthropicClient.Models.SourceType.Text
|
||||||
|
name: Text
|
||||||
|
href: api/AnthropicClient.Models.SourceType.html#AnthropicClient_Models_SourceType_Text
|
||||||
|
commentId: F:AnthropicClient.Models.SourceType.Text
|
||||||
|
fullName: AnthropicClient.Models.SourceType.Text
|
||||||
|
nameWithType: SourceType.Text
|
||||||
- uid: AnthropicClient.Models.SpecificToolChoice
|
- uid: AnthropicClient.Models.SpecificToolChoice
|
||||||
name: SpecificToolChoice
|
name: SpecificToolChoice
|
||||||
href: api/AnthropicClient.Models.SpecificToolChoice.html
|
href: api/AnthropicClient.Models.SpecificToolChoice.html
|
||||||
@@ -3853,6 +4300,19 @@ references:
|
|||||||
fullName.vb: AnthropicClient.Models.TextContent.New
|
fullName.vb: AnthropicClient.Models.TextContent.New
|
||||||
nameWithType: TextContent.TextContent
|
nameWithType: TextContent.TextContent
|
||||||
nameWithType.vb: TextContent.New
|
nameWithType.vb: TextContent.New
|
||||||
|
- uid: AnthropicClient.Models.TextContent.Citations
|
||||||
|
name: Citations
|
||||||
|
href: api/AnthropicClient.Models.TextContent.html#AnthropicClient_Models_TextContent_Citations
|
||||||
|
commentId: P:AnthropicClient.Models.TextContent.Citations
|
||||||
|
fullName: AnthropicClient.Models.TextContent.Citations
|
||||||
|
nameWithType: TextContent.Citations
|
||||||
|
- uid: AnthropicClient.Models.TextContent.Citations*
|
||||||
|
name: Citations
|
||||||
|
href: api/AnthropicClient.Models.TextContent.html#AnthropicClient_Models_TextContent_Citations_
|
||||||
|
commentId: Overload:AnthropicClient.Models.TextContent.Citations
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.TextContent.Citations
|
||||||
|
nameWithType: TextContent.Citations
|
||||||
- uid: AnthropicClient.Models.TextContent.Text
|
- uid: AnthropicClient.Models.TextContent.Text
|
||||||
name: Text
|
name: Text
|
||||||
href: api/AnthropicClient.Models.TextContent.html#AnthropicClient_Models_TextContent_Text
|
href: api/AnthropicClient.Models.TextContent.html#AnthropicClient_Models_TextContent_Text
|
||||||
@@ -3904,6 +4364,57 @@ references:
|
|||||||
isSpec: "True"
|
isSpec: "True"
|
||||||
fullName: AnthropicClient.Models.TextDelta.Text
|
fullName: AnthropicClient.Models.TextDelta.Text
|
||||||
nameWithType: TextDelta.Text
|
nameWithType: TextDelta.Text
|
||||||
|
- uid: AnthropicClient.Models.TextSource
|
||||||
|
name: TextSource
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html
|
||||||
|
commentId: T:AnthropicClient.Models.TextSource
|
||||||
|
fullName: AnthropicClient.Models.TextSource
|
||||||
|
nameWithType: TextSource
|
||||||
|
- uid: AnthropicClient.Models.TextSource.#ctor(System.String)
|
||||||
|
name: TextSource(string)
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html#AnthropicClient_Models_TextSource__ctor_System_String_
|
||||||
|
commentId: M:AnthropicClient.Models.TextSource.#ctor(System.String)
|
||||||
|
name.vb: New(String)
|
||||||
|
fullName: AnthropicClient.Models.TextSource.TextSource(string)
|
||||||
|
fullName.vb: AnthropicClient.Models.TextSource.New(String)
|
||||||
|
nameWithType: TextSource.TextSource(string)
|
||||||
|
nameWithType.vb: TextSource.New(String)
|
||||||
|
- uid: AnthropicClient.Models.TextSource.#ctor*
|
||||||
|
name: TextSource
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html#AnthropicClient_Models_TextSource__ctor_
|
||||||
|
commentId: Overload:AnthropicClient.Models.TextSource.#ctor
|
||||||
|
isSpec: "True"
|
||||||
|
name.vb: New
|
||||||
|
fullName: AnthropicClient.Models.TextSource.TextSource
|
||||||
|
fullName.vb: AnthropicClient.Models.TextSource.New
|
||||||
|
nameWithType: TextSource.TextSource
|
||||||
|
nameWithType.vb: TextSource.New
|
||||||
|
- uid: AnthropicClient.Models.TextSource.Data
|
||||||
|
name: Data
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html#AnthropicClient_Models_TextSource_Data
|
||||||
|
commentId: P:AnthropicClient.Models.TextSource.Data
|
||||||
|
fullName: AnthropicClient.Models.TextSource.Data
|
||||||
|
nameWithType: TextSource.Data
|
||||||
|
- uid: AnthropicClient.Models.TextSource.Data*
|
||||||
|
name: Data
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html#AnthropicClient_Models_TextSource_Data_
|
||||||
|
commentId: Overload:AnthropicClient.Models.TextSource.Data
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.TextSource.Data
|
||||||
|
nameWithType: TextSource.Data
|
||||||
|
- uid: AnthropicClient.Models.TextSource.MediaType
|
||||||
|
name: MediaType
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html#AnthropicClient_Models_TextSource_MediaType
|
||||||
|
commentId: P:AnthropicClient.Models.TextSource.MediaType
|
||||||
|
fullName: AnthropicClient.Models.TextSource.MediaType
|
||||||
|
nameWithType: TextSource.MediaType
|
||||||
|
- uid: AnthropicClient.Models.TextSource.MediaType*
|
||||||
|
name: MediaType
|
||||||
|
href: api/AnthropicClient.Models.TextSource.html#AnthropicClient_Models_TextSource_MediaType_
|
||||||
|
commentId: Overload:AnthropicClient.Models.TextSource.MediaType
|
||||||
|
isSpec: "True"
|
||||||
|
fullName: AnthropicClient.Models.TextSource.MediaType
|
||||||
|
nameWithType: TextSource.MediaType
|
||||||
- uid: AnthropicClient.Models.TokenCountResponse
|
- uid: AnthropicClient.Models.TokenCountResponse
|
||||||
name: TokenCountResponse
|
name: TokenCountResponse
|
||||||
href: api/AnthropicClient.Models.TokenCountResponse.html
|
href: api/AnthropicClient.Models.TokenCountResponse.html
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class AnthropicApiClient : IAnthropicApiClient
|
|||||||
private string CountTokensEndpoint => $"{MessagesEndpoint}/count_tokens";
|
private string CountTokensEndpoint => $"{MessagesEndpoint}/count_tokens";
|
||||||
private string MessageBatchesEndpoint => $"{MessagesEndpoint}/batches";
|
private string MessageBatchesEndpoint => $"{MessagesEndpoint}/batches";
|
||||||
private const string ModelsEndpoint = "models";
|
private const string ModelsEndpoint = "models";
|
||||||
|
private const string FilesEndpoint = "files";
|
||||||
private const string JsonContentType = "application/json";
|
private const string JsonContentType = "application/json";
|
||||||
private const string EventPrefix = "event:";
|
private const string EventPrefix = "event:";
|
||||||
private const string DataPrefix = "data:";
|
private const string DataPrefix = "data:";
|
||||||
@@ -380,6 +381,64 @@ public class AnthropicApiClient : IAnthropicApiClient
|
|||||||
return await CreateResultAsync<AnthropicModel>(response);
|
return await CreateResultAsync<AnthropicModel>(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<AnthropicResult<AnthropicFile>> CreateFileAsync(CreateFileRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
var response = await SendFileRequestAsync(FilesEndpoint, request, cancellationToken);
|
||||||
|
return await CreateResultAsync<AnthropicFile>(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<AnthropicResult<Page<AnthropicFile>>> ListFilesAsync(PagingRequest? request = null, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
var pagingRequest = request ?? new PagingRequest();
|
||||||
|
var endpoint = $"{FilesEndpoint}?{pagingRequest.ToQueryParameters()}";
|
||||||
|
var response = await SendRequestAsync(endpoint, cancellationToken: cancellationToken);
|
||||||
|
return await CreateResultAsync<Page<AnthropicFile>>(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async IAsyncEnumerable<AnthropicResult<Page<AnthropicFile>>> ListAllFilesAsync(int limit = 20, [EnumeratorCancellation] CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
await foreach (var result in GetAllPagesAsync<AnthropicFile>(FilesEndpoint, limit, cancellationToken))
|
||||||
|
{
|
||||||
|
yield return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<AnthropicResult<AnthropicFile>> GetFileInfoAsync(string fileId, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
var endpoint = $"{FilesEndpoint}/{fileId}";
|
||||||
|
var response = await SendRequestAsync(endpoint, cancellationToken: cancellationToken);
|
||||||
|
return await CreateResultAsync<AnthropicFile>(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<AnthropicResult<Stream>> GetFileAsync(string fileId, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
var endpoint = $"{FilesEndpoint}/{fileId}/content";
|
||||||
|
var response = await SendRequestAsync(endpoint, cancellationToken: cancellationToken);
|
||||||
|
|
||||||
|
if (response.IsSuccessStatusCode is false)
|
||||||
|
{
|
||||||
|
var content = await response.Content.ReadAsStringAsync();
|
||||||
|
var error = Deserialize<AnthropicError>(content) ?? new AnthropicError();
|
||||||
|
return AnthropicResult<Stream>.Failure(error, new AnthropicHeaders(response.Headers));
|
||||||
|
}
|
||||||
|
|
||||||
|
var stream = await response.Content.ReadAsStreamAsync();
|
||||||
|
return AnthropicResult<Stream>.Success(stream, new AnthropicHeaders(response.Headers));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public async Task<AnthropicResult<AnthropicFileDeleteResponse>> DeleteFileAsync(string fileId, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
var endpoint = $"{FilesEndpoint}/{fileId}";
|
||||||
|
var response = await SendRequestAsync(endpoint, HttpMethod.Delete, cancellationToken);
|
||||||
|
return await CreateResultAsync<AnthropicFileDeleteResponse>(response);
|
||||||
|
}
|
||||||
|
|
||||||
private async IAsyncEnumerable<AnthropicResult<Page<T>>> GetAllPagesAsync<T>(string endpoint, int limit = 20, [EnumeratorCancellation] CancellationToken cancellationToken = default)
|
private async IAsyncEnumerable<AnthropicResult<Page<T>>> GetAllPagesAsync<T>(string endpoint, int limit = 20, [EnumeratorCancellation] CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
var pagingRequest = new PagingRequest(limit: limit);
|
var pagingRequest = new PagingRequest(limit: limit);
|
||||||
@@ -462,6 +521,17 @@ public class AnthropicApiClient : IAnthropicApiClient
|
|||||||
return await _httpClient.PostAsync(endpoint, requestContent, cancellationToken);
|
return await _httpClient.PostAsync(endpoint, requestContent, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task<HttpResponseMessage> SendFileRequestAsync(string endpoint, CreateFileRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
using var multipartContent = new MultipartFormDataContent();
|
||||||
|
|
||||||
|
using var fileContent = new ByteArrayContent(request.File);
|
||||||
|
fileContent.Headers.ContentType = new MediaTypeHeaderValue(request.FileType);
|
||||||
|
multipartContent.Add(fileContent, "file", request.FileName);
|
||||||
|
|
||||||
|
return await _httpClient.PostAsync(endpoint, multipartContent, cancellationToken);
|
||||||
|
}
|
||||||
|
|
||||||
private string Serialize<T>(T obj) => JsonSerializer.Serialize(obj, JsonSerializationOptions.DefaultOptions);
|
private string Serialize<T>(T obj) => JsonSerializer.Serialize(obj, JsonSerializationOptions.DefaultOptions);
|
||||||
private T? Deserialize<T>(string json) => JsonSerializer.Deserialize<T>(json, JsonSerializationOptions.DefaultOptions);
|
private T? Deserialize<T>(string json) => JsonSerializer.Deserialize<T>(json, JsonSerializationOptions.DefaultOptions);
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
<PackageId>AnthropicClient</PackageId>
|
<PackageId>AnthropicClient</PackageId>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.1.0</Version>
|
||||||
<Authors>Stevan Freeborn</Authors>
|
<Authors>Stevan Freeborn</Authors>
|
||||||
<Description>Anthropic Client Library</Description>
|
<Description>Anthropic Client Library</Description>
|
||||||
<PackageProjectUrl>https://anthropicclient.stevanfreeborn.com/</PackageProjectUrl>
|
<PackageProjectUrl>https://anthropicclient.stevanfreeborn.com/</PackageProjectUrl>
|
||||||
|
|||||||
@@ -2,6 +2,23 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [versionize](https://github.com/versionize/versionize) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [versionize](https://github.com/versionize/versionize) for commit guidelines.
|
||||||
|
|
||||||
|
<a name="1.1.0"></a>
|
||||||
|
## [1.1.0](https://www.github.com/StevanFreeborn/anthropic-client/releases/tag/v1.1.0) (2025-07-15)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add missing model constants ([b859859](https://www.github.com/StevanFreeborn/anthropic-client/commit/b8598595484739027bdd83cd8cdfe122ad3cb9cf))
|
||||||
|
* add support for file source and url source ([1f83899](https://www.github.com/StevanFreeborn/anthropic-client/commit/1f83899eb88b9ee9d87d246158defd7cbde9b01e))
|
||||||
|
* implement `GetFileInfoAsync`, `GetFileAsync`, and `DeleteFileAsync` ([d1e88a5](https://www.github.com/StevanFreeborn/anthropic-client/commit/d1e88a52ace603a5c017cca3bf48953846d7b271))
|
||||||
|
* implement list all files method ([9cb8443](https://www.github.com/StevanFreeborn/anthropic-client/commit/9cb8443f94d2086192700aeb1f2dc977a86cb752))
|
||||||
|
* implement listing a page of files ([9d5c620](https://www.github.com/StevanFreeborn/anthropic-client/commit/9d5c6201674bfb0923a0b0d70530286980ebdf62))
|
||||||
|
* initial implementation of creating a file via the Files API ([e674b9a](https://www.github.com/StevanFreeborn/anthropic-client/commit/e674b9afe693143841a168c8356ef93079445db0))
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove unnecessary usings ([1cad19d](https://www.github.com/StevanFreeborn/anthropic-client/commit/1cad19d9c6c4418fef3c206f700ca14b7d250e26))
|
||||||
|
* use sync copy to method ([b48baff](https://www.github.com/StevanFreeborn/anthropic-client/commit/b48baffb60a8acc8b89a60e53589bc04362a9505))
|
||||||
|
|
||||||
<a name="1.0.0"></a>
|
<a name="1.0.0"></a>
|
||||||
## [1.0.0](https://www.github.com/StevanFreeborn/anthropic-client/releases/tag/v1.0.0) (2025-07-09)
|
## [1.0.0](https://www.github.com/StevanFreeborn/anthropic-client/releases/tag/v1.0.0) (2025-07-09)
|
||||||
|
|
||||||
|
|||||||
@@ -111,4 +111,53 @@ public interface IAnthropicApiClient
|
|||||||
/// <param name="cancellationToken">A token to cancel the asynchronous operation.</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>
|
/// <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);
|
Task<AnthropicResult<AnthropicModel>> GetModelAsync(string modelId, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a file asynchronously using the Files API.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">The file creation 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="AnthropicFile"/>.</returns>
|
||||||
|
Task<AnthropicResult<AnthropicFile>> CreateFileAsync(CreateFileRequest request, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lists files asynchronously, returning a single page of results.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">The paging request to use for listing the files.</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="AnthropicFile"/>.</returns>
|
||||||
|
Task<AnthropicResult<Page<AnthropicFile>>> ListFilesAsync(PagingRequest? request = null, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Lists all files asynchronously, returning every page of results.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="limit">The maximum number of files 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="AnthropicFile"/>.</returns>
|
||||||
|
IAsyncEnumerable<AnthropicResult<Page<AnthropicFile>>> ListAllFilesAsync(int limit = 20, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a file's metadata by its ID asynchronously.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileId">The ID of the file 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="AnthropicFile"/>.</returns>
|
||||||
|
Task<AnthropicResult<AnthropicFile>> GetFileInfoAsync(string fileId, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets a file's content by its ID asynchronously.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileId">The ID of the file to get the content 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 a stream containing the file content.</returns>
|
||||||
|
Task<AnthropicResult<Stream>> GetFileAsync(string fileId, CancellationToken cancellationToken = default);
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Deletes a file by its ID asynchronously.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fileId">The ID of the file 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="AnthropicFileDeleteResponse"/>.</returns>
|
||||||
|
Task<AnthropicResult<AnthropicFileDeleteResponse>> DeleteFileAsync(string fileId, CancellationToken cancellationToken = default);
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,8 @@ class SourceConverter : JsonConverter<Source>
|
|||||||
{
|
{
|
||||||
SourceType.Text => JsonSerializer.Deserialize<TextSource>(root.GetRawText(), options)!,
|
SourceType.Text => JsonSerializer.Deserialize<TextSource>(root.GetRawText(), options)!,
|
||||||
SourceType.Content => JsonSerializer.Deserialize<CustomSource>(root.GetRawText(), options)!,
|
SourceType.Content => JsonSerializer.Deserialize<CustomSource>(root.GetRawText(), options)!,
|
||||||
|
SourceType.File => JsonSerializer.Deserialize<FileSource>(root.GetRawText(), options)!,
|
||||||
|
SourceType.Url => JsonSerializer.Deserialize<UrlSource>(root.GetRawText(), options)!,
|
||||||
SourceType.Base64 => DeserializeBase64Source(root, options),
|
SourceType.Base64 => DeserializeBase64Source(root, options),
|
||||||
_ => throw new JsonException($"Unknown source type: {type}")
|
_ => throw new JsonException($"Unknown source type: {type}")
|
||||||
};
|
};
|
||||||
@@ -54,6 +56,18 @@ class SourceConverter : JsonConverter<Source>
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (value is FileSource fileSource)
|
||||||
|
{
|
||||||
|
JsonSerializer.Serialize(writer, fileSource, options);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value is UrlSource urlSource)
|
||||||
|
{
|
||||||
|
JsonSerializer.Serialize(writer, urlSource, options);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
JsonSerializer.Serialize(writer, value, value.GetType(), options);
|
JsonSerializer.Serialize(writer, value, value.GetType(), options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a file object from the Anthropic Files API.
|
||||||
|
/// </summary>
|
||||||
|
public class AnthropicFile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Unique object identifier.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("id")]
|
||||||
|
public string Id { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Object type.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("type")]
|
||||||
|
public string Type { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Original filename of the uploaded file.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("filename")]
|
||||||
|
public string Name { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Date file was created.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("created_at")]
|
||||||
|
public DateTimeOffset CreatedAt { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Size of the file in bytes.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("size_bytes")]
|
||||||
|
public long Size { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MIME type of the file.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("mime_type")]
|
||||||
|
public string MimeType { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the file can be downloaded.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("downloadable")]
|
||||||
|
public bool Downloadable { get; init; }
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the response from deleting a file in the Anthropic API.
|
||||||
|
/// </summary>
|
||||||
|
public class AnthropicFileDeleteResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the ID of the file that was deleted.
|
||||||
|
/// </summary>
|
||||||
|
public string Id { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the response type
|
||||||
|
/// </summary>
|
||||||
|
public string Type { get; init; } = string.Empty;
|
||||||
|
}
|
||||||
@@ -20,6 +20,16 @@ public static class AnthropicModels
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string Claude3OpusLatest = "claude-3-opus-latest";
|
public const string Claude3OpusLatest = "claude-3-opus-latest";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Claude 4 Opus model.
|
||||||
|
/// </summary>
|
||||||
|
public const string ClaudeOpus420250514 = "claude-opus-4-20250514";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Claude 4 Opus model.
|
||||||
|
/// </summary>
|
||||||
|
public const string ClaudeOpus40 = "claude-opus-4-0";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Claude 3 Sonnet model.
|
/// The Claude 3 Sonnet model.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -50,6 +60,26 @@ public static class AnthropicModels
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string Claude35SonnetLatest = "claude-3-5-sonnet-latest";
|
public const string Claude35SonnetLatest = "claude-3-5-sonnet-latest";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Claude 3 Sonnet model
|
||||||
|
/// </summary>
|
||||||
|
public const string Claude37Sonnet20250219 = "claude-3-7-sonnet-20250219";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Claude 3 Sonnet model
|
||||||
|
/// </summary>
|
||||||
|
public const string Claude37SonnetLatest = "claude-3-7-sonnet-latest";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Claude 4 Sonnet model.
|
||||||
|
/// </summary>
|
||||||
|
public const string ClaudeSonnet420250514 = "claude-sonnet-4-20250514";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The Claude 4 Sonnet model.
|
||||||
|
/// </summary>
|
||||||
|
public const string ClaudeSonnet40 = "claude-sonnet-4-0";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The Claude 3 Haiku model.
|
/// The Claude 3 Haiku model.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
using AnthropicClient.Utils;
|
||||||
|
|
||||||
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a request to create a file via the Anthropic Files API.
|
||||||
|
/// </summary>
|
||||||
|
public class CreateFileRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The file content as a byte array.
|
||||||
|
/// </summary>
|
||||||
|
public byte[] File { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The original filename of the file being uploaded.
|
||||||
|
/// </summary>
|
||||||
|
public string FileName { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The MIME type of the file.
|
||||||
|
/// </summary>
|
||||||
|
public string FileType { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CreateFileRequest"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="file">The file content as a byte array.</param>
|
||||||
|
/// <param name="fileName">The original filename of the file being uploaded.</param>
|
||||||
|
/// <param name="fileType">The MIME type of the file.</param>
|
||||||
|
/// <exception cref="ArgumentNullException">Thrown when <paramref name="file"/> is null.</exception>
|
||||||
|
/// <exception cref="ArgumentException">Thrown when <paramref name="fileName"/> or <paramref name="fileType"/> is null or whitespace.</exception>
|
||||||
|
public CreateFileRequest(byte[] file, string fileName, string fileType)
|
||||||
|
{
|
||||||
|
ArgumentValidator.ThrowIfNull(file, nameof(file));
|
||||||
|
ArgumentValidator.ThrowIfNullOrWhitespace(fileName, nameof(fileName));
|
||||||
|
ArgumentValidator.ThrowIfNullOrWhitespace(fileType, nameof(fileType));
|
||||||
|
|
||||||
|
File = file;
|
||||||
|
FileName = fileName;
|
||||||
|
FileType = fileType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="CreateFileRequest"/> class from a stream.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stream">The stream containing the file content.</param>
|
||||||
|
/// <param name="fileName">The original filename of the file being uploaded.</param>
|
||||||
|
/// <param name="fileType">The MIME type of the file.</param>
|
||||||
|
/// <exception cref="ArgumentNullException">Thrown when <paramref name="stream"/> is null.</exception>
|
||||||
|
/// <exception cref="ArgumentException">Thrown when <paramref name="fileName"/> or <paramref name="fileType"/> is null or whitespace.</exception>
|
||||||
|
public CreateFileRequest(Stream stream, string fileName, string fileType)
|
||||||
|
{
|
||||||
|
ArgumentValidator.ThrowIfNull(stream, nameof(stream));
|
||||||
|
ArgumentValidator.ThrowIfNullOrWhitespace(fileName, nameof(fileName));
|
||||||
|
ArgumentValidator.ThrowIfNullOrWhitespace(fileType, nameof(fileType));
|
||||||
|
|
||||||
|
using var memoryStream = new MemoryStream();
|
||||||
|
stream.CopyTo(memoryStream);
|
||||||
|
var fileContent = memoryStream.ToArray();
|
||||||
|
|
||||||
|
File = fileContent;
|
||||||
|
FileName = fileName;
|
||||||
|
FileType = fileType;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
using AnthropicClient.Utils;
|
|
||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a file source in the Anthropic API.
|
||||||
|
/// </summary>
|
||||||
|
public class FileSource : Source
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the unique identifier for the file source.
|
||||||
|
/// </summary>
|
||||||
|
[JsonPropertyName("file_id")]
|
||||||
|
public string Id { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="FileSource"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A new instance of <see cref="FileSource"/> with the type set to "file".</returns>
|
||||||
|
public FileSource() : base(SourceType.File)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="FileSource"/> class with a specified file ID.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id">The unique identifier for the file source.</param>
|
||||||
|
/// <returns>A new instance of <see cref="FileSource"/>.</returns>
|
||||||
|
public FileSource(string id) : base(SourceType.File)
|
||||||
|
{
|
||||||
|
Id = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -53,4 +53,32 @@ public class ImageContent : Content
|
|||||||
|
|
||||||
Source = new ImageSource(mediaType, data);
|
Source = new ImageSource(mediaType, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ImageContent"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source">The source of the image.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ImageContent"/> class.</returns>
|
||||||
|
/// <exception cref="ArgumentNullException">Thrown when the source is null.</exception>
|
||||||
|
public ImageContent(Source source) : base(ContentType.Image)
|
||||||
|
{
|
||||||
|
ArgumentValidator.ThrowIfNull(source, nameof(source));
|
||||||
|
|
||||||
|
Source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ImageContent"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="source">The source of the image.</param>
|
||||||
|
/// <param name="cacheControl">The cache control to be used for the content.</param>
|
||||||
|
/// <returns>A new instance of the <see cref="ImageContent"/> class.</returns>
|
||||||
|
/// <exception cref="ArgumentNullException">Thrown when the source or cache control is null.</exception>
|
||||||
|
public ImageContent(Source source, CacheControl cacheControl) : base(ContentType.Image, cacheControl)
|
||||||
|
{
|
||||||
|
ArgumentValidator.ThrowIfNull(source, nameof(source));
|
||||||
|
ArgumentValidator.ThrowIfNull(cacheControl, nameof(cacheControl));
|
||||||
|
|
||||||
|
Source = source;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
using AnthropicClient.Utils;
|
|
||||||
|
|
||||||
namespace AnthropicClient.Models;
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -19,4 +19,14 @@ public static class SourceType
|
|||||||
/// The text document source type.
|
/// The text document source type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string Text = "text";
|
public const string Text = "text";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The file document source type.
|
||||||
|
/// </summary>
|
||||||
|
public const string File = "file";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The URL document source type.
|
||||||
|
/// </summary>
|
||||||
|
public const string Url = "url";
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
namespace AnthropicClient.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a URL source in the Anthropic API.
|
||||||
|
/// </summary>
|
||||||
|
public class UrlSource : Source
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the URL of the source document.
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; init; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="UrlSource"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A new instance of <see cref="UrlSource"/> with the type set to "url".</returns>
|
||||||
|
public UrlSource() : base(SourceType.Url)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="UrlSource"/> class with a specified URL.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="url">The URL of the source document.</param>
|
||||||
|
/// <returns>A new instance of <see cref="UrlSource"/>.</returns>
|
||||||
|
public UrlSource(string url) : base(SourceType.Url)
|
||||||
|
{
|
||||||
|
Url = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,8 +2,15 @@ using AnthropicClient.Tests.Files;
|
|||||||
|
|
||||||
namespace AnthropicClient.Tests.EndToEnd;
|
namespace AnthropicClient.Tests.EndToEnd;
|
||||||
|
|
||||||
public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndToEndTest(configFixture)
|
public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndToEndTest(configFixture), IAsyncLifetime
|
||||||
{
|
{
|
||||||
|
private readonly List<string> _filesToDelete = [];
|
||||||
|
|
||||||
|
public Task InitializeAsync()
|
||||||
|
{
|
||||||
|
return Task.CompletedTask;
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task CreateMessageAsync_WhenCalled_ItShouldReturnResponse()
|
public async Task CreateMessageAsync_WhenCalled_ItShouldReturnResponse()
|
||||||
{
|
{
|
||||||
@@ -96,11 +103,41 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
text.Should().Contain("elephant");
|
text.Should().Contain("elephant");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task CreateMessageAsync_WhenImageIsSentAsUrl_ItShouldReturnResponse()
|
||||||
|
{
|
||||||
|
var request = new MessageRequest(
|
||||||
|
model: AnthropicModels.Claude3Haiku,
|
||||||
|
messages: [
|
||||||
|
new(MessageRole.User, [
|
||||||
|
new ImageContent(new UrlSource("https://ftp.stevanfreeborn.com/share/anthropic-client/ant.jpg")),
|
||||||
|
new TextContent("What is in this image?")
|
||||||
|
]),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<MessageResponse>();
|
||||||
|
result.Value.Content.Should().NotBeNullOrEmpty();
|
||||||
|
|
||||||
|
var text = result.Value.Content.Aggregate("", static (acc, content) =>
|
||||||
|
{
|
||||||
|
if (content is TextContent textContent)
|
||||||
|
{
|
||||||
|
acc += textContent.Text;
|
||||||
|
}
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
});
|
||||||
|
|
||||||
|
text.Should().Contain("ant");
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task CreateMessageAsync_WhenSystemMessagesContainCacheControl_ItShouldUseCache()
|
public async Task CreateMessageAsync_WhenSystemMessagesContainCacheControl_ItShouldUseCache()
|
||||||
{
|
{
|
||||||
var client = CreateClient(new HttpClient());
|
|
||||||
|
|
||||||
var storyPath = TestFileHelper.GetTestFilePath("story.txt");
|
var storyPath = TestFileHelper.GetTestFilePath("story.txt");
|
||||||
var storyText = await File.ReadAllTextAsync(storyPath);
|
var storyText = await File.ReadAllTextAsync(storyPath);
|
||||||
|
|
||||||
@@ -127,7 +164,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
||||||
request.Messages.Add(new(MessageRole.User, [new TextContent("What is the main theme of this story?")]));
|
request.Messages.Add(new(MessageRole.User, [new TextContent("What is the main theme of this story?")]));
|
||||||
|
|
||||||
var resultTwo = await client.CreateMessageAsync(request);
|
var resultTwo = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultTwo.IsSuccess.Should().BeTrue();
|
resultTwo.IsSuccess.Should().BeTrue();
|
||||||
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -138,8 +175,6 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task CreateMessageAsync_WhenMessagesContainCacheControl_ItShouldUseCache()
|
public async Task CreateMessageAsync_WhenMessagesContainCacheControl_ItShouldUseCache()
|
||||||
{
|
{
|
||||||
var client = CreateClient(new HttpClient());
|
|
||||||
|
|
||||||
var storyPath = TestFileHelper.GetTestFilePath("story.txt");
|
var storyPath = TestFileHelper.GetTestFilePath("story.txt");
|
||||||
var storyText = await File.ReadAllTextAsync(storyPath);
|
var storyText = await File.ReadAllTextAsync(storyPath);
|
||||||
|
|
||||||
@@ -153,7 +188,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
var resultOne = await client.CreateMessageAsync(request);
|
var resultOne = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultOne.IsSuccess.Should().BeTrue();
|
resultOne.IsSuccess.Should().BeTrue();
|
||||||
resultOne.Value.Should().BeOfType<MessageResponse>();
|
resultOne.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -163,7 +198,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
||||||
request.Messages.Add(new(MessageRole.User, [new TextContent("What is the main theme of this story?")]));
|
request.Messages.Add(new(MessageRole.User, [new TextContent("What is the main theme of this story?")]));
|
||||||
|
|
||||||
var resultTwo = await client.CreateMessageAsync(request);
|
var resultTwo = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultTwo.IsSuccess.Should().BeTrue();
|
resultTwo.IsSuccess.Should().BeTrue();
|
||||||
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -174,8 +209,6 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
[Fact]
|
[Fact]
|
||||||
public async Task CreateMessageAsync_WhenToolsContainCacheControl_ItShouldUseCache()
|
public async Task CreateMessageAsync_WhenToolsContainCacheControl_ItShouldUseCache()
|
||||||
{
|
{
|
||||||
var client = CreateClient(new HttpClient());
|
|
||||||
|
|
||||||
var func = (string ticker) => ticker;
|
var func = (string ticker) => ticker;
|
||||||
|
|
||||||
var tools = Enumerable
|
var tools = Enumerable
|
||||||
@@ -195,7 +228,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
tools: tools
|
tools: tools
|
||||||
);
|
);
|
||||||
|
|
||||||
var resultOne = await client.CreateMessageAsync(request);
|
var resultOne = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultOne.IsSuccess.Should().BeTrue();
|
resultOne.IsSuccess.Should().BeTrue();
|
||||||
resultOne.Value.Should().BeOfType<MessageResponse>();
|
resultOne.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -205,7 +238,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
||||||
request.Messages.Add(new(MessageRole.User, [new TextContent("Could you tell me the stock price for AAPL?")]));
|
request.Messages.Add(new(MessageRole.User, [new TextContent("Could you tell me the stock price for AAPL?")]));
|
||||||
|
|
||||||
var resultTwo = await client.CreateMessageAsync(request);
|
var resultTwo = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultTwo.IsSuccess.Should().BeTrue();
|
resultTwo.IsSuccess.Should().BeTrue();
|
||||||
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -228,9 +261,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
var client = CreateClient(new HttpClient());
|
var result = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
var result = await client.CreateMessageAsync(request);
|
|
||||||
|
|
||||||
result.IsSuccess.Should().BeTrue();
|
result.IsSuccess.Should().BeTrue();
|
||||||
result.Value.Should().BeOfType<MessageResponse>();
|
result.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -256,8 +287,6 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
var bytes = await File.ReadAllBytesAsync(pdfPath);
|
var bytes = await File.ReadAllBytesAsync(pdfPath);
|
||||||
var base64Data = Convert.ToBase64String(bytes);
|
var base64Data = Convert.ToBase64String(bytes);
|
||||||
|
|
||||||
var client = CreateClient(new HttpClient());
|
|
||||||
|
|
||||||
var request = new MessageRequest(
|
var request = new MessageRequest(
|
||||||
model: AnthropicModels.Claude35Sonnet,
|
model: AnthropicModels.Claude35Sonnet,
|
||||||
messages: [
|
messages: [
|
||||||
@@ -268,7 +297,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
var resultOne = await client.CreateMessageAsync(request);
|
var resultOne = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultOne.IsSuccess.Should().BeTrue();
|
resultOne.IsSuccess.Should().BeTrue();
|
||||||
resultOne.Value.Should().BeOfType<MessageResponse>();
|
resultOne.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -278,7 +307,7 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
request.Messages.Add(new(MessageRole.Assistant, resultOne.Value.Content));
|
||||||
request.Messages.Add(new(MessageRole.User, [new TextContent("What is the main theme of this paper?")]));
|
request.Messages.Add(new(MessageRole.User, [new TextContent("What is the main theme of this paper?")]));
|
||||||
|
|
||||||
var resultTwo = await client.CreateMessageAsync(request);
|
var resultTwo = await _client.CreateMessageAsync(request);
|
||||||
|
|
||||||
resultTwo.IsSuccess.Should().BeTrue();
|
resultTwo.IsSuccess.Should().BeTrue();
|
||||||
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
resultTwo.Value.Should().BeOfType<MessageResponse>();
|
||||||
@@ -395,6 +424,58 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
citations.OfType<ContentBlockLocationCitation>().Should().NotBeEmpty();
|
citations.OfType<ContentBlockLocationCitation>().Should().NotBeEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task CreateMessageAsync_WhenCitationsAreEnabledForFileSource_ItShouldReturnCitationsInResponse()
|
||||||
|
{
|
||||||
|
var fileName = "story.txt";
|
||||||
|
var fileType = "text/plain";
|
||||||
|
var filePath = TestFileHelper.GetTestFilePath("story.txt");
|
||||||
|
var fileContent = await File.ReadAllBytesAsync(filePath);
|
||||||
|
var createFileRequest = new CreateFileRequest(fileContent, fileName, fileType);
|
||||||
|
|
||||||
|
var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var createdFile = await client.CreateFileAsync(createFileRequest);
|
||||||
|
|
||||||
|
var request = new MessageRequest(
|
||||||
|
model: AnthropicModels.Claude35HaikuLatest,
|
||||||
|
messages: [
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[
|
||||||
|
new DocumentContent(new FileSource(createdFile.Value.Id))
|
||||||
|
{
|
||||||
|
Title = "A Story",
|
||||||
|
Context = "This is a trustworthy document.",
|
||||||
|
Citations = new() { Enabled = true }
|
||||||
|
},
|
||||||
|
new TextContent("Can you tell me what the title of this story is?"),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await client.CreateMessageAsync(request);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
|
||||||
|
var textContents = result.Value.Content.OfType<TextContent>();
|
||||||
|
|
||||||
|
var messageContent = textContents.Aggregate(new StringBuilder(), (sb, content) =>
|
||||||
|
{
|
||||||
|
sb.Append(content.Text);
|
||||||
|
return sb;
|
||||||
|
});
|
||||||
|
messageContent.ToString().Should().MatchRegex("The Forgotten Lighthouse");
|
||||||
|
|
||||||
|
var citations = textContents.SelectMany(static c => c.Citations is null ? [] : c.Citations);
|
||||||
|
citations.OfType<CharacterLocationCitation>().Should().NotBeEmpty();
|
||||||
|
|
||||||
|
_filesToDelete.Add(createdFile.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task CreateMessageAsync_WhenStreamingAndCitationsAreEnabledForTextDocumentSource_ItShouldReturnCitationsInResponse()
|
public async Task CreateMessageAsync_WhenStreamingAndCitationsAreEnabledForTextDocumentSource_ItShouldReturnCitationsInResponse()
|
||||||
{
|
{
|
||||||
@@ -516,6 +597,64 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
citations.OfType<ContentBlockLocationCitation>().Should().NotBeEmpty();
|
citations.OfType<ContentBlockLocationCitation>().Should().NotBeEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task CreateMessageAsync_WhenStreamingAndCitationsAreEnabledForFileSource_ItShouldReturnCitationsInResponse()
|
||||||
|
{
|
||||||
|
var fileName = "story.txt";
|
||||||
|
var fileType = "text/plain";
|
||||||
|
var filePath = TestFileHelper.GetTestFilePath("story.txt");
|
||||||
|
var fileContent = await File.ReadAllBytesAsync(filePath);
|
||||||
|
var createFileRequest = new CreateFileRequest(fileContent, fileName, fileType);
|
||||||
|
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var createdFile = await client.CreateFileAsync(createFileRequest);
|
||||||
|
|
||||||
|
var request = new StreamMessageRequest(
|
||||||
|
model: AnthropicModels.Claude35HaikuLatest,
|
||||||
|
messages: [
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[
|
||||||
|
new DocumentContent(new FileSource(createdFile.Value.Id))
|
||||||
|
{
|
||||||
|
Title = "A Story",
|
||||||
|
Context = "This is a trustworthy document.",
|
||||||
|
Citations = new() { Enabled = true }
|
||||||
|
},
|
||||||
|
new TextContent("Can you tell me what the title of this story is?"),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = client.CreateMessageAsync(request);
|
||||||
|
|
||||||
|
var messageCompleteEvent = await result
|
||||||
|
.Where(e => e.Type is EventType.MessageComplete)
|
||||||
|
.FirstAsync();
|
||||||
|
|
||||||
|
var textContents = messageCompleteEvent.Data
|
||||||
|
.As<MessageCompleteEventData>()
|
||||||
|
.Message
|
||||||
|
.Content
|
||||||
|
.OfType<TextContent>();
|
||||||
|
|
||||||
|
var messageContent = textContents.Aggregate(new StringBuilder(), (sb, content) =>
|
||||||
|
{
|
||||||
|
sb.Append(content.Text);
|
||||||
|
return sb;
|
||||||
|
});
|
||||||
|
messageContent.ToString().Should().MatchRegex("The Forgotten Lighthouse");
|
||||||
|
|
||||||
|
var citations = textContents.SelectMany(static c => c.Citations is null ? [] : c.Citations);
|
||||||
|
citations.OfType<CharacterLocationCitation>().Should().NotBeEmpty();
|
||||||
|
|
||||||
|
_filesToDelete.Add(createdFile.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task CountMessageTokensAsync_WhenCalled_ItShouldReturnResponse()
|
public async Task CountMessageTokensAsync_WhenCalled_ItShouldReturnResponse()
|
||||||
{
|
{
|
||||||
@@ -687,4 +826,120 @@ public class AnthropicApiClientTests(ConfigurationFixture configFixture) : EndTo
|
|||||||
result.Value.Id.Should().Be(createResult.Value.Id);
|
result.Value.Id.Should().Be(createResult.Value.Id);
|
||||||
result.Value.ProcessingStatus.Should().Be(MessageBatchStatus.Canceling);
|
result.Value.ProcessingStatus.Should().Be(MessageBatchStatus.Canceling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task CreateFileAsync_WhenCalled_ItShouldReturnResponse()
|
||||||
|
{
|
||||||
|
var fileName = "story.txt";
|
||||||
|
var fileType = "text/plain";
|
||||||
|
var filePath = TestFileHelper.GetTestFilePath("story.txt");
|
||||||
|
var fileContent = await File.ReadAllBytesAsync(filePath);
|
||||||
|
var request = new CreateFileRequest(fileContent, fileName, fileType);
|
||||||
|
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var result = await client.CreateFileAsync(request);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<AnthropicFile>();
|
||||||
|
result.Value.Name.Should().Be(fileName);
|
||||||
|
result.Value.MimeType.Should().Be(fileType);
|
||||||
|
|
||||||
|
_filesToDelete.Add(result.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ListFilesAsync_WhenCalled_ItShouldReturnPageOfFiles()
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var fileBytes = await File.ReadAllBytesAsync(TestFileHelper.GetTestFilePath("story.txt"));
|
||||||
|
var createFileRequest = new CreateFileRequest(fileBytes, "story.txt", "text/plain");
|
||||||
|
var createdFile = await client.CreateFileAsync(createFileRequest);
|
||||||
|
|
||||||
|
var result = await client.ListFilesAsync();
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<Page<AnthropicFile>>();
|
||||||
|
result.Value.Data.Should().ContainSingle(f => f.Id == createdFile.Value.Id);
|
||||||
|
|
||||||
|
_filesToDelete.Add(createdFile.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ListAllFilesAsync_WhenCalled_ItShouldReturnAllFiles()
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var fileBytes = await File.ReadAllBytesAsync(TestFileHelper.GetTestFilePath("story.txt"));
|
||||||
|
var createFileRequest = new CreateFileRequest(fileBytes, "story.txt", "text/plain");
|
||||||
|
var createdFile = await client.CreateFileAsync(createFileRequest);
|
||||||
|
|
||||||
|
var responses = await client.ListAllFilesAsync(limit: 1).ToListAsync();
|
||||||
|
|
||||||
|
responses.Should().HaveCountGreaterThan(0);
|
||||||
|
responses.Select(r => r.Value)
|
||||||
|
.SelectMany(p => p.Data)
|
||||||
|
.Should()
|
||||||
|
.ContainSingle(f => f.Id == createdFile.Value.Id);
|
||||||
|
|
||||||
|
_filesToDelete.Add(createdFile.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task GetFileInfoAsync_WhenCalled_ItShouldReturnFile()
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var fileBytes = await File.ReadAllBytesAsync(TestFileHelper.GetTestFilePath("story.txt"));
|
||||||
|
var createFileRequest = new CreateFileRequest(fileBytes, "story.txt", "text/plain");
|
||||||
|
var createdFile = await client.CreateFileAsync(createFileRequest);
|
||||||
|
|
||||||
|
var result = await client.GetFileInfoAsync(createdFile.Value.Id);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<AnthropicFile>();
|
||||||
|
result.Value.Id.Should().Be(createdFile.Value.Id);
|
||||||
|
|
||||||
|
_filesToDelete.Add(createdFile.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task DeleteFileAsync_WhenCalled_ItShouldReturnDeleteResponse()
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
var fileBytes = await File.ReadAllBytesAsync(TestFileHelper.GetTestFilePath("story.txt"));
|
||||||
|
var createFileRequest = new CreateFileRequest(fileBytes, "story.txt", "text/plain");
|
||||||
|
var createdFile = await client.CreateFileAsync(createFileRequest);
|
||||||
|
|
||||||
|
var result = await client.DeleteFileAsync(createdFile.Value.Id);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<AnthropicFileDeleteResponse>();
|
||||||
|
result.Value.Id.Should().Be(createdFile.Value.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task DisposeAsync()
|
||||||
|
{
|
||||||
|
using var httpClient = new HttpClient();
|
||||||
|
httpClient.DefaultRequestHeaders.Add("anthropic-beta", "files-api-2025-04-14");
|
||||||
|
var client = CreateClient(httpClient);
|
||||||
|
|
||||||
|
foreach (var file in _filesToDelete)
|
||||||
|
{
|
||||||
|
var result = await client.DeleteFileAsync(file);
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1928,4 +1928,476 @@ public class AnthropicApiClientTests : IntegrationTest
|
|||||||
result.Value.Id.Should().Be(batchId);
|
result.Value.Id.Should().Be(batchId);
|
||||||
result.Value.Type.Should().Be("message_batch_deleted");
|
result.Value.Type.Should().Be("message_batch_deleted");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task CreateFileAsync_WhenCalled_ItShouldReturnFile()
|
||||||
|
{
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenCreateFileRequest()
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""created_at"": ""2023-11-07T05:31:56Z"",
|
||||||
|
""downloadable"": false,
|
||||||
|
""filename"": ""example.txt"",
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""size_bytes"": 1234,
|
||||||
|
""type"": ""file""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var fileContent = new MemoryStream(Encoding.UTF8.GetBytes("Example file content"));
|
||||||
|
var request = new CreateFileRequest(fileContent, "example.txt", "text/plain");
|
||||||
|
|
||||||
|
var result = await Client.CreateFileAsync(request);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeEquivalentTo(new AnthropicFile()
|
||||||
|
{
|
||||||
|
CreatedAt = DateTimeOffset.Parse("2023-11-07T05:31:56Z"),
|
||||||
|
Downloadable = false,
|
||||||
|
Name = "example.txt",
|
||||||
|
Id = "file_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Size = 1234,
|
||||||
|
Type = "file"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task CreateFileAsync_WhenCalledAndRequestFails_ItShouldReturnError()
|
||||||
|
{
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenCreateFileRequest()
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.BadRequest,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""type"": ""error"",
|
||||||
|
""error"": {
|
||||||
|
""type"": ""invalid_request_error"",
|
||||||
|
""message"": ""file: file size exceeds limit""
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var fileContent = new MemoryStream(Encoding.UTF8.GetBytes("Example file content"));
|
||||||
|
var request = new CreateFileRequest(fileContent, "example.txt", "text/plain");
|
||||||
|
|
||||||
|
var result = await Client.CreateFileAsync(request);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeFalse();
|
||||||
|
result.Error.Should().BeOfType<AnthropicError>();
|
||||||
|
result.Error.Error.Should().BeOfType<InvalidRequestError>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ListFilesAsync_WhenCalled_ItShouldReturnPageOfFiles()
|
||||||
|
{
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenListFilesRequest()
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""data"": [
|
||||||
|
{
|
||||||
|
""created_at"": ""2023-11-07T05:31:56Z"",
|
||||||
|
""downloadable"": false,
|
||||||
|
""filename"": ""example.txt"",
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""size_bytes"": 1234,
|
||||||
|
""type"": ""file""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
""has_more"": true,
|
||||||
|
""first_id"": ""1"",
|
||||||
|
""last_id"": ""1""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.ListFilesAsync();
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<Page<AnthropicFile>>();
|
||||||
|
result.Value.HasMore.Should().BeTrue();
|
||||||
|
result.Value.FirstId.Should().Be("1");
|
||||||
|
result.Value.LastId.Should().Be("1");
|
||||||
|
result.Value.Data.Should().BeEquivalentTo(new AnthropicFile[]
|
||||||
|
{
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
CreatedAt = DateTimeOffset.Parse("2023-11-07T05:31:56Z"),
|
||||||
|
Downloadable = false,
|
||||||
|
Name = "example.txt",
|
||||||
|
Id = "file_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Size = 1234,
|
||||||
|
Type = "file"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ListFilesAsync_WhenCalledAndRequestFails_ItShouldReturnError()
|
||||||
|
{
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenListFilesRequest()
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.BadRequest,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""type"": ""error"",
|
||||||
|
""error"": {
|
||||||
|
""type"": ""invalid_request_error"",
|
||||||
|
""message"": ""files: file not found""
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.ListFilesAsync();
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeFalse();
|
||||||
|
result.Error.Should().BeOfType<AnthropicError>();
|
||||||
|
result.Error.Error.Should().BeOfType<InvalidRequestError>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ListFilesAsync_WhenCalledWithPagingRequest_ItShouldReturnPageOfFiles()
|
||||||
|
{
|
||||||
|
var pagingRequest = new PagingRequest(afterId: "next_id", limit: 10);
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenListFilesRequest()
|
||||||
|
.WithQueryString(new Dictionary<string, string>
|
||||||
|
{
|
||||||
|
{ "after_id", pagingRequest.AfterId },
|
||||||
|
{ "limit", pagingRequest.Limit.ToString() },
|
||||||
|
})
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""data"": [
|
||||||
|
{
|
||||||
|
""created_at"": ""2023-11-07T05:31:56Z"",
|
||||||
|
""downloadable"": false,
|
||||||
|
""filename"": ""example.txt"",
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""size_bytes"": 1234,
|
||||||
|
""type"": ""file""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
""has_more"": true,
|
||||||
|
""first_id"": ""1"",
|
||||||
|
""last_id"": ""1""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.ListFilesAsync(pagingRequest);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<Page<AnthropicFile>>();
|
||||||
|
result.Value.HasMore.Should().BeTrue();
|
||||||
|
result.Value.FirstId.Should().Be("1");
|
||||||
|
result.Value.LastId.Should().Be("1");
|
||||||
|
result.Value.Data.Should().BeEquivalentTo(new AnthropicFile[]
|
||||||
|
{
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
CreatedAt = DateTimeOffset.Parse("2023-11-07T05:31:56Z"),
|
||||||
|
Downloadable = false,
|
||||||
|
Name = "example.txt",
|
||||||
|
Id = "file_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Size = 1234,
|
||||||
|
Type = "file"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task ListAllFilesAsync_WhenCalled_ItShouldReturnAllFiles()
|
||||||
|
{
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenListFilesRequest()
|
||||||
|
.WithExactQueryString(new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "limit", "20" },
|
||||||
|
})
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""data"": [
|
||||||
|
{
|
||||||
|
""created_at"": ""2023-11-07T05:31:56Z"",
|
||||||
|
""downloadable"": false,
|
||||||
|
""filename"": ""example.txt"",
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""size_bytes"": 1234,
|
||||||
|
""type"": ""file""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
""has_more"": true,
|
||||||
|
""first_id"": ""1"",
|
||||||
|
""last_id"": ""1""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenListFilesRequest()
|
||||||
|
.WithExactQueryString(new Dictionary<string, string>()
|
||||||
|
{
|
||||||
|
{ "after_id", "1" },
|
||||||
|
{ "limit", "20" },
|
||||||
|
})
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""data"": [
|
||||||
|
{
|
||||||
|
""created_at"": ""2023-11-07T05:31:56Z"",
|
||||||
|
""downloadable"": false,
|
||||||
|
""filename"": ""example.txt"",
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""size_bytes"": 1234,
|
||||||
|
""type"": ""file""
|
||||||
|
}
|
||||||
|
],
|
||||||
|
""has_more"": false,
|
||||||
|
""first_id"": ""2"",
|
||||||
|
""last_id"": ""2""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var pageResponses = Client.ListAllFilesAsync();
|
||||||
|
var collectedPages = new List<Page<AnthropicFile>>();
|
||||||
|
|
||||||
|
await foreach (var response in pageResponses)
|
||||||
|
{
|
||||||
|
response.IsSuccess.Should().BeTrue();
|
||||||
|
response.Value.Should().BeOfType<Page<AnthropicFile>>();
|
||||||
|
collectedPages.Add(response.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
var expectedFile = new AnthropicFile()
|
||||||
|
{
|
||||||
|
CreatedAt = DateTimeOffset.Parse("2023-11-07T05:31:56Z"),
|
||||||
|
Downloadable = false,
|
||||||
|
Name = "example.txt",
|
||||||
|
Id = "file_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Size = 1234,
|
||||||
|
Type = "file"
|
||||||
|
};
|
||||||
|
|
||||||
|
collectedPages.Should().HaveCount(2);
|
||||||
|
collectedPages.Should().BeEquivalentTo(new List<Page<AnthropicFile>>()
|
||||||
|
{
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Data = [expectedFile],
|
||||||
|
FirstId = "1",
|
||||||
|
LastId = "1",
|
||||||
|
HasMore = true
|
||||||
|
},
|
||||||
|
new()
|
||||||
|
{
|
||||||
|
Data = [expectedFile],
|
||||||
|
FirstId = "2",
|
||||||
|
LastId = "2",
|
||||||
|
HasMore = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task GetFileInfoAsync_WhenCalled_ItShouldReturnFile()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenGetFileRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""created_at"": ""2023-11-07T05:31:56Z"",
|
||||||
|
""downloadable"": false,
|
||||||
|
""filename"": ""example.txt"",
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""size_bytes"": 1234,
|
||||||
|
""type"": ""file""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.GetFileInfoAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeEquivalentTo(new AnthropicFile()
|
||||||
|
{
|
||||||
|
CreatedAt = DateTimeOffset.Parse("2023-11-07T05:31:56Z"),
|
||||||
|
Downloadable = false,
|
||||||
|
Name = "example.txt",
|
||||||
|
Id = "file_013Zva2CMHLNnXjNJJKqJ2EF",
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Size = 1234,
|
||||||
|
Type = "file"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task GetFileInfoAsync_WhenCalledAndRequestFails_ItShouldReturnError()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenGetFileRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.BadRequest,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""type"": ""error"",
|
||||||
|
""error"": {
|
||||||
|
""type"": ""invalid_request_error"",
|
||||||
|
""message"": ""file: file not found""
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.GetFileInfoAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeFalse();
|
||||||
|
result.Error.Should().BeOfType<AnthropicError>();
|
||||||
|
result.Error.Error.Should().BeOfType<InvalidRequestError>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task GetFileAsync_WhenCalled_ItShouldReturnFileContent()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
var fileContent = new MemoryStream(Encoding.UTF8.GetBytes("Example file content"));
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenGetFileContentRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/octet-stream",
|
||||||
|
fileContent
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.GetFileAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeAssignableTo<Stream>();
|
||||||
|
|
||||||
|
using var streamReader = new StreamReader(result.Value);
|
||||||
|
var content = await streamReader.ReadToEndAsync();
|
||||||
|
content.Should().Be("Example file content");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task GetFileAsync_WhenCalledAndRequestFails_ItShouldReturnError()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenGetFileContentRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.BadRequest,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""type"": ""error"",
|
||||||
|
""error"": {
|
||||||
|
""type"": ""invalid_request_error"",
|
||||||
|
""message"": ""file: file not found""
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.GetFileAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeFalse();
|
||||||
|
result.Error.Should().BeOfType<AnthropicError>();
|
||||||
|
result.Error.Error.Should().BeOfType<InvalidRequestError>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task GetFileAsync_WhenCalledAndCanNotDeserializeResponse_ItShouldReturnError()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenGetFileContentRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.BadRequest,
|
||||||
|
"application/json",
|
||||||
|
@"null"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.GetFileAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeFalse();
|
||||||
|
result.Error.Should().BeOfType<AnthropicError>();
|
||||||
|
result.Error.Error.Should().BeOfType<ApiError>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task DeleteFileAsync_WhenCalled_ItShouldReturnDeletionResponse()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenDeleteFileRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.OK,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""id"": ""file_013Zva2CMHLNnXjNJJKqJ2EF"",
|
||||||
|
""type"": ""file_deleted""
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.DeleteFileAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeTrue();
|
||||||
|
result.Value.Should().BeOfType<AnthropicFileDeleteResponse>();
|
||||||
|
result.Value.Id.Should().Be(fileId);
|
||||||
|
result.Value.Type.Should().Be("file_deleted");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task DeleteFileAsync_WhenCalledAndRequestFails_ItShouldReturnError()
|
||||||
|
{
|
||||||
|
var fileId = "file_013Zva2CMHLNnXjNJJKqJ2EF";
|
||||||
|
|
||||||
|
_mockHttpMessageHandler
|
||||||
|
.WhenDeleteFileRequest(fileId)
|
||||||
|
.Respond(
|
||||||
|
HttpStatusCode.BadRequest,
|
||||||
|
"application/json",
|
||||||
|
@"{
|
||||||
|
""type"": ""error"",
|
||||||
|
""error"": {
|
||||||
|
""type"": ""invalid_request_error"",
|
||||||
|
""message"": ""file: file not found""
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
);
|
||||||
|
|
||||||
|
var result = await Client.DeleteFileAsync(fileId);
|
||||||
|
|
||||||
|
result.IsSuccess.Should().BeFalse();
|
||||||
|
result.Error.Should().BeOfType<AnthropicError>();
|
||||||
|
result.Error.Error.Should().BeOfType<InvalidRequestError>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,7 @@ public static class MockHttpMessageHandlerExtensions
|
|||||||
private static readonly string CountTokensEndpoint = $"{BaseUrl}/messages/count_tokens";
|
private static readonly string CountTokensEndpoint = $"{BaseUrl}/messages/count_tokens";
|
||||||
private static readonly string MessageBatchesEndpoint = $"{BaseUrl}/messages/batches";
|
private static readonly string MessageBatchesEndpoint = $"{BaseUrl}/messages/batches";
|
||||||
private static readonly string ModelsEndpoint = $"{BaseUrl}/models";
|
private static readonly string ModelsEndpoint = $"{BaseUrl}/models";
|
||||||
|
private static readonly string FilesEndpoint = $"{BaseUrl}/files";
|
||||||
|
|
||||||
private static MockedRequest SetupBaseRequest(
|
private static MockedRequest SetupBaseRequest(
|
||||||
this MockHttpMessageHandler mockHttpMessageHandler,
|
this MockHttpMessageHandler mockHttpMessageHandler,
|
||||||
@@ -103,4 +104,34 @@ public static class MockHttpMessageHandlerExtensions
|
|||||||
return mockHttpMessageHandler
|
return mockHttpMessageHandler
|
||||||
.SetupBaseRequest(HttpMethod.Delete, $"{MessageBatchesEndpoint}/{batchId}");
|
.SetupBaseRequest(HttpMethod.Delete, $"{MessageBatchesEndpoint}/{batchId}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static MockedRequest WhenCreateFileRequest(this MockHttpMessageHandler mockHttpMessageHandler)
|
||||||
|
{
|
||||||
|
return mockHttpMessageHandler
|
||||||
|
.SetupBaseRequest(HttpMethod.Post, FilesEndpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MockedRequest WhenListFilesRequest(this MockHttpMessageHandler mockHttpMessageHandler)
|
||||||
|
{
|
||||||
|
return mockHttpMessageHandler
|
||||||
|
.SetupBaseRequest(HttpMethod.Get, FilesEndpoint);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MockedRequest WhenGetFileRequest(this MockHttpMessageHandler mockHttpMessageHandler, string fileId)
|
||||||
|
{
|
||||||
|
return mockHttpMessageHandler
|
||||||
|
.SetupBaseRequest(HttpMethod.Get, $"{FilesEndpoint}/{fileId}");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MockedRequest WhenGetFileContentRequest(this MockHttpMessageHandler mockHttpMessageHandler, string fileId)
|
||||||
|
{
|
||||||
|
return mockHttpMessageHandler
|
||||||
|
.SetupBaseRequest(HttpMethod.Get, $"{FilesEndpoint}/{fileId}/content");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MockedRequest WhenDeleteFileRequest(this MockHttpMessageHandler mockHttpMessageHandler, string fileId)
|
||||||
|
{
|
||||||
|
return mockHttpMessageHandler
|
||||||
|
.SetupBaseRequest(HttpMethod.Delete, $"{FilesEndpoint}/{fileId}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
namespace AnthropicClient.Tests.Unit.Models;
|
||||||
|
|
||||||
|
public class AnthropicFileDeleteResponseTests : SerializationTest
|
||||||
|
{
|
||||||
|
private readonly string _testJson = @"{
|
||||||
|
""id"": ""file-12345"",
|
||||||
|
""type"": ""file_deleted""
|
||||||
|
}";
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalled_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var response = new AnthropicFileDeleteResponse();
|
||||||
|
|
||||||
|
response.Id.Should().BeEmpty();
|
||||||
|
response.Type.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithValues_ItShouldInitializePropertiesWithValues()
|
||||||
|
{
|
||||||
|
var id = "file-12345";
|
||||||
|
var type = "file_deleted";
|
||||||
|
|
||||||
|
var response = new AnthropicFileDeleteResponse
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
Type = type
|
||||||
|
};
|
||||||
|
|
||||||
|
response.Id.Should().Be(id);
|
||||||
|
response.Type.Should().Be(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonSerialization_WhenSerialized_ItShouldMatchExpectedJson()
|
||||||
|
{
|
||||||
|
var response = new AnthropicFileDeleteResponse
|
||||||
|
{
|
||||||
|
Id = "file-12345",
|
||||||
|
Type = "file_deleted"
|
||||||
|
};
|
||||||
|
|
||||||
|
var json = JsonSerializer.Serialize(response, JsonSerializationOptions.DefaultOptions);
|
||||||
|
|
||||||
|
JsonAssert.Equal(_testJson, json);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonDeserialization_WhenDeserialized_ItShouldMatchExpectedObject()
|
||||||
|
{
|
||||||
|
var response = JsonSerializer.Deserialize<AnthropicFileDeleteResponse>(_testJson, JsonSerializationOptions.DefaultOptions);
|
||||||
|
|
||||||
|
response.Should().NotBeNull();
|
||||||
|
response.Id.Should().Be("file-12345");
|
||||||
|
response.Type.Should().Be("file_deleted");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
namespace AnthropicClient.Tests.Unit.Models;
|
||||||
|
|
||||||
|
public class AnthropicFileTests : SerializationTest
|
||||||
|
{
|
||||||
|
private readonly string _testJson = @"{
|
||||||
|
""id"": ""file-123"",
|
||||||
|
""type"": ""file"",
|
||||||
|
""filename"": ""test.txt"",
|
||||||
|
""created_at"": ""2023-10-01T00:00:00Z"",
|
||||||
|
""size_bytes"": 1024,
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""downloadable"": true
|
||||||
|
}";
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalled_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var result = new AnthropicFile();
|
||||||
|
|
||||||
|
result.Id.Should().BeEmpty();
|
||||||
|
result.Type.Should().BeEmpty();
|
||||||
|
result.Name.Should().BeEmpty();
|
||||||
|
result.CreatedAt.Should().Be(DateTimeOffset.MinValue);
|
||||||
|
result.Size.Should().Be(0);
|
||||||
|
result.MimeType.Should().BeEmpty();
|
||||||
|
result.Downloadable.Should().BeFalse();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithValues_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var file = new AnthropicFile
|
||||||
|
{
|
||||||
|
Id = "file-123",
|
||||||
|
Type = "file",
|
||||||
|
Name = "test.txt",
|
||||||
|
CreatedAt = new DateTimeOffset(2023, 10, 1, 0, 0, 0, TimeSpan.Zero),
|
||||||
|
Size = 1024,
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Downloadable = true
|
||||||
|
};
|
||||||
|
|
||||||
|
file.Id.Should().Be("file-123");
|
||||||
|
file.Type.Should().Be("file");
|
||||||
|
file.Name.Should().Be("test.txt");
|
||||||
|
file.CreatedAt.Should().Be(new DateTimeOffset(2023, 10, 1, 0, 0, 0, TimeSpan.Zero));
|
||||||
|
file.Size.Should().Be(1024);
|
||||||
|
file.MimeType.Should().Be("text/plain");
|
||||||
|
file.Downloadable.Should().BeTrue();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
|
||||||
|
{
|
||||||
|
var file = new AnthropicFile
|
||||||
|
{
|
||||||
|
Id = "file-123",
|
||||||
|
Type = "file",
|
||||||
|
Name = "test.txt",
|
||||||
|
CreatedAt = new DateTimeOffset(2023, 10, 1, 0, 0, 0, TimeSpan.Zero),
|
||||||
|
Size = 1024,
|
||||||
|
MimeType = "text/plain",
|
||||||
|
Downloadable = true
|
||||||
|
};
|
||||||
|
|
||||||
|
var json = Serialize(file);
|
||||||
|
|
||||||
|
var expectedJson = @"{
|
||||||
|
""id"": ""file-123"",
|
||||||
|
""type"": ""file"",
|
||||||
|
""filename"": ""test.txt"",
|
||||||
|
""created_at"": ""2023-10-01T00:00:00+00:00"",
|
||||||
|
""size_bytes"": 1024,
|
||||||
|
""mime_type"": ""text/plain"",
|
||||||
|
""downloadable"": true
|
||||||
|
}";
|
||||||
|
|
||||||
|
JsonAssert.Equal(expectedJson, json, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedValues()
|
||||||
|
{
|
||||||
|
var file = Deserialize<AnthropicFile>(_testJson);
|
||||||
|
|
||||||
|
file.Should().NotBeNull();
|
||||||
|
file!.Id.Should().Be("file-123");
|
||||||
|
file.Type.Should().Be("file");
|
||||||
|
file.Name.Should().Be("test.txt");
|
||||||
|
file.CreatedAt.Should().Be(new DateTimeOffset(2023, 10, 1, 0, 0, 0, TimeSpan.Zero));
|
||||||
|
file.Size.Should().Be(1024);
|
||||||
|
file.MimeType.Should().Be("text/plain");
|
||||||
|
file.Downloadable.Should().BeTrue();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -131,4 +131,64 @@ public class AnthropicModelsTests
|
|||||||
|
|
||||||
actual.Should().Be(expected);
|
actual.Should().Be(expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Claude37Sonnet20250219_WhenCalled_ItShouldReturnExpectedValue()
|
||||||
|
{
|
||||||
|
var expected = "claude-3-7-sonnet-20250219";
|
||||||
|
|
||||||
|
var actual = AnthropicModels.Claude37Sonnet20250219;
|
||||||
|
|
||||||
|
actual.Should().Be(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Claude37SonnetLatest_WhenCalled_ItShouldReturnExpectedValue()
|
||||||
|
{
|
||||||
|
var expected = "claude-3-7-sonnet-latest";
|
||||||
|
|
||||||
|
var actual = AnthropicModels.Claude37SonnetLatest;
|
||||||
|
|
||||||
|
actual.Should().Be(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ClaudeSonnet420250514_WhenCalled_ItShouldReturnExpectedValue()
|
||||||
|
{
|
||||||
|
var expected = "claude-sonnet-4-20250514";
|
||||||
|
|
||||||
|
var actual = AnthropicModels.ClaudeSonnet420250514;
|
||||||
|
|
||||||
|
actual.Should().Be(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ClaudeSonnet40_WhenCalled_ItShouldReturnExpectedValue()
|
||||||
|
{
|
||||||
|
var expected = "claude-sonnet-4-0";
|
||||||
|
|
||||||
|
var actual = AnthropicModels.ClaudeSonnet40;
|
||||||
|
|
||||||
|
actual.Should().Be(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ClaudeOpus420250514_WhenCalled_ItShouldReturnExpectedValue()
|
||||||
|
{
|
||||||
|
var expected = "claude-opus-4-20250514";
|
||||||
|
|
||||||
|
var actual = AnthropicModels.ClaudeOpus420250514;
|
||||||
|
|
||||||
|
actual.Should().Be(expected);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ClaudeOpus40_WhenCalled_ItShouldReturnExpectedValue()
|
||||||
|
{
|
||||||
|
var expected = "claude-opus-4-0";
|
||||||
|
|
||||||
|
var actual = AnthropicModels.ClaudeOpus40;
|
||||||
|
|
||||||
|
actual.Should().Be(expected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
namespace AnthropicClient.Tests.Unit.Models;
|
||||||
|
|
||||||
|
public class CreateFileRequestTests
|
||||||
|
{
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithBytes_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var fileContent = new byte[] { 1, 2, 3 };
|
||||||
|
var fileName = "test.txt";
|
||||||
|
var fileType = "text/plain";
|
||||||
|
|
||||||
|
var request = new CreateFileRequest(fileContent, fileName, fileType);
|
||||||
|
|
||||||
|
request.File.Should().BeSameAs(fileContent);
|
||||||
|
request.FileName.Should().Be(fileName);
|
||||||
|
request.FileType.Should().Be(fileType);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithStream_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
using var stream = new MemoryStream([1, 2, 3]);
|
||||||
|
var fileName = "test.txt";
|
||||||
|
var fileType = "text/plain";
|
||||||
|
|
||||||
|
var request = new CreateFileRequest(stream, fileName, fileType);
|
||||||
|
|
||||||
|
request.File.Should().BeEquivalentTo(new byte[] { 1, 2, 3 });
|
||||||
|
request.FileName.Should().Be(fileName);
|
||||||
|
request.FileType.Should().Be(fileType);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithNullBytes_ItShouldThrowArgumentNullException()
|
||||||
|
{
|
||||||
|
var act = () => new CreateFileRequest((byte[])null!, "test.txt", "text/plain");
|
||||||
|
act.Should().Throw<ArgumentNullException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithBytesAndNullFileName_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
var act = () => new CreateFileRequest([1, 2, 3], null!, "text/plain");
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithBytesAndFileNameIsEmpty_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
var act = () => new CreateFileRequest([1, 2, 3], string.Empty, "text/plain");
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithBytesAndNullFileType_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
var act = () => new CreateFileRequest([1, 2, 3], "test.txt", null!);
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithBytesAndFileTypeIsEmpty_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
var act = () => new CreateFileRequest([1, 2, 3], "test.txt", string.Empty);
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithNullStream_ItShouldThrowArgumentNullException()
|
||||||
|
{
|
||||||
|
var act = () => new CreateFileRequest((Stream)null!, "test.txt", "text/plain");
|
||||||
|
act.Should().Throw<ArgumentNullException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithStreamAndNullFileName_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
using var stream = new MemoryStream([1, 2, 3]);
|
||||||
|
var act = () => new CreateFileRequest(stream, null!, "text/plain");
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithStreamAndFileNameIsEmpty_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
using var stream = new MemoryStream([1, 2, 3]);
|
||||||
|
var act = () => new CreateFileRequest(stream, string.Empty, "text/plain");
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithStreamAndNullFileType_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
using var stream = new MemoryStream([1, 2, 3]);
|
||||||
|
var act = () => new CreateFileRequest(stream, "test.txt", null!);
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithStreamAndFileTypeIsEmpty_ItShouldThrowArgumentException()
|
||||||
|
{
|
||||||
|
using var stream = new MemoryStream([1, 2, 3]);
|
||||||
|
var act = () => new CreateFileRequest(stream, "test.txt", string.Empty);
|
||||||
|
act.Should().Throw<ArgumentException>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
namespace AnthropicClient.Tests.Unit.Models;
|
||||||
|
|
||||||
|
public class FileSourceTests : SerializationTest
|
||||||
|
{
|
||||||
|
private readonly string _testJson = @"{
|
||||||
|
""file_id"": ""id"",
|
||||||
|
""type"": ""file""
|
||||||
|
}";
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalled_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var result = new FileSource();
|
||||||
|
|
||||||
|
result.Type.Should().Be("file");
|
||||||
|
result.Id.Should().BeEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithValues_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var id = "id";
|
||||||
|
var type = "type";
|
||||||
|
|
||||||
|
var result = new FileSource()
|
||||||
|
{
|
||||||
|
Id = id,
|
||||||
|
Type = type,
|
||||||
|
};
|
||||||
|
|
||||||
|
result.Id.Should().Be(id);
|
||||||
|
result.Type.Should().Be(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithId_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var id = "id";
|
||||||
|
|
||||||
|
var result = new FileSource(id);
|
||||||
|
|
||||||
|
result.Id.Should().Be(id);
|
||||||
|
result.Type.Should().Be("file");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
|
||||||
|
{
|
||||||
|
var source = new FileSource() { Id = "id" };
|
||||||
|
|
||||||
|
var result = Serialize<Source>(source);
|
||||||
|
|
||||||
|
JsonAssert.Equal(_testJson, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonDeserialization_WhenDeserialized_ItShouldHaveExpectedValues()
|
||||||
|
{
|
||||||
|
var result = Deserialize<Source>(_testJson);
|
||||||
|
|
||||||
|
result.Should().BeEquivalentTo(new FileSource() { Id = "id" });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -77,7 +77,7 @@ public class ImageContentTests : SerializationTest
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void Constructor_WhenCalledWithCacheControlAndMediatTypeIsNull_ItShouldThrowArgumentNullException()
|
public void Constructor_WhenCalledWithCacheControlAndMediaTypeIsNull_ItShouldThrowArgumentNullException()
|
||||||
{
|
{
|
||||||
var expectedData = "data";
|
var expectedData = "data";
|
||||||
var cacheControl = new EphemeralCacheControl();
|
var cacheControl = new EphemeralCacheControl();
|
||||||
@@ -98,6 +98,49 @@ public class ImageContentTests : SerializationTest
|
|||||||
action.Should().Throw<ArgumentNullException>();
|
action.Should().Throw<ArgumentNullException>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithSource_ItShouldInitializeSource()
|
||||||
|
{
|
||||||
|
var source = new ImageSource("image/png", "data");
|
||||||
|
|
||||||
|
var result = new ImageContent(source);
|
||||||
|
|
||||||
|
result.Source.Should().BeSameAs(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithSourceAndCacheControl_ItShouldInitializeSourceAndCacheControl()
|
||||||
|
{
|
||||||
|
var source = new ImageSource("image/png", "data");
|
||||||
|
var cacheControl = new EphemeralCacheControl();
|
||||||
|
|
||||||
|
var result = new ImageContent(source, cacheControl);
|
||||||
|
|
||||||
|
result.Source.Should().BeSameAs(source);
|
||||||
|
result.CacheControl.Should().BeSameAs(cacheControl);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenSourceIsNull_ItShouldThrowArgumentNullException()
|
||||||
|
{
|
||||||
|
Source? source = null;
|
||||||
|
|
||||||
|
var action = () => new ImageContent(source!);
|
||||||
|
|
||||||
|
action.Should().Throw<ArgumentNullException>();
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCacheControlIsNull_ItShouldThrowNullException()
|
||||||
|
{
|
||||||
|
var source = new ImageSource("image/png", "data");
|
||||||
|
CacheControl? cacheControl = null;
|
||||||
|
|
||||||
|
var action = () => new ImageContent(source, cacheControl!);
|
||||||
|
|
||||||
|
action.Should().Throw<ArgumentNullException>();
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
|
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,4 +19,10 @@ public class SourceTypeTests
|
|||||||
{
|
{
|
||||||
SourceType.Text.Should().Be("text");
|
SourceType.Text.Should().Be("text");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void File_WhenCalled_ItShouldReturnCorrectValue()
|
||||||
|
{
|
||||||
|
SourceType.File.Should().Be("file");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
namespace AnthropicClient.Tests.Unit.Models;
|
||||||
|
|
||||||
|
public class UrlSourceTests : SerializationTest
|
||||||
|
{
|
||||||
|
private readonly string _testJson = @"{
|
||||||
|
""type"": ""url"",
|
||||||
|
""url"": ""https://example.com/document.pdf""
|
||||||
|
}";
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalled_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var result = new UrlSource();
|
||||||
|
|
||||||
|
result.Url.Should().BeEmpty();
|
||||||
|
result.Type.Should().Be("url");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithValues_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var url = "https://example.com/document.pdf";
|
||||||
|
var type = "type";
|
||||||
|
|
||||||
|
var result = new UrlSource()
|
||||||
|
{
|
||||||
|
Url = url,
|
||||||
|
Type = type,
|
||||||
|
};
|
||||||
|
|
||||||
|
result.Url.Should().Be(url);
|
||||||
|
result.Type.Should().Be(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void Constructor_WhenCalledWithUrl_ItShouldInitializeProperties()
|
||||||
|
{
|
||||||
|
var url = "https://example.com/document.pdf";
|
||||||
|
|
||||||
|
var result = new UrlSource(url);
|
||||||
|
|
||||||
|
result.Url.Should().Be(url);
|
||||||
|
result.Type.Should().Be("url");
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonSerialization_WhenSerialized_ItShouldHaveExpectedShape()
|
||||||
|
{
|
||||||
|
var url = "https://example.com/document.pdf";
|
||||||
|
var source = new UrlSource(url);
|
||||||
|
|
||||||
|
var result = Serialize<Source>(source);
|
||||||
|
|
||||||
|
JsonAssert.Equal(_testJson, result);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void JsonDeserialization_WhenDeserialized_ItShouldMatchExpectedObject()
|
||||||
|
{
|
||||||
|
var result = Deserialize<Source>(_testJson);
|
||||||
|
|
||||||
|
result.Should().BeEquivalentTo(new UrlSource("https://example.com/document.pdf"));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user