Skip to content

Commit 4a7d2c3

Browse files
docs: documentation for v0.4.0 [skip ci]
1 parent e08c94e commit 4a7d2c3

14 files changed

+918
-59
lines changed

docs/api/AnthropicClient.AnthropicApiClient.html

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
8989

9090

9191
<h1 id="AnthropicClient_AnthropicApiClient" data-uid="AnthropicClient.AnthropicApiClient" class="text-break">
92-
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>
92+
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>
9393
</h1>
9494

9595
<div class="facts text-secondary">
@@ -163,7 +163,7 @@ <h2 class="section" id="constructors">Constructors
163163

164164
<h3 id="AnthropicClient_AnthropicApiClient__ctor_System_String_System_Net_Http_HttpClient_" data-uid="AnthropicClient.AnthropicApiClient.#ctor(System.String,System.Net.Http.HttpClient)">
165165
AnthropicApiClient(string, HttpClient)
166-
<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>
166+
<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>
167167
</h3>
168168

169169
<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 @@ <h2 class="section" id="methods">Methods
205205
</h2>
206206

207207

208+
<a id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync*"></a>
209+
210+
<h3 id="AnthropicClient_AnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_" data-uid="AnthropicClient.AnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest)">
211+
CountMessageTokensAsync(CountMessageTokensRequest)
212+
<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>
213+
</h3>
214+
215+
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
216+
</div>
217+
<div class="markdown level1 conceptual"></div>
218+
219+
<div class="codewrapper">
220+
<pre><code class="lang-csharp hljs">public Task&lt;AnthropicResult&lt;TokenCountResponse&gt;&gt; CountMessageTokensAsync(CountMessageTokensRequest request)</code></pre>
221+
</div>
222+
223+
<h4 class="section">Parameters</h4>
224+
<dl class="parameters">
225+
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.CountMessageTokensRequest.html">CountMessageTokensRequest</a></dt>
226+
<dd><p>The count message tokens request.</p>
227+
</dd>
228+
</dl>
229+
230+
<h4 class="section">Returns</h4>
231+
<dl class="parameters">
232+
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>&gt;&gt;</dt>
233+
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>.</p>
234+
</dd>
235+
</dl>
236+
237+
238+
239+
240+
241+
242+
243+
244+
245+
246+
208247
<a id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync*"></a>
209248

210249
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">
211250
CreateMessageAsync(MessageRequest)
212-
<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>
251+
<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>
213252
</h3>
214253

215254
<div class="markdown level1 summary"><p>Creates a message asynchronously.</p>
@@ -248,7 +287,7 @@ <h4 class="section">Returns</h4>
248287

249288
<h3 id="AnthropicClient_AnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_StreamMessageRequest_" data-uid="AnthropicClient.AnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.StreamMessageRequest)">
250289
CreateMessageAsync(StreamMessageRequest)
251-
<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>
290+
<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>
252291
</h3>
253292

254293
<div class="markdown level1 summary"><p>Creates a message asynchronously and streams the response.</p>
@@ -287,7 +326,7 @@ <h4 class="section">Returns</h4>
287326
</article>
288327

289328
<div class="contribution d-print-none">
290-
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L32" class="edit-link">Edit this page</a>
329+
<a href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/AnthropicApiClient.cs/#L39" class="edit-link">Edit this page</a>
291330
</div>
292331

293332

docs/api/AnthropicClient.IAnthropicApiClient.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,45 @@ <h2 class="section" id="methods">Methods
121121
</h2>
122122

123123

124+
<a id="AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync*"></a>
125+
126+
<h3 id="AnthropicClient_IAnthropicApiClient_CountMessageTokensAsync_AnthropicClient_Models_CountMessageTokensRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CountMessageTokensAsync(AnthropicClient.Models.CountMessageTokensRequest)">
127+
CountMessageTokensAsync(CountMessageTokensRequest)
128+
<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>
129+
</h3>
130+
131+
<div class="markdown level1 summary"><p>Counts the tokens in a message asynchronously.</p>
132+
</div>
133+
<div class="markdown level1 conceptual"></div>
134+
135+
<div class="codewrapper">
136+
<pre><code class="lang-csharp hljs">Task&lt;AnthropicResult&lt;TokenCountResponse&gt;&gt; CountMessageTokensAsync(CountMessageTokensRequest request)</code></pre>
137+
</div>
138+
139+
<h4 class="section">Parameters</h4>
140+
<dl class="parameters">
141+
<dt><code>request</code> <a class="xref" href="AnthropicClient.Models.CountMessageTokensRequest.html">CountMessageTokensRequest</a></dt>
142+
<dd><p>The count message tokens request.</p>
143+
</dd>
144+
</dl>
145+
146+
<h4 class="section">Returns</h4>
147+
<dl class="parameters">
148+
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1">Task</a>&lt;<a class="xref" href="AnthropicResult-1.html">AnthropicResult</a>&lt;<a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>&gt;&gt;</dt>
149+
<dd><p>A task that represents the asynchronous operation. The task result contains the response as an <a class="xref" href="AnthropicResult-1.html">AnthropicResult&lt;T&gt;</a> where T is <a class="xref" href="AnthropicClient.Models.TokenCountResponse.html">TokenCountResponse</a>.</p>
150+
</dd>
151+
</dl>
152+
153+
154+
155+
156+
157+
158+
159+
160+
161+
162+
124163
<a id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync*"></a>
125164

126165
<h3 id="AnthropicClient_IAnthropicApiClient_CreateMessageAsync_AnthropicClient_Models_MessageRequest_" data-uid="AnthropicClient.IAnthropicApiClient.CreateMessageAsync(AnthropicClient.Models.MessageRequest)">

docs/api/AnthropicClient.Models.BaseMessageRequest.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ <h2 class="section" id="constructors">Constructors
164164

165165
<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})">
166166
BaseMessageRequest(string, List&lt;Message&gt;, int, string?, Dictionary&lt;string, object&gt;?, decimal, int?, decimal?, ToolChoice?, List&lt;Tool&gt;?, bool, List&lt;string&gt;?, List&lt;TextContent&gt;?)
167-
<a class="header-action link-secondary" title="View source" href="https://github.com/StevanFreeborn/anthropic-client/blob/main/src/AnthropicClient/Models/BaseMessageRequest.cs/#L135"><i class="bi bi-code-slash"></i></a>
167+
<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>
168168
</h3>
169169

170170
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="AnthropicClient.Models.BaseMessageRequest.html">BaseMessageRequest</a> class.</p>
@@ -228,9 +228,6 @@ <h4 class="section">Parameters</h4>
228228

229229
<h4 class="section">Exceptions</h4>
230230
<dl class="parameters">
231-
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentexception">ArgumentException</a></dt>
232-
<dd><p>Thrown when the model ID is invalid.</p>
233-
</dd>
234231
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></dt>
235232
<dd><p>Thrown when the model or messages is null.</p>
236233
</dd>

0 commit comments

Comments
 (0)