Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 21, 2024
1 parent 0fc781a commit 7840c09
Show file tree
Hide file tree
Showing 39 changed files with 1,638 additions and 356 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial void ProcessBetaModelsGetResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Anthropic.BetaModelResponse> BetaModelsGetAsync(
public async global::System.Threading.Tasks.Task<global::Anthropic.BetaModelInfo> BetaModelsGetAsync(
string modelId,
string? anthropicVersion = default,
string? xApiKey = default,
Expand Down Expand Up @@ -178,7 +178,7 @@ partial void ProcessBetaModelsGetResponseContent(
}

return
global::Anthropic.BetaModelResponse.FromJson(__content, JsonSerializerContext) ??
global::Anthropic.BetaModelInfo.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
Expand All @@ -204,7 +204,7 @@ partial void ProcessBetaModelsGetResponseContent(
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
await global::Anthropic.BetaModelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
await global::Anthropic.BetaModelInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ partial void ProcessBetaModelsListResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Anthropic.BetaListResponseModelResponse> BetaModelsListAsync(
public async global::System.Threading.Tasks.Task<global::Anthropic.BetaListResponseModelInfo> BetaModelsListAsync(
string? beforeId = default,
string? afterId = default,
int? limit = default,
Expand Down Expand Up @@ -201,7 +201,7 @@ partial void ProcessBetaModelsListResponseContent(
}

return
global::Anthropic.BetaListResponseModelResponse.FromJson(__content, JsonSerializerContext) ??
global::Anthropic.BetaListResponseModelInfo.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
Expand All @@ -227,7 +227,7 @@ partial void ProcessBetaModelsListResponseContent(
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
await global::Anthropic.BetaListResponseModelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
await global::Anthropic.BetaListResponseModelInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ partial void ProcessModelsGetResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Anthropic.ModelResponse> ModelsGetAsync(
public async global::System.Threading.Tasks.Task<global::Anthropic.ModelInfo> ModelsGetAsync(
string modelId,
string? anthropicVersion = default,
string? xApiKey = default,
Expand Down Expand Up @@ -178,7 +178,7 @@ partial void ProcessModelsGetResponseContent(
}

return
global::Anthropic.ModelResponse.FromJson(__content, JsonSerializerContext) ??
global::Anthropic.ModelInfo.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
Expand All @@ -204,7 +204,7 @@ partial void ProcessModelsGetResponseContent(
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
await global::Anthropic.ModelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
await global::Anthropic.ModelInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ partial void ProcessModelsListResponseContent(
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::Anthropic.ListResponseModelResponse> ModelsListAsync(
public async global::System.Threading.Tasks.Task<global::Anthropic.ListResponseModelInfo> ModelsListAsync(
string? beforeId = default,
string? afterId = default,
int? limit = default,
Expand Down Expand Up @@ -201,7 +201,7 @@ partial void ProcessModelsListResponseContent(
}

return
global::Anthropic.ListResponseModelResponse.FromJson(__content, JsonSerializerContext) ??
global::Anthropic.ListResponseModelInfo.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
Expand All @@ -227,7 +227,7 @@ partial void ProcessModelsListResponseContent(
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
await global::Anthropic.ListResponseModelResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
await global::Anthropic.ListResponseModelInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial interface IAnthropicClient
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Anthropic.BetaModelResponse> BetaModelsGetAsync(
global::System.Threading.Tasks.Task<global::Anthropic.BetaModelInfo> BetaModelsGetAsync(
string modelId,
string? anthropicVersion = default,
string? xApiKey = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial interface IAnthropicClient
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Anthropic.BetaListResponseModelResponse> BetaModelsListAsync(
global::System.Threading.Tasks.Task<global::Anthropic.BetaListResponseModelInfo> BetaModelsListAsync(
string? beforeId = default,
string? afterId = default,
int? limit = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public partial interface IAnthropicClient
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Anthropic.ModelResponse> ModelsGetAsync(
global::System.Threading.Tasks.Task<global::Anthropic.ModelInfo> ModelsGetAsync(
string modelId,
string? anthropicVersion = default,
string? xApiKey = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial interface IAnthropicClient
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Anthropic.ListResponseModelResponse> ModelsListAsync(
global::System.Threading.Tasks.Task<global::Anthropic.ListResponseModelInfo> ModelsListAsync(
string? beforeId = default,
string? afterId = default,
int? limit = default,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#nullable enable

namespace Anthropic
{
public partial interface IMessageBatchesClient
{
/// <summary>
/// Delete a Message Batch<br/>
/// This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.
/// </summary>
/// <param name="messageBatchId">
/// ID of the Message Batch.
/// </param>
/// <param name="anthropicBeta">
/// Optional header to specify the beta version(s) you want to use.<br/>
/// To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
/// </param>
/// <param name="anthropicVersion">
/// The version of the Anthropic API you want to use.<br/>
/// Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
/// </param>
/// <param name="xApiKey">
/// Your unique API key for authentication. <br/>
/// This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Anthropic.BetaDeleteMessageBatchResponse> BetaMessageBatchesDeleteAsync(
string messageBatchId,
string? anthropicBeta = default,
string? anthropicVersion = default,
string? xApiKey = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#nullable enable

namespace Anthropic
{
public partial interface IMessageBatchesClient
{
/// <summary>
/// Delete a Message Batch<br/>
/// This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.
/// </summary>
/// <param name="messageBatchId">
/// ID of the Message Batch.
/// </param>
/// <param name="anthropicVersion">
/// The version of the Anthropic API you want to use.<br/>
/// Read more about versioning and our version history [here](https://docs.anthropic.com/en/api/versioning).
/// </param>
/// <param name="xApiKey">
/// Your unique API key for authentication. <br/>
/// This key is required in the header of all API requests, to authenticate your account and access Anthropic's services. Get your API key through the [Console](https://console.anthropic.com/settings/keys). Each key is scoped to a Workspace.
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::Anthropic.ApiException"></exception>
global::System.Threading.Tasks.Task<global::Anthropic.DeleteMessageBatchResponse> MessageBatchesDeleteAsync(
string messageBatchId,
string? anthropicVersion = default,
string? xApiKey = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Loading

0 comments on commit 7840c09

Please sign in to comment.