Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df0738ac7f | ||
|
|
0dd7829733 | ||
|
|
0b81bfc2f6 | ||
|
|
33191a32cc | ||
|
|
3fe75f511d | ||
|
|
9abad390f1 | ||
|
|
8bbd4bb7c8 | ||
|
|
8e0443a6bb | ||
|
|
9d341011df | ||
|
|
df75cd25e0 | ||
|
|
28b7bf6a89 | ||
|
|
9e367d3542 | ||
|
|
4a7d2c39be | ||
|
|
e08c94ec57 | ||
|
|
5a1bf4ca41 | ||
|
|
de326abe25 | ||
|
|
57f66d3619 | ||
|
|
a23938961f | ||
|
|
4fe8bfaf0e | ||
|
|
944822060c | ||
|
|
31a7097cdc | ||
|
|
8ef9a21a93 | ||
|
|
87ecb6e5ad | ||
|
|
abf4154432 | ||
|
|
9c0a2e37b7 | ||
|
|
f861155551 | ||
|
|
6e0c0654af | ||
|
|
6b6bc1b015 | ||
|
|
69ec59d0ee | ||
|
|
27ad654cd9 | ||
|
|
dc9755cbb8 | ||
|
|
c66dc81df3 | ||
|
|
3de38ee5cf | ||
|
|
fe984d517d | ||
|
|
f3a7040cb9 | ||
|
|
c4d4d8a15b | ||
|
|
d3d156a65d | ||
|
|
02bab6ae84 | ||
|
|
8cccda0927 | ||
|
|
5f8b16ebc5 | ||
|
|
9d997500a8 | ||
|
|
24bd877c09 | ||
|
|
87f363e7cd | ||
|
|
16b4373fca | ||
|
|
d47bcbcb51 | ||
|
|
a4a3379dc4 | ||
|
|
838e7ba859 | ||
|
|
dc162aa80b | ||
|
|
afe70a9012 | ||
|
|
c2fa796bd0 | ||
|
|
f1c02ebc8f | ||
|
|
42d6ee4d34 | ||
|
|
539d735e6b | ||
|
|
07457c1808 | ||
|
|
4524d7be88 | ||
|
|
eb0befe62a | ||
|
|
e04599bad9 | ||
|
|
2e1c1118c3 | ||
|
|
cc1d628feb | ||
|
|
f6460e99ee | ||
|
|
e47095e03d | ||
|
|
0c160e998a | ||
|
|
a3c7e90734 | ||
|
|
d458c9ed23 | ||
|
|
0253794235 | ||
|
|
f2f150791e | ||
|
|
364c91080c | ||
|
|
6431e2a113 | ||
|
|
987fbe9742 | ||
|
|
35adac9fa0 | ||
|
|
90e9b9f75e | ||
|
|
900a7a3549 | ||
|
|
66008717e1 | ||
|
|
ed97ea95dc | ||
|
|
c0dec5f7de | ||
|
|
051fa178aa | ||
|
|
03ad94d9f9 | ||
|
|
5ab8297a83 | ||
|
|
d27538b656 | ||
|
|
a16b64d5a0 | ||
|
|
48b2716a61 | ||
|
|
641eaf30a4 | ||
|
|
30c0116113 | ||
|
|
9b714df12f | ||
|
|
f39e76cfa6 | ||
|
|
f970b07ed7 | ||
|
|
93761b8e7e | ||
|
|
b3d4ac3faa | ||
|
|
3b47ed3fb4 | ||
|
|
0a692d1b9a | ||
|
|
999a255468 | ||
|
|
f245d6442f | ||
|
|
5576b688c5 | ||
|
|
989951db55 | ||
|
|
d486bc8691 | ||
|
|
0918213e55 | ||
|
|
3bdb4173f3 | ||
|
|
0363756571 | ||
|
|
48f813f49f | ||
|
|
0a2ea1934d | ||
|
|
27264261ce | ||
|
|
3b9dc6706e | ||
|
|
7c04f0a29c |
@@ -1 +1,4 @@
|
|||||||
* text eol=crlf
|
* text eol=crlf
|
||||||
|
*.woff binary
|
||||||
|
*.woff2 binary
|
||||||
|
*.jpg binary
|
||||||
@@ -25,7 +25,7 @@ jobs:
|
|||||||
git config --local user.name "Stevan Freeborn"
|
git config --local user.name "Stevan Freeborn"
|
||||||
- name: Run versionize
|
- name: Run versionize
|
||||||
id: versionize
|
id: versionize
|
||||||
run: versionize -i --exit-insignificant-commits --changelog-all --workingDir ./src/AnthropicClient --commit-suffix "[skip ci]"
|
run: versionize -i --exit-insignificant-commits --workingDir ./src/AnthropicClient --commit-suffix "[skip ci]"
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
- name: Upload changelog
|
- name: Upload changelog
|
||||||
if: steps.versionize.outcome == 'success'
|
if: steps.versionize.outcome == 'success'
|
||||||
@@ -110,9 +110,11 @@ jobs:
|
|||||||
git config --local user.name "Stevan Freeborn"
|
git config --local user.name "Stevan Freeborn"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "docs: documentation for v${{ steps.get-version.outputs.version }} [skip ci]"
|
git commit -m "docs: documentation for v${{ steps.get-version.outputs.version }} [skip ci]"
|
||||||
|
continue-on-error: true
|
||||||
- name: Push documentation
|
- name: Push documentation
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.ACTIONS_PAT }}
|
github_token: ${{ secrets.ACTIONS_PAT }}
|
||||||
branch: ${{ github.ref }}
|
branch: ${{ github.ref }}
|
||||||
tags: true
|
tags: true
|
||||||
|
continue-on-error: true
|
||||||
Vendored
+2
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
|
"editor.formatOnSave": true,
|
||||||
"dotnet.defaultSolution": "AnthropicClient.sln",
|
"dotnet.defaultSolution": "AnthropicClient.sln",
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Browsable",
|
"Browsable",
|
||||||
|
"haikus",
|
||||||
"nameof",
|
"nameof",
|
||||||
"Szalay",
|
"Szalay",
|
||||||
"typeof"
|
"typeof"
|
||||||
|
|||||||
@@ -105,9 +105,105 @@ The primary use case for working with the Anthropic API is to create a message i
|
|||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> The following examples assume that you have already created an instance of the `AnthropicApiClient` class named `client`. You can also find these snippets in the examples directory.
|
> The following examples assume that you have already created an instance of the `AnthropicApiClient` class named `client`. You can also find these snippets in the examples directory.
|
||||||
|
|
||||||
|
### Count Message Tokens
|
||||||
|
|
||||||
|
The `AnthropicApiClient` exposes a method named `CountMessageTokensAsync` that can be used to count the number of tokens in a message. The method requires a `CountMessageTokensRequest` instance as a parameter.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CountMessageTokensAsync(new CountMessageTokensRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
if (response.IsFailure)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to count message tokens");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Token Count: {0}", response.Value.InputTokens);
|
||||||
|
```
|
||||||
|
|
||||||
|
### List Models
|
||||||
|
|
||||||
|
The `AnthropicApiClient` exposes a method named `ListModelsAsync` that can be used to list the available models. The method takes an optional `PagingRequest` instance as a parameter.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
|
||||||
|
var response = await client.ListModelsAsync();
|
||||||
|
|
||||||
|
if (response.IsFailure)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to list models");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var model in response.Value.Data)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Model Id: {0}", model.Id);
|
||||||
|
Console.WriteLine("Model Name: {0}", model.DisplayName);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Using the `PagingRequest` instance allows you to specify the number of models to return and the page of models to return.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.ListModelsAsync(new PagingRequest(afterId: "claude-3-5-sonnet-20241022", limit: 2));
|
||||||
|
|
||||||
|
if (response.IsFailure)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to list models");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var model in response.Value.Data)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Model Id: {0}", model.Id);
|
||||||
|
Console.WriteLine("Model Name: {0}", model.DisplayName);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Get Model
|
||||||
|
|
||||||
|
The `AnthropicApiClient` exposes a method named `GetModelAsync` that can be used to get a model by its id.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
|
||||||
|
var response = await client.GetModelAsync("claude-3-5-sonnet-20241022");
|
||||||
|
|
||||||
|
if (response.IsFailure)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to get model");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Model Id: {0}", response.Value.Id);
|
||||||
|
```
|
||||||
|
|
||||||
### Create a message
|
### Create a message
|
||||||
|
|
||||||
The `AnthropicApiClient` exposes a single 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.
|
||||||
|
|
||||||
#### Non-Streaming
|
#### Non-Streaming
|
||||||
|
|
||||||
@@ -127,9 +223,9 @@ var response = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (response.IsSuccess is false)
|
if (response.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", response.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", response.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,16 +521,17 @@ var response = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (response.IsSuccess is false)
|
if (response.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", response.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", response.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messages.Add(new(MessageRole.Assistant, response.Content));
|
||||||
|
|
||||||
|
|
||||||
foreach (var content in response.Value.Content)
|
foreach (var content in response.Value.Content)
|
||||||
{
|
{
|
||||||
messages.Add(new(MessageRole.Assistant, [content]));
|
|
||||||
|
|
||||||
switch (content)
|
switch (content)
|
||||||
{
|
{
|
||||||
case TextContent textContent:
|
case TextContent textContent:
|
||||||
@@ -483,9 +580,9 @@ var finalResponse = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (finalResponse.IsSuccess is false)
|
if (finalResponse.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", finalResponse.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", finalResponse.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", finalResponse.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", finalResponse.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -552,10 +649,7 @@ if (response is null)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var content in response.Content)
|
messages.Add(new(MessageRole.Assistant, response.Content));
|
||||||
{
|
|
||||||
messages.Add(new(MessageRole.Assistant, [content]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response?.ToolCall is not null)
|
if (response?.ToolCall is not null)
|
||||||
{
|
{
|
||||||
@@ -592,9 +686,9 @@ var finalResponse = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (finalResponse.IsSuccess is false)
|
if (finalResponse.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", finalResponse.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", finalResponse.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", finalResponse.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", finalResponse.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,3 +704,270 @@ foreach (var content in finalResponse.Value.Content)
|
|||||||
```
|
```
|
||||||
|
|
||||||
If you do find that you need more control over how exactly provided tools are called and how the result of those tools are returned you can avoid using the `InvokeAsync` method and instead use the `Tool` and `ToolUse` properties of the `ToolCall` instance to implement your own solution.
|
If you do find that you need more control over how exactly provided tools are called and how the result of those tools are returned you can avoid using the `InvokeAsync` method and instead use the `Tool` and `ToolUse` properties of the `ToolCall` instance to implement your own solution.
|
||||||
|
|
||||||
|
### System Prompt
|
||||||
|
|
||||||
|
Anthropic's models support the use of system prompts to provide additional context to the user. This can be used to provide additional information to the user or to ask for additional information from the user. This feature is covered in depth in [Anthropic's API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/system-prompts). This library aims to make using system prompts convenient by allowing you to provide the system prompts you want Anthropic's models to consider for use when creating a message.
|
||||||
|
|
||||||
|
#### System Message
|
||||||
|
|
||||||
|
You can create a system prompt by providing a `string` as the `system` parameter in the `MessageRequest` or `StreamMessageRequest` constructor.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
system: "You are a internationally renowned poet. You excel at writing haikus.
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### System Messages
|
||||||
|
|
||||||
|
You can create a more complex system prompt by providing a `List<TextContent>` as the `systemMessages` parameter in the `MessageRequest` or `StreamMessageRequest` constructor.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
systemMessages: [
|
||||||
|
new TextContent("You are a internationally renowned poet. You excel at writing haikus."),
|
||||||
|
new TextContent("You have been asked to write a haiku about the ocean.")
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Prompt Caching
|
||||||
|
|
||||||
|
Anthropic provides a feature called [Prompt Caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) that allows you to cache all or part of the prompt you send to the model. This can be used to improve the performance of your application by reducing latency and token usage. This feature is covered in depth in [Anthropic's API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching).
|
||||||
|
|
||||||
|
Prompt caching can be used to cache all parts of the prompt including system messages, user messages, and tools. You should refer to the [Anthropic API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) for specifics on limitations and requirements for using prompt caching. This library aims to make using prompt caching convenient and give you complete control over what parts of the prompt are cached. Currently there is only one type of cache control available - `EphemeralCacheControl`.
|
||||||
|
|
||||||
|
#### Caching System Messages
|
||||||
|
|
||||||
|
System messages can be cached by providing a `List<TextContent>` as the `systemMessages` parameter in the `MessageRequest` or `StreamMessageRequest` constructor and having one or more of the `TextContent` instances have the `CacheControl` property set.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
systemMessages: [
|
||||||
|
new TextContent("You are a internationally renowned poet. You excel at writing haikus. Please use the following as examples."),
|
||||||
|
new TextContent(exampleHaikus, new EphemeralCacheControl())
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Caching User Messages
|
||||||
|
|
||||||
|
User messages can be cached by providing a `List<Content>` as the `messages` parameter in the `MessageRequest` or `StreamMessageRequest` constructor and having one or more of the `Content` instances have the `CacheControl` property set.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[
|
||||||
|
new TextContent("Please write a haiku about the ocean. Here are some examples of haikus I like."),
|
||||||
|
new TextContent(exampleHaikus, new EphemeralCacheControl())
|
||||||
|
]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Caching Tools
|
||||||
|
|
||||||
|
Tools can be cached by providing a `List<Tool>` as the `tools` parameter in the `MessageRequest` or `StreamMessageRequest` constructor and having one or more of the `Tool` instances have the `CacheControl` property set. This property can be set after the tool is created manually or by using one of the static methods on the `Tool` class.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var tool = (string location, string units) => $"The weather in {location} is 72 degrees {units}";
|
||||||
|
|
||||||
|
var getWeatherTool = Tool.CreateFromFunction(
|
||||||
|
"Get Weather",
|
||||||
|
"Get the weather for a location in the specified units",
|
||||||
|
tool,
|
||||||
|
new EphemeralCacheControl()
|
||||||
|
);
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("What is the weather in New York?")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
tools: [
|
||||||
|
// Lots of other tools
|
||||||
|
// ...
|
||||||
|
getWeatherTool
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
case ToolUseContent toolUseContent:
|
||||||
|
Console.WriteLine(toolUseContent.Name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### PDF Support
|
||||||
|
|
||||||
|
Anthropic provides a feature called [PDF Support](https://docs.anthropic.com/en/docs/build-with-claude/pdf-support) that allows Claude to support PDF input and understand both text and visual content within documents. This feature is covered in depth in [Anthropic's API Documentation](https://docs.anthropic.com/en/docs/build-with-claude/pdf-support).
|
||||||
|
|
||||||
|
PDF support can be used to provide a PDF document as input to the model. This can be used to provide additional context to the model or to ask for additional information from the model. This library aims to make using PDF support convenient by allowing you to provide the PDF document you want Anthropic's models to consider for use when creating a message.
|
||||||
|
|
||||||
|
#### PDF Document
|
||||||
|
|
||||||
|
You can provide a PDF document by providing its base64 encoded content as a `DocumentContent` instance in the list of messages in the `MessageRequest` or `StreamMessageRequest` constructor.
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var request = new MessageRequest(
|
||||||
|
model: AnthropicModels.Claude35Sonnet,
|
||||||
|
messages: [
|
||||||
|
new(MessageRole.User, [new TextContent("What is the title of this paper?")]),
|
||||||
|
new(MessageRole.User, [new DocumentContent("application/pdf", base64Data)])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<h1 id="AnthropicClient_AnthropicApiClient" data-uid="AnthropicClient.AnthropicApiClient" class="text-break">
|
<h1 id="AnthropicClient_AnthropicApiClient" data-uid="AnthropicClient.AnthropicApiClient" class="text-break">
|
||||||
Class AnthropicApiClient <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L32"><i class="bi bi-code-slash"></i></a>
|
Class AnthropicApiClient <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L39"><i class="bi bi-code-slash"></i></a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="facts text-secondary">
|
<div class="facts text-secondary">
|
||||||
@@ -163,7 +163,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient__ctor_System_String_System_Net_Http_HttpClient_" data-uid="AnthropicClient.AnthropicApiClient.#ctor(System.String,System.Net.Http.HttpClient)">
|
<h3 id="AnthropicClient_AnthropicApiClient__ctor_System_String_System_Net_Http_HttpClient_" data-uid="AnthropicClient.AnthropicApiClient.#ctor(System.String,System.Net.Http.HttpClient)">
|
||||||
AnthropicApiClient(string, HttpClient)
|
AnthropicApiClient(string, HttpClient)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L53"><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/#L61"><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.AnthropicApiClient.html">AnthropicApiClient</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.AnthropicApiClient.html">AnthropicApiClient</a> class.</p>
|
||||||
@@ -205,11 +205,50 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest)">
|
||||||
|
CountMessageTokensAsync(CountMessageTokensRequest)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L267"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.CountMessageTokensRequest.html">CountMessageTokensRequest</a></dt>
|
||||||
|
<dd><p>The count message tokens request.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h4 class="section">Returns</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a><<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a><<a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>>></dt>
|
||||||
|
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult<T></a> where T is <a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync*"></a>
|
<a id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
|
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
|
||||||
CreateMessageAsync(MessageRequest)
|
CreateMessageAsync(MessageRequest)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L72"><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/#L80"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a message asynchronously.</p>
|
<div class="markdown level1 summary"><p>Creates a message asynchronously.</p>
|
||||||
@@ -248,7 +287,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_StreamMessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.StreamMessageRequest)">
|
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_StreamMessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.StreamMessageRequest)">
|
||||||
CreateMessageAsync(StreamMessageRequest)
|
CreateMessageAsync(StreamMessageRequest)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L95"><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/#L103"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a message asynchronously and streams the response.</p>
|
<div class="markdown level1 summary"><p>Creates a message asynchronously and streams the response.</p>
|
||||||
@@ -287,7 +326,7 @@ Class AnthropicApiClient <a class="header-action link-secondary" title="View so
|
|||||||
</article>
|
</article>
|
||||||
|
|
||||||
<div class="contribution d-print-none">
|
<div class="contribution d-print-none">
|
||||||
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L32" class="edit-link">Edit this page</a>
|
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L39" class="edit-link">Edit this page</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -121,6 +121,45 @@ Interface IAnthropicApiClient <a class="header-action link-secondary" title="Vi
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest)">
|
||||||
|
CountMessageTokensAsync(CountMessageTokensRequest)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L35"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">Task<AnthropicResult<TokenCountResponse>> CountMessageTokensAsync(CountMessageTokensRequest request)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.CountMessageTokensRequest.html">CountMessageTokensRequest</a></dt>
|
||||||
|
<dd><p>The count message tokens request.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h4 class="section">Returns</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a><<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a><<a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>>></dt>
|
||||||
|
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult<T></a> where T is <a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync*"></a>
|
<a id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
|
<h3 id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,12 +154,74 @@ Class AnthropicModels <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_AnthropicModels_Claude35Sonnet" data-uid="AnthropicClient.Models.AnthropicModels.Claude35Sonnet">
|
<h3 id="AnthropicClient_Models_AnthropicModels_Claude35Haiku20241022" data-uid="AnthropicClient.Models.AnthropicModels.Claude35Haiku20241022">
|
||||||
Claude35Sonnet
|
Claude35Haiku20241022
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L66"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>The Claude-3.5 Sonnet model.</p>
|
<div class="markdown level1 summary"><p>The Claude 3.5 Haiku model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude35Haiku20241022 = "claude-3-5-haiku-20241022"</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_AnthropicModels_Claude35HaikuLatest" data-uid="AnthropicClient.Models.AnthropicModels.Claude35HaikuLatest">
|
||||||
|
Claude35HaikuLatest
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L71"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3.5 Haiku model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude35HaikuLatest = "claude-3-5-haiku-latest"</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_AnthropicModels_Claude35Sonnet" data-uid="AnthropicClient.Models.AnthropicModels.Claude35Sonnet">
|
||||||
|
Claude35Sonnet
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L36"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3.5 Sonnet model.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
@@ -185,12 +247,105 @@ Class AnthropicModels <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_AnthropicModels_Claude3Haiku" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Haiku">
|
<h3 id="AnthropicClient_Models_AnthropicModels_Claude35Sonnet20240620" data-uid="AnthropicClient.Models.AnthropicModels.Claude35Sonnet20240620">
|
||||||
Claude3Haiku
|
Claude35Sonnet20240620
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L26"><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/AnthropicModels.cs/#L41"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>The Claude-3 Haiku model.</p>
|
<div class="markdown level1 summary"><p>The Claude 3.5 Sonnet model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude35Sonnet20240620 = "claude-3-5-sonnet-20240620"</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_AnthropicModels_Claude35Sonnet20241022" data-uid="AnthropicClient.Models.AnthropicModels.Claude35Sonnet20241022">
|
||||||
|
Claude35Sonnet20241022
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L46"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3.5 Sonnet model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude35Sonnet20241022 = "claude-3-5-sonnet-20241022"</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_AnthropicModels_Claude35SonnetLatest" data-uid="AnthropicClient.Models.AnthropicModels.Claude35SonnetLatest">
|
||||||
|
Claude35SonnetLatest
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L51"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3.5 Sonnet model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude35SonnetLatest = "claude-3-5-sonnet-latest"</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_AnthropicModels_Claude3Haiku" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Haiku">
|
||||||
|
Claude3Haiku
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L56"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3 Haiku model.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
@@ -216,12 +371,43 @@ Class AnthropicModels <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_AnthropicModels_Claude3Haiku20240307" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Haiku20240307">
|
||||||
|
Claude3Haiku20240307
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L61"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3 Haiku model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude3Haiku20240307 = "claude-3-haiku-20240307"</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_AnthropicModels_Claude3Opus" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Opus">
|
<h3 id="AnthropicClient_Models_AnthropicModels_Claude3Opus" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Opus">
|
||||||
Claude3Opus
|
Claude3Opus
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L11"><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/AnthropicModels.cs/#L11"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>The Claude-3 Opus model.</p>
|
<div class="markdown level1 summary"><p>The Claude 3 Opus model.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
@@ -247,12 +433,74 @@ Class AnthropicModels <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_AnthropicModels_Claude3Sonnet" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Sonnet">
|
<h3 id="AnthropicClient_Models_AnthropicModels_Claude3Opus20241022" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Opus20241022">
|
||||||
Claude3Sonnet
|
Claude3Opus20241022
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.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/AnthropicModels.cs/#L16"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>The Claude-3 Sonnet model.</p>
|
<div class="markdown level1 summary"><p>The Claude 3 Opus model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude3Opus20241022 = "claude-3-opus-20240229"</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_AnthropicModels_Claude3OpusLatest" data-uid="AnthropicClient.Models.AnthropicModels.Claude3OpusLatest">
|
||||||
|
Claude3OpusLatest
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L21"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3 Opus model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude3OpusLatest = "claude-3-opus-latest"</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_AnthropicModels_Claude3Sonnet" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Sonnet">
|
||||||
|
Claude3Sonnet
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L26"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3 Sonnet model.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
@@ -278,6 +526,37 @@ Class AnthropicModels <a class="header-action link-secondary" title="View sourc
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_AnthropicModels_Claude3Sonnet20240229" data-uid="AnthropicClient.Models.AnthropicModels.Claude3Sonnet20240229">
|
||||||
|
Claude3Sonnet20240229
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/AnthropicModels.cs/#L31"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The Claude 3 Sonnet model.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Claude3Sonnet20240229 = "claude-3-sonnet-20240229"</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>
|
</article>
|
||||||
|
|
||||||
<div class="contribution d-print-none">
|
<div class="contribution d-print-none">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -162,9 +162,9 @@ Class BaseMessageRequest <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_BaseMessageRequest__ctor_" data-uid="AnthropicClient.Models.BaseMessageRequest.#ctor*"></a>
|
<a id="AnthropicClient_Models_BaseMessageRequest__ctor_" data-uid="AnthropicClient.Models.BaseMessageRequest.#ctor*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__System_Int32_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__System_Decimal_System_Nullable_System_Int32__System_Nullable_System_Decimal__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__System_Boolean_" data-uid="AnthropicClient.Models.BaseMessageRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},System.Int32,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Decimal,System.Nullable{System.Int32},System.Nullable{System.Decimal},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool},System.Boolean)">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__System_Int32_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__System_Decimal_System_Nullable_System_Int32__System_Nullable_System_Decimal__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__System_Boolean_System_Collections_Generic_List_System_String__System_Collections_Generic_List_AnthropicClient_Models_TextContent__" data-uid="AnthropicClient.Models.BaseMessageRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},System.Int32,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Decimal,System.Nullable{System.Int32},System.Nullable{System.Decimal},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool},System.Boolean,System.Collections.Generic.List{System.String},System.Collections.Generic.List{AnthropicClient.Models.TextContent})">
|
||||||
BaseMessageRequest(string, List<Message>, int, string?, Dictionary<string, object>?, decimal, int?, decimal?, ToolChoice?, List<Tool>?, bool)
|
BaseMessageRequest(string, List<Message>, int, string?, Dictionary<string, object>?, decimal, int?, decimal?, ToolChoice?, List<Tool>?, bool, List<string>?, List<TextContent>?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L98"><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/BaseMessageRequest.cs/#L134"><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.BaseMessageRequest.html">BaseMessageRequest</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html">BaseMessageRequest</a> class.</p>
|
||||||
@@ -172,7 +172,7 @@ Class BaseMessageRequest <a class="header-action link-secondary" title="View so
|
|||||||
<div class="markdown level1 conceptual"></div>
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
<div class="codewrapper">
|
<div class="codewrapper">
|
||||||
<pre><code class="lang-csharp hljs">protected BaseMessageRequest(string model, List<Message> messages, int maxTokens = 1024, string? system = null, Dictionary<string, object>? metadata = null, decimal temperature = 0.0, int? topK = null, decimal? topP = null, ToolChoice? toolChoice = null, List<Tool>? tools = null, bool stream = false)</code></pre>
|
<pre><code class="lang-csharp hljs">protected BaseMessageRequest(string model, List<Message> messages, int maxTokens, string? system, Dictionary<string, object>? metadata, decimal temperature, int? topK, decimal? topP, ToolChoice? toolChoice, List<Tool>? tools, bool stream, List<string>? stopSequences, List<TextContent>? systemMessages)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -187,7 +187,7 @@ Class BaseMessageRequest <a class="header-action link-secondary" title="View so
|
|||||||
<dd><p>The maximum number of tokens to generate.</p>
|
<dd><p>The maximum number of tokens to generate.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>system</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
<dt><code>system</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
<dd><p>The system ID to use for the request.</p>
|
<dd><p>The system prompt to use for the request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>metadata</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
<dt><code>metadata</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
||||||
<dd><p>The metadata to include with the request.</p>
|
<dd><p>The metadata to include with the request.</p>
|
||||||
@@ -209,6 +209,12 @@ Class BaseMessageRequest <a class="header-action link-secondary" title="View so
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
<dt><code>stream</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
||||||
<dd><p>A value indicating whether the message should be streamed.</p>
|
<dd><p>A value indicating whether the message should be streamed.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>stopSequences</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
||||||
|
<dd><p>The prompt stop sequences.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>systemMessages</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><p>The system messages to use for the request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -222,9 +228,6 @@ Class BaseMessageRequest <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h4 class="section">Exceptions</h4>
|
<h4 class="section">Exceptions</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
|
|
||||||
<dd><p>Thrown when the model ID is invalid.</p>
|
|
||||||
</dd>
|
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
<dd><p>Thrown when the model or messages is null.</p>
|
<dd><p>Thrown when the model or messages is null.</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -249,7 +252,7 @@ Class BaseMessageRequest <a class="header-action link-secondary" title="View so
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_MaxTokens" data-uid="AnthropicClient.Models.BaseMessageRequest.MaxTokens">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_MaxTokens" data-uid="AnthropicClient.Models.BaseMessageRequest.MaxTokens">
|
||||||
MaxTokens
|
MaxTokens
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L30"><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/BaseMessageRequest.cs/#L65"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the maximum number of tokens to generate.</p>
|
<div class="markdown level1 summary"><p>Gets the maximum number of tokens to generate.</p>
|
||||||
@@ -282,7 +285,7 @@ public int MaxTokens { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_Messages" data-uid="AnthropicClient.Models.BaseMessageRequest.Messages">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_Messages" data-uid="AnthropicClient.Models.BaseMessageRequest.Messages">
|
||||||
Messages
|
Messages
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L25"><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/BaseMessageRequest.cs/#L60"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the messages to send to the model.</p>
|
<div class="markdown level1 summary"><p>Gets the messages to send to the model.</p>
|
||||||
@@ -314,7 +317,7 @@ public int MaxTokens { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_Metadata" data-uid="AnthropicClient.Models.BaseMessageRequest.Metadata">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_Metadata" data-uid="AnthropicClient.Models.BaseMessageRequest.Metadata">
|
||||||
Metadata
|
Metadata
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L36"><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/BaseMessageRequest.cs/#L71"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the metadata to include with the request.</p>
|
<div class="markdown level1 summary"><p>Gets the metadata to include with the request.</p>
|
||||||
@@ -378,7 +381,7 @@ public int MaxTokens { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_StopSequences" data-uid="AnthropicClient.Models.BaseMessageRequest.StopSequences">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_StopSequences" data-uid="AnthropicClient.Models.BaseMessageRequest.StopSequences">
|
||||||
StopSequences
|
StopSequences
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.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/BaseMessageRequest.cs/#L76"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the prompt stop sequences.</p>
|
<div class="markdown level1 summary"><p>Gets the prompt stop sequences.</p>
|
||||||
@@ -411,7 +414,7 @@ public List<string> StopSequences { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_Stream" data-uid="AnthropicClient.Models.BaseMessageRequest.Stream">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_Stream" data-uid="AnthropicClient.Models.BaseMessageRequest.Stream">
|
||||||
Stream
|
Stream
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L73"><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/BaseMessageRequest.cs/#L108"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets a value indicating whether the message should be streamed.</p>
|
<div class="markdown level1 summary"><p>Gets a value indicating whether the message should be streamed.</p>
|
||||||
@@ -443,15 +446,16 @@ public List<string> StopSequences { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_System" data-uid="AnthropicClient.Models.BaseMessageRequest.System">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_System" data-uid="AnthropicClient.Models.BaseMessageRequest.System">
|
||||||
System
|
System
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L20"><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/BaseMessageRequest.cs/#L25"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the system ID to use for the request.</p>
|
<div class="markdown level1 summary"><p>Gets the system message that will be used as the system prompt if no system messages are provided.</p>
|
||||||
</div>
|
</div>
|
||||||
<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 string? System { get; init; }</code></pre>
|
<pre><code class="lang-csharp hljs">[JsonIgnore]
|
||||||
|
public string? System { get; init; }</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -471,11 +475,79 @@ public List<string> StopSequences { get; init; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_BaseMessageRequest_SystemMessages_" data-uid="AnthropicClient.Models.BaseMessageRequest.SystemMessages*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_SystemMessages" data-uid="AnthropicClient.Models.BaseMessageRequest.SystemMessages">
|
||||||
|
SystemMessages
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L31"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the system messages to send to the model to be used as the system prompt.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonIgnore]
|
||||||
|
public List<TextContent>? SystemMessages { 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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_BaseMessageRequest_SystemPrompt_" data-uid="AnthropicClient.Models.BaseMessageRequest.SystemPrompt*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_SystemPrompt" data-uid="AnthropicClient.Models.BaseMessageRequest.SystemPrompt">
|
||||||
|
SystemPrompt
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L39"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the system prompt that will be used for the request.
|
||||||
|
If will return the system messages if they are provided, otherwise it will return the system message.
|
||||||
|
If neither are provided, it will return null.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("system")]
|
||||||
|
public List<TextContent>? SystemPrompt { 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.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a>></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_BaseMessageRequest_Temperature_" data-uid="AnthropicClient.Models.BaseMessageRequest.Temperature*"></a>
|
<a id="AnthropicClient_Models_BaseMessageRequest_Temperature_" data-uid="AnthropicClient.Models.BaseMessageRequest.Temperature*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_Temperature" data-uid="AnthropicClient.Models.BaseMessageRequest.Temperature">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_Temperature" data-uid="AnthropicClient.Models.BaseMessageRequest.Temperature">
|
||||||
Temperature
|
Temperature
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.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/BaseMessageRequest.cs/#L82"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the temperature to use for the request.</p>
|
<div class="markdown level1 summary"><p>Gets the temperature to use for the request.</p>
|
||||||
@@ -507,7 +579,7 @@ public List<string> StopSequences { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_ToolChoice" data-uid="AnthropicClient.Models.BaseMessageRequest.ToolChoice">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_ToolChoice" data-uid="AnthropicClient.Models.BaseMessageRequest.ToolChoice">
|
||||||
ToolChoice
|
ToolChoice
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L62"><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/BaseMessageRequest.cs/#L97"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the tool choice mode to use for the request.</p>
|
<div class="markdown level1 summary"><p>Gets the tool choice mode to use for the request.</p>
|
||||||
@@ -540,7 +612,7 @@ public ToolChoice? ToolChoice { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_Tools" data-uid="AnthropicClient.Models.BaseMessageRequest.Tools">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_Tools" data-uid="AnthropicClient.Models.BaseMessageRequest.Tools">
|
||||||
Tools
|
Tools
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L68"><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/BaseMessageRequest.cs/#L103"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the tools to use for the request.</p>
|
<div class="markdown level1 summary"><p>Gets the tools to use for the request.</p>
|
||||||
@@ -572,7 +644,7 @@ public ToolChoice? ToolChoice { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_TopK" data-uid="AnthropicClient.Models.BaseMessageRequest.TopK">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_TopK" data-uid="AnthropicClient.Models.BaseMessageRequest.TopK">
|
||||||
TopK
|
TopK
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L52"><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/BaseMessageRequest.cs/#L87"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the top-K value to use for the request.</p>
|
<div class="markdown level1 summary"><p>Gets the top-K value to use for the request.</p>
|
||||||
@@ -604,7 +676,7 @@ public ToolChoice? ToolChoice { get; init; }</code></pre>
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_BaseMessageRequest_TopP" data-uid="AnthropicClient.Models.BaseMessageRequest.TopP">
|
<h3 id="AnthropicClient_Models_BaseMessageRequest_TopP" data-uid="AnthropicClient.Models.BaseMessageRequest.TopP">
|
||||||
TopP
|
TopP
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L57"><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/BaseMessageRequest.cs/#L92"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the top-P value to use for the request.</p>
|
<div class="markdown level1 summary"><p>Gets the top-P value to use for the request.</p>
|
||||||
|
|||||||
@@ -0,0 +1,262 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CacheControl | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CacheControl | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents the cache control to be used for 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_CacheControl.md&value=---%0Auid%3A%20AnthropicClient.Models.CacheControl%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.CacheControl">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CacheControl" data-uid="AnthropicClient.Models.CacheControl" class="text-break">
|
||||||
|
Class CacheControl <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CacheControl.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 the cache control to be used for content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public abstract class CacheControl</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">CacheControl</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist derived">
|
||||||
|
<dt>Derived</dt>
|
||||||
|
<dd>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.EphemeralCacheControl.html">EphemeralCacheControl</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_CacheControl__ctor_" data-uid="AnthropicClient.Models.CacheControl.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CacheControl__ctor_System_String_" data-uid="AnthropicClient.Models.CacheControl.#ctor(System.String)">
|
||||||
|
CacheControl(string)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CacheControl.cs/#L21"><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.CacheControl.html">CacheControl</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">protected CacheControl(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 cache control.</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 type is null or whitespace.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CacheControl_Type_" data-uid="AnthropicClient.Models.CacheControl.Type*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CacheControl_Type" data-uid="AnthropicClient.Models.CacheControl.Type">
|
||||||
|
Type
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CacheControl.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the type of the cache control.</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/CacheControl.cs/#L8" class="edit-link">Edit this page</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="affix">
|
||||||
|
<nav id="affix"></nav>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<div class="container-xxl search-results" id="search-results"></div>
|
||||||
|
|
||||||
|
<footer class="border-top text-secondary">
|
||||||
|
<div class="container-xxl">
|
||||||
|
<div class="flex-fill">
|
||||||
|
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CacheControlType | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CacheControlType | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Provides constants for cache control types.">
|
||||||
|
<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_CacheControlType.md&value=---%0Auid%3A%20AnthropicClient.Models.CacheControlType%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.CacheControlType">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CacheControlType" data-uid="AnthropicClient.Models.CacheControlType" class="text-break">
|
||||||
|
Class CacheControlType <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CacheControlType.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>Provides constants for cache control types.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public static class CacheControlType</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">CacheControlType</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_CacheControlType_Ephemeral" data-uid="AnthropicClient.Models.CacheControlType.Ephemeral">
|
||||||
|
Ephemeral
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CacheControlType.cs/#L11"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The cache control type for an ephemeral cache.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Ephemeral = "ephemeral"</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/CacheControlType.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>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -120,6 +120,7 @@ Class Content <a class="header-action link-secondary" title="View source" href=
|
|||||||
<dl class="typelist derived">
|
<dl class="typelist derived">
|
||||||
<dt>Derived</dt>
|
<dt>Derived</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
<div><a class="xref" href="AnthropicClient.Models.DocumentContent.html">DocumentContent</a></div>
|
||||||
<div><a class="xref" href="AnthropicClient.Models.ImageContent.html">ImageContent</a></div>
|
<div><a class="xref" href="AnthropicClient.Models.ImageContent.html">ImageContent</a></div>
|
||||||
<div><a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a></div>
|
<div><a class="xref" href="AnthropicClient.Models.TextContent.html">TextContent</a></div>
|
||||||
<div><a class="xref" href="AnthropicClient.Models.ToolResultContent.html">ToolResultContent</a></div>
|
<div><a class="xref" href="AnthropicClient.Models.ToolResultContent.html">ToolResultContent</a></div>
|
||||||
@@ -166,7 +167,7 @@ Class Content <a class="header-action link-secondary" title="View source" href=
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Content__ctor_System_String_" data-uid="AnthropicClient.Models.Content.#ctor(System.String)">
|
<h3 id="AnthropicClient_Models_Content__ctor_System_String_" data-uid="AnthropicClient.Models.Content.#ctor(System.String)">
|
||||||
Content(string)
|
Content(string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Content.cs/#L25"><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/Content.cs/#L31"><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.Content.html">Content</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.Content.html">Content</a> class.</p>
|
||||||
@@ -195,10 +196,79 @@ Class Content <a class="header-action link-secondary" title="View source" href=
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Content__ctor_" data-uid="AnthropicClient.Models.Content.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Content__ctor_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Content.#ctor(System.String,AnthropicClient.Models.CacheControl)">
|
||||||
|
Content(string, CacheControl)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Content.cs/#L42"><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.Content.html">Content</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">protected Content(string type, CacheControl cacheControl)</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 content.</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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section" id="properties">Properties
|
<h2 class="section" id="properties">Properties
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Content_CacheControl_" data-uid="AnthropicClient.Models.Content.CacheControl*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Content_CacheControl" data-uid="AnthropicClient.Models.Content.CacheControl">
|
||||||
|
CacheControl
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Content.cs/#L18"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the cache control to be used for the content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("cache_control")]
|
||||||
|
public CacheControl? CacheControl { get; set; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CacheControl.html">CacheControl</a></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_Content_Type_" data-uid="AnthropicClient.Models.Content.Type*"></a>
|
<a id="AnthropicClient_Models_Content_Type_" data-uid="AnthropicClient.Models.Content.Type*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Content_Type" data-uid="AnthropicClient.Models.Content.Type">
|
<h3 id="AnthropicClient_Models_Content_Type" data-uid="AnthropicClient.Models.Content.Type">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -154,6 +154,37 @@ Class ContentType <a class="header-action link-secondary" title="View source" h
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ContentType_Document" data-uid="AnthropicClient.Models.ContentType.Document">
|
||||||
|
Document
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentType.cs/#L31"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Represents the document content type.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public const string Document = "document"</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_ContentType_Image" data-uid="AnthropicClient.Models.ContentType.Image">
|
<h3 id="AnthropicClient_Models_ContentType_Image" data-uid="AnthropicClient.Models.ContentType.Image">
|
||||||
Image
|
Image
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ContentType.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/ContentType.cs/#L16"><i class="bi bi-code-slash"></i></a>
|
||||||
|
|||||||
@@ -0,0 +1,401 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class CountMessageTokensRequest | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class CountMessageTokensRequest | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a request to count the number of tokens in a message.">
|
||||||
|
<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_CountMessageTokensRequest.md&value=---%0Auid%3A%20AnthropicClient.Models.CountMessageTokensRequest%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.CountMessageTokensRequest">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_CountMessageTokensRequest" data-uid="AnthropicClient.Models.CountMessageTokensRequest" class="text-break">
|
||||||
|
Class CountMessageTokensRequest <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.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 request to count the number of tokens in a message.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class CountMessageTokensRequest</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">CountMessageTokensRequest</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
||||||
|
</div>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="constructors">Constructors
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CountMessageTokensRequest__ctor_" data-uid="AnthropicClient.Models.CountMessageTokensRequest.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CountMessageTokensRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__System_Collections_Generic_List_AnthropicClient_Models_TextContent__" data-uid="AnthropicClient.Models.CountMessageTokensRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool},System.Collections.Generic.List{AnthropicClient.Models.TextContent})">
|
||||||
|
CountMessageTokensRequest(string, List<Message>, ToolChoice?, List<Tool>?, List<TextContent>?)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.cs/#L50"><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.CountMessageTokensRequest.html">CountMessageTokensRequest</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public CountMessageTokensRequest(string model, List<Message> messages, ToolChoice? toolChoice = null, List<Tool>? tools = null, List<TextContent>? systemPrompt = null)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>model</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The model ID to use for the request.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>messages</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.Message.html">Message</a>></dt>
|
||||||
|
<dd><p>The messages to count the number of tokens in.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>toolChoice</code> <a class="xref" href="AnthropicClient.Models.ToolChoice.html">ToolChoice</a></dt>
|
||||||
|
<dd><p>The tool choice mode to use for the request.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>tools</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.Tool.html">Tool</a>></dt>
|
||||||
|
<dd><p>The tools to use for the request.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>systemPrompt</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><p>The system prompt to use for the request.</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">model</code> or <code class="paramref">messages</code> is null.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
|
||||||
|
<dd><p>Thrown when <code class="paramref">messages</code> is empty.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CountMessageTokensRequest_Messages_" data-uid="AnthropicClient.Models.CountMessageTokensRequest.Messages*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CountMessageTokensRequest_Messages" data-uid="AnthropicClient.Models.CountMessageTokensRequest.Messages">
|
||||||
|
Messages
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.cs/#L20"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the messages to count the number of tokens in.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public List<Message> Messages { 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.Message.html">Message</a>></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CountMessageTokensRequest_Model_" data-uid="AnthropicClient.Models.CountMessageTokensRequest.Model*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CountMessageTokensRequest_Model" data-uid="AnthropicClient.Models.CountMessageTokensRequest.Model">
|
||||||
|
Model
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the model ID to be used for the request.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public string Model { 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_CountMessageTokensRequest_SystemPrompt_" data-uid="AnthropicClient.Models.CountMessageTokensRequest.SystemPrompt*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CountMessageTokensRequest_SystemPrompt" data-uid="AnthropicClient.Models.CountMessageTokensRequest.SystemPrompt">
|
||||||
|
SystemPrompt
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.cs/#L36"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the system prompt to use for the request.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("system")]
|
||||||
|
public List<TextContent>? SystemPrompt { 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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CountMessageTokensRequest_ToolChoice_" data-uid="AnthropicClient.Models.CountMessageTokensRequest.ToolChoice*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CountMessageTokensRequest_ToolChoice" data-uid="AnthropicClient.Models.CountMessageTokensRequest.ToolChoice">
|
||||||
|
ToolChoice
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.cs/#L25"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the tool choice mode to use for the request.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("tool_choice")]
|
||||||
|
public ToolChoice? ToolChoice { get; init; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.ToolChoice.html">ToolChoice</a></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_CountMessageTokensRequest_Tools_" data-uid="AnthropicClient.Models.CountMessageTokensRequest.Tools*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_CountMessageTokensRequest_Tools" data-uid="AnthropicClient.Models.CountMessageTokensRequest.Tools">
|
||||||
|
Tools
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/CountMessageTokensRequest.cs/#L31"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the tools to use for the request.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public List<Tool>? Tools { 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.Tool.html">Tool</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/CountMessageTokensRequest.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,311 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class DocumentContent | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class DocumentContent | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents content from a document that is part of a message.">
|
||||||
|
<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_DocumentContent.md&value=---%0Auid%3A%20AnthropicClient.Models.DocumentContent%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.DocumentContent">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_DocumentContent" data-uid="AnthropicClient.Models.DocumentContent" class="text-break">
|
||||||
|
Class DocumentContent <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.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 content from a document that is part of a message.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class DocumentContent : Content</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.Content.html">Content</a></div>
|
||||||
|
<div><span class="xref">DocumentContent</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_CacheControl">Content.CacheControl</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_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)">
|
||||||
|
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>
|
||||||
|
</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>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public DocumentContent(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 document.</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 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 media type or data is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentContent__ctor_" data-uid="AnthropicClient.Models.DocumentContent.#ctor*"></a>
|
||||||
|
|
||||||
|
<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)
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public DocumentContent(string mediaType, string data, CacheControl cacheControl)</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 document.</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 document.</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 media type, data, or cache control is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="properties">Properties
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<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">
|
||||||
|
Source
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentContent.cs/#L15"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the source of the document.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public DocumentSource Source { get; init; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.DocumentSource.html">DocumentSource</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/DocumentContent.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,327 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class DocumentSource | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class DocumentSource | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a 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_DocumentSource.md&value=---%0Auid%3A%20AnthropicClient.Models.DocumentSource%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.DocumentSource">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_DocumentSource" data-uid="AnthropicClient.Models.DocumentSource" class="text-break">
|
||||||
|
Class DocumentSource <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentSource.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 document source.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class DocumentSource</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">DocumentSource</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
||||||
|
</div>
|
||||||
|
</dd></dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h2 class="section" id="constructors">Constructors
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_DocumentSource__ctor_" data-uid="AnthropicClient.Models.DocumentSource.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_DocumentSource__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.DocumentSource.#ctor(System.String,System.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>
|
||||||
|
</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>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public DocumentSource(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 document.</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 document.</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_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>
|
||||||
|
|
||||||
|
<div class="contribution d-print-none">
|
||||||
|
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/DocumentSource.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,212 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class EphemeralCacheControl | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class EphemeralCacheControl | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents the cache control to be used for 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_EphemeralCacheControl.md&value=---%0Auid%3A%20AnthropicClient.Models.EphemeralCacheControl%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.EphemeralCacheControl">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_EphemeralCacheControl" data-uid="AnthropicClient.Models.EphemeralCacheControl" class="text-break">
|
||||||
|
Class EphemeralCacheControl <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/EphemeralCacheControl.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 cache control to be used for content.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class EphemeralCacheControl : CacheControl</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.CacheControl.html">CacheControl</a></div>
|
||||||
|
<div><span class="xref">EphemeralCacheControl</span></div>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<dl class="typelist inheritedMembers">
|
||||||
|
<dt>Inherited Members</dt>
|
||||||
|
<dd>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.CacheControl.html#AnthropicClient_Models_CacheControl_Type">CacheControl.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_EphemeralCacheControl__ctor_" data-uid="AnthropicClient.Models.EphemeralCacheControl.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_EphemeralCacheControl__ctor" data-uid="AnthropicClient.Models.EphemeralCacheControl.#ctor">
|
||||||
|
EphemeralCacheControl()
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/EphemeralCacheControl.cs/#L12"><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.EphemeralCacheControl.html">EphemeralCacheControl</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public EphemeralCacheControl()</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<div class="contribution d-print-none">
|
||||||
|
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/EphemeralCacheControl.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>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +125,9 @@ Class ImageContent <a class="header-action link-secondary" title="View source"
|
|||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_CacheControl">Content.CacheControl</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>
|
||||||
@@ -161,7 +164,7 @@ Class ImageContent <a class="header-action link-secondary" title="View source"
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_ImageContent__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.ImageContent.#ctor(System.String,System.String)">
|
<h3 id="AnthropicClient_Models_ImageContent__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.ImageContent.#ctor(System.String,System.String)">
|
||||||
ImageContent(string, string)
|
ImageContent(string, string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ImageContent.cs/#L29"><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/ImageContent.cs/#L35"><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.ImageContent.html">ImageContent</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.ImageContent.html">ImageContent</a> class.</p>
|
||||||
@@ -199,6 +202,51 @@ Class ImageContent <a class="header-action link-secondary" title="View source"
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_ImageContent__ctor_" data-uid="AnthropicClient.Models.ImageContent.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ImageContent__ctor_System_String_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.ImageContent.#ctor(System.String,System.String,AnthropicClient.Models.CacheControl)">
|
||||||
|
ImageContent(string, string, CacheControl)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ImageContent.cs/#L50"><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.ImageContent.html">ImageContent</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public ImageContent(string mediaType, string data, CacheControl cacheControl)</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 image.</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 image.</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 media type, data, or cache control is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section" id="properties">Properties
|
<h2 class="section" id="properties">Properties
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -157,7 +157,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/#L36"><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/#L41"><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>
|
||||||
@@ -267,6 +267,38 @@ public string MediaType { get; init; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -128,6 +128,12 @@ Class MessageRequest <a class="header-action link-secondary" title="View source
|
|||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_System">BaseMessageRequest.System</a>
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_System">BaseMessageRequest.System</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_SystemMessages">BaseMessageRequest.SystemMessages</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_SystemPrompt">BaseMessageRequest.SystemPrompt</a>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_Messages">BaseMessageRequest.Messages</a>
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_Messages">BaseMessageRequest.Messages</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -192,9 +198,9 @@ Class MessageRequest <a class="header-action link-secondary" title="View source
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_MessageRequest__ctor_" data-uid="AnthropicClient.Models.MessageRequest.#ctor*"></a>
|
<a id="AnthropicClient_Models_MessageRequest__ctor_" data-uid="AnthropicClient.Models.MessageRequest.#ctor*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_MessageRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__System_Int32_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__System_Decimal_System_Nullable_System_Int32__System_Nullable_System_Decimal__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__" data-uid="AnthropicClient.Models.MessageRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},System.Int32,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Decimal,System.Nullable{System.Int32},System.Nullable{System.Decimal},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool})">
|
<h3 id="AnthropicClient_Models_MessageRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__System_Int32_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__System_Decimal_System_Nullable_System_Int32__System_Nullable_System_Decimal__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__System_Collections_Generic_List_System_String__System_Collections_Generic_List_AnthropicClient_Models_TextContent__" data-uid="AnthropicClient.Models.MessageRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},System.Int32,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Decimal,System.Nullable{System.Int32},System.Nullable{System.Decimal},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool},System.Collections.Generic.List{System.String},System.Collections.Generic.List{AnthropicClient.Models.TextContent})">
|
||||||
MessageRequest(string, List<Message>, int, string?, Dictionary<string, object>?, decimal, int?, decimal?, ToolChoice?, List<Tool>?)
|
MessageRequest(string, List<Message>, int, string?, Dictionary<string, object>?, decimal, int?, decimal?, ToolChoice?, List<Tool>?, List<string>?, List<TextContent>?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/MessageRequest.cs/#L32"><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/MessageRequest.cs/#L33"><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.MessageRequest.html">MessageRequest</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.MessageRequest.html">MessageRequest</a> class.</p>
|
||||||
@@ -202,7 +208,7 @@ Class MessageRequest <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 MessageRequest(string model, List<Message> messages, int maxTokens = 1024, string? system = null, Dictionary<string, object>? metadata = null, decimal temperature = 0.0, int? topK = null, decimal? topP = null, ToolChoice? toolChoice = null, List<Tool>? tools = null)</code></pre>
|
<pre><code class="lang-csharp hljs">public MessageRequest(string model, List<Message> messages, int maxTokens = 1024, string? system = null, Dictionary<string, object>? metadata = null, decimal temperature = 0.0, int? topK = null, decimal? topP = null, ToolChoice? toolChoice = null, List<Tool>? tools = null, List<string>? stopSequences = null, List<TextContent>? systemMessages = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -217,7 +223,7 @@ Class MessageRequest <a class="header-action link-secondary" title="View source
|
|||||||
<dd><p>The maximum number of tokens to generate.</p>
|
<dd><p>The maximum number of tokens to generate.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>system</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
<dt><code>system</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
<dd><p>The system ID to use for the request.</p>
|
<dd><p>The system prompt to use for the request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>metadata</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
<dt><code>metadata</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
||||||
<dd><p>The metadata to include with the request.</p>
|
<dd><p>The metadata to include with the request.</p>
|
||||||
@@ -236,6 +242,12 @@ Class MessageRequest <a class="header-action link-secondary" title="View source
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>tools</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.Tool.html">Tool</a>></dt>
|
<dt><code>tools</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.Tool.html">Tool</a>></dt>
|
||||||
<dd><p>The tools to use for the request.</p>
|
<dd><p>The tools to use for the request.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>stopSequences</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
||||||
|
<dd><p>The prompt stop sequences.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>systemMessages</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><p>The system messages to include with the request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -249,9 +261,6 @@ Class MessageRequest <a class="header-action link-secondary" title="View source
|
|||||||
|
|
||||||
<h4 class="section">Exceptions</h4>
|
<h4 class="section">Exceptions</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
|
|
||||||
<dd><p>Thrown when the model ID is invalid.</p>
|
|
||||||
</dd>
|
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
<dd><p>Thrown when the model or messages is null.</p>
|
<dd><p>Thrown when the model or messages is null.</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -128,6 +128,12 @@ Class StreamMessageRequest <a class="header-action link-secondary" title="View
|
|||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_System">BaseMessageRequest.System</a>
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_System">BaseMessageRequest.System</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_SystemMessages">BaseMessageRequest.SystemMessages</a>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_SystemPrompt">BaseMessageRequest.SystemPrompt</a>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_Messages">BaseMessageRequest.Messages</a>
|
<a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html#AnthropicClient_Models_BaseMessageRequest_Messages">BaseMessageRequest.Messages</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -192,9 +198,9 @@ Class StreamMessageRequest <a class="header-action link-secondary" title="View
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_StreamMessageRequest__ctor_" data-uid="AnthropicClient.Models.StreamMessageRequest.#ctor*"></a>
|
<a id="AnthropicClient_Models_StreamMessageRequest__ctor_" data-uid="AnthropicClient.Models.StreamMessageRequest.#ctor*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_StreamMessageRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__System_Int32_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__System_Decimal_System_Nullable_System_Int32__System_Nullable_System_Decimal__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__" data-uid="AnthropicClient.Models.StreamMessageRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},System.Int32,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Decimal,System.Nullable{System.Int32},System.Nullable{System.Decimal},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool})">
|
<h3 id="AnthropicClient_Models_StreamMessageRequest__ctor_System_String_System_Collections_Generic_List_AnthropicClient_Models_Message__System_Int32_System_String_System_Collections_Generic_Dictionary_System_String_System_Object__System_Decimal_System_Nullable_System_Int32__System_Nullable_System_Decimal__AnthropicClient_Models_ToolChoice_System_Collections_Generic_List_AnthropicClient_Models_Tool__System_Collections_Generic_List_System_String__System_Collections_Generic_List_AnthropicClient_Models_TextContent__" data-uid="AnthropicClient.Models.StreamMessageRequest.#ctor(System.String,System.Collections.Generic.List{AnthropicClient.Models.Message},System.Int32,System.String,System.Collections.Generic.Dictionary{System.String,System.Object},System.Decimal,System.Nullable{System.Int32},System.Nullable{System.Decimal},AnthropicClient.Models.ToolChoice,System.Collections.Generic.List{AnthropicClient.Models.Tool},System.Collections.Generic.List{System.String},System.Collections.Generic.List{AnthropicClient.Models.TextContent})">
|
||||||
StreamMessageRequest(string, List<Message>, int, string?, Dictionary<string, object>?, decimal, int?, decimal?, ToolChoice?, List<Tool>?)
|
StreamMessageRequest(string, List<Message>, int, string?, Dictionary<string, object>?, decimal, int?, decimal?, ToolChoice?, List<Tool>?, List<string>?, List<TextContent>?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/StreamMessageRequest.cs/#L32"><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/StreamMessageRequest.cs/#L33"><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.StreamMessageRequest.html">StreamMessageRequest</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.StreamMessageRequest.html">StreamMessageRequest</a> class.</p>
|
||||||
@@ -202,7 +208,7 @@ Class StreamMessageRequest <a class="header-action link-secondary" title="View
|
|||||||
<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 StreamMessageRequest(string model, List<Message> messages, int maxTokens = 1024, string? system = null, Dictionary<string, object>? metadata = null, decimal temperature = 0.0, int? topK = null, decimal? topP = null, ToolChoice? toolChoice = null, List<Tool>? tools = null)</code></pre>
|
<pre><code class="lang-csharp hljs">public StreamMessageRequest(string model, List<Message> messages, int maxTokens = 1024, string? system = null, Dictionary<string, object>? metadata = null, decimal temperature = 0.0, int? topK = null, decimal? topP = null, ToolChoice? toolChoice = null, List<Tool>? tools = null, List<string>? stopSequences = null, List<TextContent>? systemMessages = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -217,7 +223,7 @@ Class StreamMessageRequest <a class="header-action link-secondary" title="View
|
|||||||
<dd><p>The maximum number of tokens to generate.</p>
|
<dd><p>The maximum number of tokens to generate.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>system</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
<dt><code>system</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
<dd><p>The system ID to use for the request.</p>
|
<dd><p>The system prompt to use for the request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><code>metadata</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
<dt><code>metadata</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.dictionary-2">Dictionary</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a>></dt>
|
||||||
<dd><p>The metadata to include with the request.</p>
|
<dd><p>The metadata to include with the request.</p>
|
||||||
@@ -236,6 +242,12 @@ Class StreamMessageRequest <a class="header-action link-secondary" title="View
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>tools</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.Tool.html">Tool</a>></dt>
|
<dt><code>tools</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="AnthropicClient.Models.Tool.html">Tool</a>></dt>
|
||||||
<dd><p>The tools to use for the request.</p>
|
<dd><p>The tools to use for the request.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>stopSequences</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>></dt>
|
||||||
|
<dd><p>The prompt stop sequences.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>systemMessages</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><p>The system messages to include with the request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -249,9 +261,6 @@ Class StreamMessageRequest <a class="header-action link-secondary" title="View
|
|||||||
|
|
||||||
<h4 class="section">Exceptions</h4>
|
<h4 class="section">Exceptions</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
|
|
||||||
<dd><p>Thrown when the model ID is invalid.</p>
|
|
||||||
</dd>
|
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
<dd><p>Thrown when the model or messages is null.</p>
|
<dd><p>Thrown when the model or messages is null.</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +125,9 @@ Class TextContent <a class="header-action link-secondary" title="View source" h
|
|||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_CacheControl">Content.CacheControl</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>
|
||||||
@@ -161,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/#L28"><i class="bi bi-code-slash"></i></a>
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TextContent.cs/#L33"><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>
|
||||||
@@ -196,6 +199,48 @@ Class TextContent <a class="header-action link-secondary" title="View source" h
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_TextContent__ctor_" data-uid="AnthropicClient.Models.TextContent.#ctor*"></a>
|
||||||
|
|
||||||
|
<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)
|
||||||
|
<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>
|
||||||
|
</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>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public TextContent(string text, CacheControl cacheControl)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>text</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The text of the content.</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 text or cache control is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h2 class="section" id="properties">Properties
|
<h2 class="section" id="properties">Properties
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,214 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Class TokenCountResponse | AnthropicClient </title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta name="title" content="Class TokenCountResponse | AnthropicClient ">
|
||||||
|
|
||||||
|
<meta name="description" content="Represents a response to a token count request.">
|
||||||
|
<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_TokenCountResponse.md&value=---%0Auid%3A%20AnthropicClient.Models.TokenCountResponse%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.TokenCountResponse">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="AnthropicClient_Models_TokenCountResponse" data-uid="AnthropicClient.Models.TokenCountResponse" class="text-break">
|
||||||
|
Class TokenCountResponse <a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TokenCountResponse.cs/#L8"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div class="facts text-secondary">
|
||||||
|
<dl><dt>Namespace</dt><dd><a class="xref" href="AnthropicClient.html">AnthropicClient</a>.<a class="xref" href="AnthropicClient.Models.html">Models</a></dd></dl>
|
||||||
|
<dl><dt>Assembly</dt><dd>AnthropicClient.dll</dd></dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="markdown summary"><p>Represents a response to a token count request.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public class TokenCountResponse</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">TokenCountResponse</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_TokenCountResponse_InputTokens_" data-uid="AnthropicClient.Models.TokenCountResponse.InputTokens*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_TokenCountResponse_InputTokens" data-uid="AnthropicClient.Models.TokenCountResponse.InputTokens">
|
||||||
|
InputTokens
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/TokenCountResponse.cs/#L13"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>The number of input tokens counted.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("input_tokens")]
|
||||||
|
public int InputTokens { 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/TokenCountResponse.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>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -153,6 +153,39 @@ Class Tool <a class="header-action link-secondary" title="View source" href="ht
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Tool_CacheControl_" data-uid="AnthropicClient.Models.Tool.CacheControl*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Tool_CacheControl" data-uid="AnthropicClient.Models.Tool.CacheControl">
|
||||||
|
CacheControl
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L61"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets or sets the cache control to be used for the tool.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("cache_control")]
|
||||||
|
public CacheControl? CacheControl { get; set; }</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h4 class="section">Property Value</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CacheControl.html">CacheControl</a></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_Description_" data-uid="AnthropicClient.Models.Tool.Description*"></a>
|
<a id="AnthropicClient_Models_Tool_Description_" data-uid="AnthropicClient.Models.Tool.Description*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_Description" data-uid="AnthropicClient.Models.Tool.Description">
|
<h3 id="AnthropicClient_Models_Tool_Description" data-uid="AnthropicClient.Models.Tool.Description">
|
||||||
@@ -189,7 +222,7 @@ Class Tool <a class="header-action link-secondary" title="View source" href="ht
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_DisplayName" data-uid="AnthropicClient.Models.Tool.DisplayName">
|
<h3 id="AnthropicClient_Models_Tool_DisplayName" data-uid="AnthropicClient.Models.Tool.DisplayName">
|
||||||
DisplayName
|
DisplayName
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L61"><i class="bi bi-code-slash"></i></a>
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L67"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Gets the display name of the tool.</p>
|
<div class="markdown level1 summary"><p>Gets the display name of the tool.</p>
|
||||||
@@ -322,9 +355,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_CreateFromClass_" data-uid="AnthropicClient.Models.Tool.CreateFromClass*"></a>
|
<a id="AnthropicClient_Models_Tool_CreateFromClass_" data-uid="AnthropicClient.Models.Tool.CreateFromClass*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_CreateFromClass__1" data-uid="AnthropicClient.Models.Tool.CreateFromClass``1">
|
<h3 id="AnthropicClient_Models_Tool_CreateFromClass__1_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Tool.CreateFromClass``1(AnthropicClient.Models.CacheControl)">
|
||||||
CreateFromClass<T>()
|
CreateFromClass<T>(CacheControl?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L102"><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/Tool.cs/#L109"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a tool from a type that implements <a class="xref" href="AnthropicClient.Models.ITool.html">ITool</a>.</p>
|
<div class="markdown level1 summary"><p>Creates a tool from a type that implements <a class="xref" href="AnthropicClient.Models.ITool.html">ITool</a>.</p>
|
||||||
@@ -332,9 +365,14 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
<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 static Tool CreateFromClass<T>() where T : ITool, new()</code></pre>
|
<pre><code class="lang-csharp hljs">public static Tool CreateFromClass<T>(CacheControl? cacheControl = null) where T : ITool, new()</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>cacheControl</code> <a class="xref" href="AnthropicClient.Models.CacheControl.html">CacheControl</a></dt>
|
||||||
|
<dd></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
<h4 class="section">Returns</h4>
|
<h4 class="section">Returns</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
@@ -355,7 +393,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromClass__1_remarks">Remarks</h4>
|
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromClass__1_AnthropicClient_Models_CacheControl__remarks">Remarks</h4>
|
||||||
<div class="markdown level1 remarks"><p>The implementation of <a class="xref" href="AnthropicClient.Models.ITool.html">ITool</a> must have a parameterless constructor.</p>
|
<div class="markdown level1 remarks"><p>The implementation of <a class="xref" href="AnthropicClient.Models.ITool.html">ITool</a> must have a parameterless constructor.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -373,9 +411,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_CreateFromFunction_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction*"></a>
|
<a id="AnthropicClient_Models_Tool_CreateFromFunction_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_CreateFromFunction__1_System_String_System_String_System_Func___0__" data-uid="AnthropicClient.Models.Tool.CreateFromFunction``1(System.String,System.String,System.Func{``0})">
|
<h3 id="AnthropicClient_Models_Tool_CreateFromFunction__1_System_String_System_String_System_Func___0__AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction``1(System.String,System.String,System.Func{``0},AnthropicClient.Models.CacheControl)">
|
||||||
CreateFromFunction<TResult>(string, string, Func<TResult>)
|
CreateFromFunction<TResult>(string, string, Func<TResult>, CacheControl?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L177"><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/Tool.cs/#L199"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a tool from a function.</p>
|
<div class="markdown level1 summary"><p>Creates a tool from a function.</p>
|
||||||
@@ -383,7 +421,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
<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 static Tool CreateFromFunction<TResult>(string name, string description, Func<TResult> func)</code></pre>
|
<pre><code class="lang-csharp hljs">public static Tool CreateFromFunction<TResult>(string name, string description, Func<TResult> func, CacheControl? cacheControl = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -396,6 +434,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a><TResult></dt>
|
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-1">Func</a><TResult></dt>
|
||||||
<dd><p>The function.</p>
|
<dd><p>The function.</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 tool.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -418,7 +459,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromFunction__1_System_String_System_String_System_Func___0___remarks">Remarks</h4>
|
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromFunction__1_System_String_System_String_System_Func___0__AnthropicClient_Models_CacheControl__remarks">Remarks</h4>
|
||||||
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -433,9 +474,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_CreateFromFunction_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction*"></a>
|
<a id="AnthropicClient_Models_Tool_CreateFromFunction_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_CreateFromFunction__2_System_String_System_String_System_Func___0___1__" data-uid="AnthropicClient.Models.Tool.CreateFromFunction``2(System.String,System.String,System.Func{``0,``1})">
|
<h3 id="AnthropicClient_Models_Tool_CreateFromFunction__2_System_String_System_String_System_Func___0___1__AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction``2(System.String,System.String,System.Func{``0,``1},AnthropicClient.Models.CacheControl)">
|
||||||
CreateFromFunction<T1, TResult>(string, string, Func<T1, TResult>)
|
CreateFromFunction<T1, TResult>(string, string, Func<T1, TResult>, CacheControl?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L195"><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/Tool.cs/#L223"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a tool from a function.</p>
|
<div class="markdown level1 summary"><p>Creates a tool from a function.</p>
|
||||||
@@ -443,7 +484,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
<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 static Tool CreateFromFunction<T1, TResult>(string name, string description, Func<T1, TResult> func)</code></pre>
|
<pre><code class="lang-csharp hljs">public static Tool CreateFromFunction<T1, TResult>(string name, string description, Func<T1, TResult> func, CacheControl? cacheControl = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -456,6 +497,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><T1, TResult></dt>
|
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-2">Func</a><T1, TResult></dt>
|
||||||
<dd><p>The function.</p>
|
<dd><p>The function.</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 tool.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -481,7 +525,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromFunction__2_System_String_System_String_System_Func___0___1___remarks">Remarks</h4>
|
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromFunction__2_System_String_System_String_System_Func___0___1__AnthropicClient_Models_CacheControl__remarks">Remarks</h4>
|
||||||
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -496,9 +540,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_CreateFromFunction_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction*"></a>
|
<a id="AnthropicClient_Models_Tool_CreateFromFunction_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_CreateFromFunction__3_System_String_System_String_System_Func___0___1___2__" data-uid="AnthropicClient.Models.Tool.CreateFromFunction``3(System.String,System.String,System.Func{``0,``1,``2})">
|
<h3 id="AnthropicClient_Models_Tool_CreateFromFunction__3_System_String_System_String_System_Func___0___1___2__AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Tool.CreateFromFunction``3(System.String,System.String,System.Func{``0,``1,``2},AnthropicClient.Models.CacheControl)">
|
||||||
CreateFromFunction<T1, T2, TResult>(string, string, Func<T1, T2, TResult>)
|
CreateFromFunction<T1, T2, TResult>(string, string, Func<T1, T2, TResult>, CacheControl?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L214"><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/Tool.cs/#L248"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a tool from a function.</p>
|
<div class="markdown level1 summary"><p>Creates a tool from a function.</p>
|
||||||
@@ -506,7 +550,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
<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 static Tool CreateFromFunction<T1, T2, TResult>(string name, string description, Func<T1, T2, TResult> func)</code></pre>
|
<pre><code class="lang-csharp hljs">public static Tool CreateFromFunction<T1, T2, TResult>(string name, string description, Func<T1, T2, TResult> func, CacheControl? cacheControl = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -519,6 +563,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a><T1, T2, TResult></dt>
|
<dt><code>func</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.func-3">Func</a><T1, T2, TResult></dt>
|
||||||
<dd><p>The function.</p>
|
<dd><p>The function.</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 tool.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -547,7 +594,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromFunction__3_System_String_System_String_System_Func___0___1___2___remarks">Remarks</h4>
|
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromFunction__3_System_String_System_String_System_Func___0___1___2__AnthropicClient_Models_CacheControl__remarks">Remarks</h4>
|
||||||
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -562,9 +609,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_CreateFromInstanceMethod_" data-uid="AnthropicClient.Models.Tool.CreateFromInstanceMethod*"></a>
|
<a id="AnthropicClient_Models_Tool_CreateFromInstanceMethod_" data-uid="AnthropicClient.Models.Tool.CreateFromInstanceMethod*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_CreateFromInstanceMethod_System_String_System_String_System_Object_System_String_" data-uid="AnthropicClient.Models.Tool.CreateFromInstanceMethod(System.String,System.String,System.Object,System.String)">
|
<h3 id="AnthropicClient_Models_Tool_CreateFromInstanceMethod_System_String_System_String_System_Object_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Tool.CreateFromInstanceMethod(System.String,System.String,System.Object,System.String,AnthropicClient.Models.CacheControl)">
|
||||||
CreateFromInstanceMethod(string, string, object, string)
|
CreateFromInstanceMethod(string, string, object, string, CacheControl?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L152"><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/Tool.cs/#L167"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a tool from an instance method.</p>
|
<div class="markdown level1 summary"><p>Creates a tool from an instance method.</p>
|
||||||
@@ -572,7 +619,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
<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 static Tool CreateFromInstanceMethod(string name, string description, object instance, string methodName)</code></pre>
|
<pre><code class="lang-csharp hljs">public static Tool CreateFromInstanceMethod(string name, string description, object instance, string methodName, CacheControl? cacheControl = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -588,6 +635,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>methodName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
<dt><code>methodName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
<dd><p>The name of the method.</p>
|
<dd><p>The name of the method.</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 tool.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -604,7 +654,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromInstanceMethod_System_String_System_String_System_Object_System_String__remarks">Remarks</h4>
|
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromInstanceMethod_System_String_System_String_System_Object_System_String_AnthropicClient_Models_CacheControl__remarks">Remarks</h4>
|
||||||
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -625,9 +675,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
<a id="AnthropicClient_Models_Tool_CreateFromStaticMethod_" data-uid="AnthropicClient.Models.Tool.CreateFromStaticMethod*"></a>
|
<a id="AnthropicClient_Models_Tool_CreateFromStaticMethod_" data-uid="AnthropicClient.Models.Tool.CreateFromStaticMethod*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Tool_CreateFromStaticMethod_System_String_System_String_System_Type_System_String_" data-uid="AnthropicClient.Models.Tool.CreateFromStaticMethod(System.String,System.String,System.Type,System.String)">
|
<h3 id="AnthropicClient_Models_Tool_CreateFromStaticMethod_System_String_System_String_System_Type_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.Tool.CreateFromStaticMethod(System.String,System.String,System.Type,System.String,AnthropicClient.Models.CacheControl)">
|
||||||
CreateFromStaticMethod(string, string, Type, string)
|
CreateFromStaticMethod(string, string, Type, string, CacheControl?)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Tool.cs/#L125"><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/Tool.cs/#L133"><i class="bi bi-code-slash"></i></a>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<div class="markdown level1 summary"><p>Creates a tool from a static method.</p>
|
<div class="markdown level1 summary"><p>Creates a tool from a static method.</p>
|
||||||
@@ -635,7 +685,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
<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 static Tool CreateFromStaticMethod(string name, string description, Type type, string methodName)</code></pre>
|
<pre><code class="lang-csharp hljs">public static Tool CreateFromStaticMethod(string name, string description, Type type, string methodName, CacheControl? cacheControl = null)</code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4 class="section">Parameters</h4>
|
<h4 class="section">Parameters</h4>
|
||||||
@@ -651,6 +701,9 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
</dd>
|
</dd>
|
||||||
<dt><code>methodName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
<dt><code>methodName</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
<dd><p>The name of the method.</p>
|
<dd><p>The name of the method.</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 tool.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
@@ -667,7 +720,7 @@ public JsonObject InputSchema { get; }</code></pre>
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromStaticMethod_System_String_System_String_System_Type_System_String__remarks">Remarks</h4>
|
<h4 class="section" id="AnthropicClient_Models_Tool_CreateFromStaticMethod_System_String_System_String_System_Type_System_String_AnthropicClient_Models_CacheControl__remarks">Remarks</h4>
|
||||||
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
<div class="markdown level1 remarks"><p>The name of the tool will be sanitized to conform to the Anthropic tool naming rules.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +125,9 @@ Class ToolResultContent <a class="header-action link-secondary" title="View sou
|
|||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_CacheControl">Content.CacheControl</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>
|
||||||
@@ -161,7 +164,7 @@ Class ToolResultContent <a class="header-action link-secondary" title="View sou
|
|||||||
|
|
||||||
<h3 id="AnthropicClient_Models_ToolResultContent__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.ToolResultContent.#ctor(System.String,System.String)">
|
<h3 id="AnthropicClient_Models_ToolResultContent__ctor_System_String_System_String_" data-uid="AnthropicClient.Models.ToolResultContent.#ctor(System.String,System.String)">
|
||||||
ToolResultContent(string, string)
|
ToolResultContent(string, string)
|
||||||
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ToolResultContent.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/ToolResultContent.cs/#L39"><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.ToolResultContent.html">ToolResultContent</a> class.</p>
|
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.ToolResultContent.html">ToolResultContent</a> class.</p>
|
||||||
@@ -190,6 +193,51 @@ Class ToolResultContent <a class="header-action link-secondary" title="View sou
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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 tool use ID or content is null.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_ToolResultContent__ctor_" data-uid="AnthropicClient.Models.ToolResultContent.#ctor*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_ToolResultContent__ctor_System_String_System_String_AnthropicClient_Models_CacheControl_" data-uid="AnthropicClient.Models.ToolResultContent.#ctor(System.String,System.String,AnthropicClient.Models.CacheControl)">
|
||||||
|
ToolResultContent(string, string, CacheControl)
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/ToolResultContent.cs/#L55"><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.ToolResultContent.html">ToolResultContent</a> class.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">public ToolResultContent(string toolUseId, string content, CacheControl cacheControl)</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4 class="section">Parameters</h4>
|
||||||
|
<dl class="parameters">
|
||||||
|
<dt><code>toolUseId</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The tool use ID of the content.</p>
|
||||||
|
</dd>
|
||||||
|
<dt><code>content</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||||
|
<dd><p>The content of the tool result.</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>
|
<h4 class="section">Exceptions</h4>
|
||||||
<dl class="parameters">
|
<dl class="parameters">
|
||||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -125,6 +125,9 @@ Class ToolUseContent <a class="header-action link-secondary" title="View source
|
|||||||
<div>
|
<div>
|
||||||
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_Type">Content.Type</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<a class="xref" href="AnthropicClient.Models.Content.html#AnthropicClient_Models_Content_CacheControl">Content.CacheControl</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>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -153,6 +153,72 @@ Class Usage <a class="header-action link-secondary" title="View source" href="h
|
|||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<a id="AnthropicClient_Models_Usage_CacheCreationInputTokens_" data-uid="AnthropicClient.Models.Usage.CacheCreationInputTokens*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Usage_CacheCreationInputTokens" data-uid="AnthropicClient.Models.Usage.CacheCreationInputTokens">
|
||||||
|
CacheCreationInputTokens
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Usage.cs/#L25"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the number of tokens written to the cache when creating a new entry</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("cache_creation_input_tokens")]
|
||||||
|
public int CacheCreationInputTokens { 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_Usage_CacheReadInputTokens_" data-uid="AnthropicClient.Models.Usage.CacheReadInputTokens*"></a>
|
||||||
|
|
||||||
|
<h3 id="AnthropicClient_Models_Usage_CacheReadInputTokens" data-uid="AnthropicClient.Models.Usage.CacheReadInputTokens">
|
||||||
|
CacheReadInputTokens
|
||||||
|
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/Usage.cs/#L31"><i class="bi bi-code-slash"></i></a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<div class="markdown level1 summary"><p>Gets the number of tokens retrieved from the cache for the request.</p>
|
||||||
|
</div>
|
||||||
|
<div class="markdown level1 conceptual"></div>
|
||||||
|
|
||||||
|
<div class="codewrapper">
|
||||||
|
<pre><code class="lang-csharp hljs">[JsonPropertyName("cache_read_input_tokens")]
|
||||||
|
public int CacheReadInputTokens { 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_Usage_InputTokens_" data-uid="AnthropicClient.Models.Usage.InputTokens*"></a>
|
<a id="AnthropicClient_Models_Usage_InputTokens_" data-uid="AnthropicClient.Models.Usage.InputTokens*"></a>
|
||||||
|
|
||||||
<h3 id="AnthropicClient_Models_Usage_InputTokens" data-uid="AnthropicClient.Models.Usage.InputTokens">
|
<h3 id="AnthropicClient_Models_Usage_InputTokens" data-uid="AnthropicClient.Models.Usage.InputTokens">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -142,6 +142,16 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html">BaseMessageRequest</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html">BaseMessageRequest</a></dt>
|
||||||
<dd><p>Represents a message request.</p>
|
<dd><p>Represents a message request.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CacheControl.html">CacheControl</a></dt>
|
||||||
|
<dd><p>Represents the cache control to be used for content.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.CacheControlType.html">CacheControlType</a></dt>
|
||||||
|
<dd><p>Provides constants for cache control types.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -177,6 +187,26 @@ Classes
|
|||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
<dt><a class="xref" href="AnthropicClient.Models.ContentType.html">ContentType</a></dt>
|
<dt><a class="xref" href="AnthropicClient.Models.ContentType.html">ContentType</a></dt>
|
||||||
<dd><p>Represents the content type.</p>
|
<dd><p>Represents the content type.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<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>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.DocumentContent.html">DocumentContent</a></dt>
|
||||||
|
<dd><p>Represents content from a document that is part of a message.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.DocumentSource.html">DocumentSource</a></dt>
|
||||||
|
<dd><p>Represents a document source.</p>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<dl class="jumplist">
|
||||||
|
<dt><a class="xref" href="AnthropicClient.Models.EphemeralCacheControl.html">EphemeralCacheControl</a></dt>
|
||||||
|
<dd><p>Represents the cache control to be used for content.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
@@ -342,6 +372,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.TokenCountResponse.html">TokenCountResponse</a></dt>
|
||||||
|
<dd><p>Represents a response to a token count request.</p>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl class="jumplist">
|
<dl class="jumplist">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+22
-1
@@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
<div id="sidetoggle">
|
<div id="sidetoggle">
|
||||||
<div>
|
<div>
|
||||||
<div class="sidefilter">
|
<div class="sidefilter">
|
||||||
@@ -60,6 +60,12 @@
|
|||||||
<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>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CacheControl.html" name="" title="CacheControl">CacheControl</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CacheControlType.html" name="" title="CacheControlType">CacheControlType</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>
|
||||||
@@ -81,6 +87,18 @@
|
|||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.ContentType.html" name="" title="ContentType">ContentType</a>
|
<a href="AnthropicClient.Models.ContentType.html" name="" title="ContentType">ContentType</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.CountMessageTokensRequest.html" name="" title="CountMessageTokensRequest">CountMessageTokensRequest</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.DocumentContent.html" name="" title="DocumentContent">DocumentContent</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.DocumentSource.html" name="" title="DocumentSource">DocumentSource</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="AnthropicClient.Models.EphemeralCacheControl.html" name="" title="EphemeralCacheControl">EphemeralCacheControl</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.Error.html" name="" title="Error">Error</a>
|
<a href="AnthropicClient.Models.Error.html" name="" title="Error">Error</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -183,6 +201,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.TokenCountResponse.html" name="" title="TokenCountResponse">TokenCountResponse</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="AnthropicClient.Models.Tool.html" name="" title="Tool">Tool</a>
|
<a href="AnthropicClient.Models.Tool.html" name="" title="Tool">Tool</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+279
-21
@@ -1,4 +1,4 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<div id="navbar">
|
<div id="navbar">
|
||||||
<form class="search" role="search" id="search">
|
<form class="search" role="search" id="search">
|
||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
<input class="form-control" id="search-query" type="search" disabled="" placeholder="Search" autocomplete="off" aria-label="Search">
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -146,8 +146,33 @@ var client = new AnthropicApiClient(apiKey, new HttpClient());
|
|||||||
<h5>Note</h5>
|
<h5>Note</h5>
|
||||||
<p>The following examples assume that you have already created an instance of the <code>AnthropicApiClient</code> class named <code>client</code>. You can also find these snippets in the examples directory.</p>
|
<p>The following examples assume that you have already created an instance of the <code>AnthropicApiClient</code> class named <code>client</code>. You can also find these snippets in the examples directory.</p>
|
||||||
</div>
|
</div>
|
||||||
|
<h3 id="count-message-tokens">Count Message Tokens</h3>
|
||||||
|
<p>The <code>AnthropicApiClient</code> exposes a method named <code>CountMessageTokensAsync</code> that can be used to count the number of tokens in a message. The method requires a <code>CountMessageTokensRequest</code> instance as a parameter.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CountMessageTokensAsync(new CountMessageTokensRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
if (response.IsFailure)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Failed to count message tokens");
|
||||||
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Console.WriteLine("Token Count: {0}", response.Value.InputTokens);
|
||||||
|
</code></pre>
|
||||||
<h3 id="create-a-message">Create a message</h3>
|
<h3 id="create-a-message">Create a message</h3>
|
||||||
<p>The <code>AnthropicApiClient</code> exposes a single method named <code>CreateMessageAsync</code> that can be used to create a message. The method requires a <code>MessageRequest</code> or a <code>StreamMessageRequest</code> instance as a parameter. The <code>MessageRequest</code> class is used to create a message whose response is not streamed and the <code>StreamMessageRequest</code> class is used to create a message whose response is streamed. The <code>MessageRequest</code> instance's properties can be set to configure how the message is created.</p>
|
<p>The <code>AnthropicApiClient</code> exposes a method named <code>CreateMessageAsync</code> that can be used to create a message. The method requires a <code>MessageRequest</code> or a <code>StreamMessageRequest</code> instance as a parameter. The <code>MessageRequest</code> class is used to create a message whose response is not streamed and the <code>StreamMessageRequest</code> class is used to create a message whose response is streamed. The <code>MessageRequest</code> instance's properties can be set to configure how the message is created.</p>
|
||||||
<h4 id="non-streaming">Non-Streaming</h4>
|
<h4 id="non-streaming">Non-Streaming</h4>
|
||||||
<pre><code class="lang-csharp">using AnthropicClient;
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
using AnthropicClient.Models;
|
using AnthropicClient.Models;
|
||||||
@@ -164,9 +189,9 @@ var response = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (response.IsSuccess is false)
|
if (response.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", response.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", response.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,16 +447,17 @@ var response = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (response.IsSuccess is false)
|
if (response.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", response.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", response.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", response.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", response.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messages.Add(new(MessageRole.Assistant, response.Content));
|
||||||
|
|
||||||
|
|
||||||
foreach (var content in response.Value.Content)
|
foreach (var content in response.Value.Content)
|
||||||
{
|
{
|
||||||
messages.Add(new(MessageRole.Assistant, [content]));
|
|
||||||
|
|
||||||
switch (content)
|
switch (content)
|
||||||
{
|
{
|
||||||
case TextContent textContent:
|
case TextContent textContent:
|
||||||
@@ -480,9 +506,9 @@ var finalResponse = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (finalResponse.IsSuccess is false)
|
if (finalResponse.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", finalResponse.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", finalResponse.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", finalResponse.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", finalResponse.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,10 +571,7 @@ if (response is null)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var content in response.Content)
|
messages.Add(new(MessageRole.Assistant, response.Content));
|
||||||
{
|
|
||||||
messages.Add(new(MessageRole.Assistant, [content]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response?.ToolCall is not null)
|
if (response?.ToolCall is not null)
|
||||||
{
|
{
|
||||||
@@ -585,9 +608,9 @@ var finalResponse = await client.CreateMessageAsync(new MessageRequest(
|
|||||||
|
|
||||||
if (finalResponse.IsSuccess is false)
|
if (finalResponse.IsSuccess is false)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"Failed to create message");
|
Console.WriteLine("Failed to create message");
|
||||||
Console.WriteLine($"Error Type: {0}", finalResponse.Error.Error.Type);
|
Console.WriteLine("Error Type: {0}", finalResponse.Error.Error.Type);
|
||||||
Console.WriteLine($"Error Message: {0}", finalResponse.Error.Error.Message);
|
Console.WriteLine("Error Message: {0}", finalResponse.Error.Error.Message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -602,6 +625,241 @@ foreach (var content in finalResponse.Value.Content)
|
|||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<p>If you do find that you need more control over how exactly provided tools are called and how the result of those tools are returned you can avoid using the <code>InvokeAsync</code> method and instead use the <code>Tool</code> and <code>ToolUse</code> properties of the <code>ToolCall</code> instance to implement your own solution.</p>
|
<p>If you do find that you need more control over how exactly provided tools are called and how the result of those tools are returned you can avoid using the <code>InvokeAsync</code> method and instead use the <code>Tool</code> and <code>ToolUse</code> properties of the <code>ToolCall</code> instance to implement your own solution.</p>
|
||||||
|
<h3 id="system-prompt">System Prompt</h3>
|
||||||
|
<p>Anthropic's models support the use of system prompts to provide additional context to the user. This can be used to provide additional information to the user or to ask for additional information from the user. This feature is covered in depth in <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/system-prompts">Anthropic's API Documentation</a>. This library aims to make using system prompts convenient by allowing you to provide the system prompts you want Anthropic's models to consider for use when creating a message.</p>
|
||||||
|
<h4 id="system-message">System Message</h4>
|
||||||
|
<p>You can create a system prompt by providing a <code>string</code> as the <code>system</code> parameter in the <code>MessageRequest</code> or <code>StreamMessageRequest</code> constructor.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
system: "You are a internationally renowned poet. You excel at writing haikus.
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h4 id="system-messages">System Messages</h4>
|
||||||
|
<p>You can create a more complex system prompt by providing a <code>List<TextContent></code> as the <code>systemMessages</code> parameter in the <code>MessageRequest</code> or <code>StreamMessageRequest</code> constructor.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
systemMessages: [
|
||||||
|
new TextContent("You are a internationally renowned poet. You excel at writing haikus."),
|
||||||
|
new TextContent("You have been asked to write a haiku about the ocean.")
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h3 id="prompt-caching">Prompt Caching</h3>
|
||||||
|
<p>Anthropic provides a feature called <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching">Prompt Caching</a> that allows you to cache all or part of the prompt you send to the model. This can be used to improve the performance of your application by reducing latency and token usage. This feature is covered in depth in <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching">Anthropic's API Documentation</a>.</p>
|
||||||
|
<p>Prompt caching can be used to cache all parts of the prompt including system messages, user messages, and tools. You should refer to the <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching">Anthropic API Documentation</a> for specifics on limitations and requirements for using prompt caching. This library aims to make using prompt caching convenient and give you complete control over what parts of the prompt are cached. Currently there is only one type of cache control available - <code>EphemeralCacheControl</code>.</p>
|
||||||
|
<h4 id="caching-system-messages">Caching System Messages</h4>
|
||||||
|
<p>System messages can be cached by providing a <code>List<TextContent></code> as the <code>systemMessages</code> parameter in the <code>MessageRequest</code> or <code>StreamMessageRequest</code> constructor and having one or more of the <code>TextContent</code> instances have the <code>CacheControl</code> property set.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("Please write a haiku about the ocean.")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
systemMessages: [
|
||||||
|
new TextContent("You are a internationally renowned poet. You excel at writing haikus. Please use the following as examples."),
|
||||||
|
new TextContent(exampleHaikus, new EphemeralCacheControl())
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h4 id="caching-user-messages">Caching User Messages</h4>
|
||||||
|
<p>User messages can be cached by providing a <code>List<Content></code> as the <code>messages</code> parameter in the <code>MessageRequest</code> or <code>StreamMessageRequest</code> constructor and having one or more of the <code>Content</code> instances have the <code>CacheControl</code> property set.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[
|
||||||
|
new TextContent("Please write a haiku about the ocean. Here are some examples of haikus I like."),
|
||||||
|
new TextContent(exampleHaikus, new EphemeralCacheControl())
|
||||||
|
]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h4 id="caching-tools">Caching Tools</h4>
|
||||||
|
<p>Tools can be cached by providing a <code>List<Tool></code> as the <code>tools</code> parameter in the <code>MessageRequest</code> or <code>StreamMessageRequest</code> constructor and having one or more of the <code>Tool</code> instances have the <code>CacheControl</code> property set. This property can be set after the tool is created manually or by using one of the static methods on the <code>Tool</code> class.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var tool = (string location, string units) => $"The weather in {location} is 72 degrees {units}";
|
||||||
|
|
||||||
|
var getWeatherTool = Tool.CreateFromFunction(
|
||||||
|
"Get Weather",
|
||||||
|
"Get the weather for a location in the specified units",
|
||||||
|
tool,
|
||||||
|
new EphemeralCacheControl()
|
||||||
|
);
|
||||||
|
|
||||||
|
var response = await client.CreateMessageAsync(new MessageRequest(
|
||||||
|
AnthropicModels.Claude3Haiku,
|
||||||
|
[
|
||||||
|
new(
|
||||||
|
MessageRole.User,
|
||||||
|
[new TextContent("What is the weather in New York?")]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
tools: [
|
||||||
|
// Lots of other tools
|
||||||
|
// ...
|
||||||
|
getWeatherTool
|
||||||
|
]
|
||||||
|
));
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
case ToolUseContent toolUseContent:
|
||||||
|
Console.WriteLine(toolUseContent.Name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<h3 id="pdf-support">PDF Support</h3>
|
||||||
|
<p>Anthropic provides a feature called <a href="https://docs.anthropic.com/en/docs/build-with-claude/pdf-support">PDF Support</a> that allows Claude to support PDF input and understand both text and visual content within documents. This feature is covered in depth in <a href="https://docs.anthropic.com/en/docs/build-with-claude/pdf-support">Anthropic's API Documentation</a>.</p>
|
||||||
|
<p>PDF support can be used to provide a PDF document as input to the model. This can be used to provide additional context to the model or to ask for additional information from the model. This library aims to make using PDF support convenient by allowing you to provide the PDF document you want Anthropic's models to consider for use when creating a message.</p>
|
||||||
|
<h4 id="pdf-document">PDF Document</h4>
|
||||||
|
<p>You can provide a PDF document by providing its base64 encoded content as a <code>DocumentContent</code> instance in the list of messages in the <code>MessageRequest</code> or <code>StreamMessageRequest</code> constructor.</p>
|
||||||
|
<pre><code class="lang-csharp">using AnthropicClient;
|
||||||
|
using AnthropicClient.Models;
|
||||||
|
|
||||||
|
var request = new MessageRequest(
|
||||||
|
model: AnthropicModels.Claude35Sonnet,
|
||||||
|
messages: [
|
||||||
|
new(MessageRole.User, [new TextContent("What is the title of this paper?")]),
|
||||||
|
new(MessageRole.User, [new DocumentContent("application/pdf", base64Data)])
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
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(textContent.Text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
|||||||
+52
-17
File diff suppressed because one or more lines are too long
+76
-6
@@ -130,6 +130,26 @@
|
|||||||
},
|
},
|
||||||
"version": ""
|
"version": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CacheControl.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CacheControl.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CacheControlType.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CacheControlType.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.Content.yml",
|
"source_relative_path": "api/AnthropicClient.Models.Content.yml",
|
||||||
@@ -200,6 +220,46 @@
|
|||||||
},
|
},
|
||||||
"version": ""
|
"version": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.CountMessageTokensRequest.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.CountMessageTokensRequest.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.DocumentContent.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.DocumentContent.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.DocumentSource.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.DocumentSource.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.EphemeralCacheControl.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.EphemeralCacheControl.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.Error.yml",
|
"source_relative_path": "api/AnthropicClient.Models.Error.yml",
|
||||||
@@ -540,6 +600,16 @@
|
|||||||
},
|
},
|
||||||
"version": ""
|
"version": ""
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "ManagedReference",
|
||||||
|
"source_relative_path": "api/AnthropicClient.Models.TokenCountResponse.yml",
|
||||||
|
"output": {
|
||||||
|
".html": {
|
||||||
|
"relative_path": "api/AnthropicClient.Models.TokenCountResponse.html"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "ManagedReference",
|
"type": "ManagedReference",
|
||||||
"source_relative_path": "api/AnthropicClient.Models.Tool.yml",
|
"source_relative_path": "api/AnthropicClient.Models.Tool.yml",
|
||||||
@@ -644,11 +714,11 @@
|
|||||||
"type": "Toc",
|
"type": "Toc",
|
||||||
"source_relative_path": "api/toc.yml",
|
"source_relative_path": "api/toc.yml",
|
||||||
"output": {
|
"output": {
|
||||||
".json": {
|
|
||||||
"relative_path": "api/toc.json"
|
|
||||||
},
|
|
||||||
".html": {
|
".html": {
|
||||||
"relative_path": "api/toc.html"
|
"relative_path": "api/toc.html"
|
||||||
|
},
|
||||||
|
".json": {
|
||||||
|
"relative_path": "api/toc.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": ""
|
"version": ""
|
||||||
@@ -667,11 +737,11 @@
|
|||||||
"type": "Toc",
|
"type": "Toc",
|
||||||
"source_relative_path": "toc.yml",
|
"source_relative_path": "toc.yml",
|
||||||
"output": {
|
"output": {
|
||||||
".json": {
|
|
||||||
"relative_path": "toc.json"
|
|
||||||
},
|
|
||||||
".html": {
|
".html": {
|
||||||
"relative_path": "toc.html"
|
"relative_path": "toc.html"
|
||||||
|
},
|
||||||
|
".json": {
|
||||||
|
"relative_path": "toc.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": ""
|
"version": ""
|
||||||
|
|||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
import{a as e,b as r}from"./chunk-DBPRPEV6.min.js";import"./chunk-TERFBH2B.min.js";import"./chunk-U4DUTLYF.min.js";import"./chunk-IQQ46AC6.min.js";import"./chunk-CXRPJJJE.min.js";import"./chunk-OSRY5VT3.min.js";export{e as ArchitectureModule,r as createArchitectureServices};
|
||||||
|
//# sourceMappingURL=architecture-I3QFYML2-NK53GYGD.min.js.map
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": [],
|
||||||
|
"sourcesContent": [],
|
||||||
|
"mappings": "",
|
||||||
|
"names": []
|
||||||
|
}
|
||||||
+37
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+122
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
+11
File diff suppressed because one or more lines are too long
+7
File diff suppressed because one or more lines are too long
+67
File diff suppressed because one or more lines are too long
Executable
+7
File diff suppressed because one or more lines are too long
+221
File diff suppressed because one or more lines are too long
Executable
+7
File diff suppressed because one or more lines are too long
+2
File diff suppressed because one or more lines are too long
Executable
+7
File diff suppressed because one or more lines are too long
+2
File diff suppressed because one or more lines are too long
Executable
+7
File diff suppressed because one or more lines are too long
+2
@@ -0,0 +1,2 @@
|
|||||||
|
import{a as t,b as a,c as o,d as i,e as f,f as e,g as u,h as d,n as s,o as l}from"./chunk-TERFBH2B.min.js";var m=class extends l{static{e(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},v={parser:{TokenBuilder:e(()=>new m,"TokenBuilder"),ValueConverter:e(()=>new s,"ValueConverter")}};function I(c=i){let r=o(a(c),u),n=o(t({shared:r}),d,v);return r.ServiceRegistry.register(n),{shared:r,Info:n}}e(I,"createInfoServices");export{v as a,I as b};
|
||||||
|
//# sourceMappingURL=chunk-45RMNOPF.min.js.map
|
||||||
Executable
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"sources": ["../../node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4YFB5VUC.mjs"],
|
||||||
|
"sourcesContent": ["import {\n AbstractMermaidTokenBuilder,\n CommonValueConverter,\n InfoGeneratedModule,\n MermaidGeneratedSharedModule,\n __name\n} from \"./chunk-Y27MQZ3U.mjs\";\n\n// src/language/info/module.ts\nimport {\n EmptyFileSystem,\n createDefaultCoreModule,\n createDefaultSharedCoreModule,\n inject\n} from \"langium\";\n\n// src/language/info/tokenBuilder.ts\nvar InfoTokenBuilder = class extends AbstractMermaidTokenBuilder {\n static {\n __name(this, \"InfoTokenBuilder\");\n }\n constructor() {\n super([\"info\", \"showInfo\"]);\n }\n};\n\n// src/language/info/module.ts\nvar InfoModule = {\n parser: {\n TokenBuilder: /* @__PURE__ */ __name(() => new InfoTokenBuilder(), \"TokenBuilder\"),\n ValueConverter: /* @__PURE__ */ __name(() => new CommonValueConverter(), \"ValueConverter\")\n }\n};\nfunction createInfoServices(context = EmptyFileSystem) {\n const shared = inject(\n createDefaultSharedCoreModule(context),\n MermaidGeneratedSharedModule\n );\n const Info = inject(\n createDefaultCoreModule({ shared }),\n InfoGeneratedModule,\n InfoModule\n );\n shared.ServiceRegistry.register(Info);\n return { shared, Info };\n}\n__name(createInfoServices, \"createInfoServices\");\n\nexport {\n InfoModule,\n createInfoServices\n};\n"],
|
||||||
|
"mappings": "2GAiBA,IAAIA,EAAmB,cAAcC,CAA4B,CAC/D,MAAO,CACLC,EAAO,KAAM,kBAAkB,CACjC,CACA,aAAc,CACZ,MAAM,CAAC,OAAQ,UAAU,CAAC,CAC5B,CACF,EAGIC,EAAa,CACf,OAAQ,CACN,aAA8BD,EAAO,IAAM,IAAIF,EAAoB,cAAc,EACjF,eAAgCE,EAAO,IAAM,IAAIE,EAAwB,gBAAgB,CAC3F,CACF,EACA,SAASC,EAAmBC,EAAUC,EAAiB,CACrD,IAAMC,EAASC,EACbC,EAA8BJ,CAAO,EACrCK,CACF,EACMC,EAAOH,EACXI,EAAwB,CAAE,OAAAL,CAAO,CAAC,EAClCM,EACAX,CACF,EACA,OAAAK,EAAO,gBAAgB,SAASI,CAAI,EAC7B,CAAE,OAAAJ,EAAQ,KAAAI,CAAK,CACxB,CACAV,EAAOG,EAAoB,oBAAoB",
|
||||||
|
"names": ["InfoTokenBuilder", "AbstractMermaidTokenBuilder", "__name", "InfoModule", "CommonValueConverter", "createInfoServices", "context", "EmptyFileSystem", "shared", "inject", "createDefaultSharedCoreModule", "MermaidGeneratedSharedModule", "Info", "createDefaultCoreModule", "InfoGeneratedModule"]
|
||||||
|
}
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
import{a as o,b as n,c as a,d as s,e as m,f as e,g as u,j as d,m as c,o as l}from"./chunk-TERFBH2B.min.js";var v=class extends l{static{e(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},C=class extends c{static{e(this,"PieValueConverter")}runCustomConverter(t,r,i){if(t.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},P={parser:{TokenBuilder:e(()=>new v,"TokenBuilder"),ValueConverter:e(()=>new C,"ValueConverter")}};function p(t=s){let r=a(n(t),u),i=a(o({shared:r}),d,P);return r.ServiceRegistry.register(i),{shared:r,Pie:i}}e(p,"createPieServices");export{P as a,p as b};
|
||||||
|
//# sourceMappingURL=chunk-53EALYMI.min.js.map
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user