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] authored and HavenDV committed Aug 29, 2024
1 parent 2f8a410 commit 4dda0bb
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

#nullable enable

namespace Anthropic
{
public sealed partial class AnthropicApi
{
/// <inheritdoc cref="AnthropicApi(global::System.Net.Http.HttpClient?, global::System.Uri?)"/>
public AnthropicApi(
string apiKey,
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null) : this(httpClient, baseUri)
{
AuthorizeUsingApiKey(apiKey);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ partial void ProcessCreateMessageResponseContent(
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::Anthropic.Message> CreateMessageAsync(
global::System.AnyOf<string?, global::Anthropic.CreateMessageRequestModel?> model,
global::System.AnyOf<string, global::Anthropic.CreateMessageRequestModel?> model,
global::System.Collections.Generic.IList<global::Anthropic.Message> messages,
int maxTokens,
global::Anthropic.CreateMessageRequestMetadata? metadata = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed partial class CreateMessageRequest
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.AnyOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.AnyOf<string?, global::Anthropic.CreateMessageRequestModel?> Model { get; set; }
public required global::System.AnyOf<string, global::Anthropic.CreateMessageRequestModel?> Model { get; set; }

/// <summary>
/// Input messages.<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Anthropic/Generated/Anthropic.Models.Message.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public sealed partial class Message
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::Anthropic.Block>> Content { get; set; }
public required global::System.OneOf<string, global::System.Collections.Generic.IList<global::Anthropic.Block>> Content { get; set; }

/// <summary>
/// The role of the messages author.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public sealed partial class ToolResultBlock
[global::System.Text.Json.Serialization.JsonPropertyName("content")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenApiGenerator.JsonConverters.OneOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.OneOf<string?, global::System.Collections.Generic.IList<global::Anthropic.Block>> Content { get; set; }
public required global::System.OneOf<string, global::System.Collections.Generic.IList<global::Anthropic.Block>> Content { get; set; }

/// <summary>
/// Set to `true` if the tool execution resulted in an error.
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Anthropic/Generated/JsonSerializerContextTypes.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::System.AnyOf<string?, global::Anthropic.CreateMessageRequestModel?>? Type1 { get; set; }
public global::System.AnyOf<string, global::Anthropic.CreateMessageRequestModel?>? Type1 { get; set; }
/// <summary>
///
/// </summary>
Expand All @@ -37,7 +37,7 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::System.OneOf<string?, global::System.Collections.Generic.IList<global::Anthropic.Block>>? Type6 { get; set; }
public global::System.OneOf<string, global::System.Collections.Generic.IList<global::Anthropic.Block>>? Type6 { get; set; }
/// <summary>
///
/// </summary>
Expand Down

0 comments on commit 4dda0bb

Please sign in to comment.