-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from tryAGI/bot/update-openapi_202412182112
feat:@coderabbitai
- Loading branch information
Showing
189 changed files
with
12,294 additions
and
1,109 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
src/libs/OpenAI/Generated/JsonConverters.ChatCompletionRequestDeveloperMessageRole.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class ChatCompletionRequestDeveloperMessageRoleJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.ChatCompletionRequestDeveloperMessageRole> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.ChatCompletionRequestDeveloperMessageRole Read( | ||
ref global::System.Text.Json.Utf8JsonReader reader, | ||
global::System.Type typeToConvert, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
switch (reader.TokenType) | ||
{ | ||
case global::System.Text.Json.JsonTokenType.String: | ||
{ | ||
var stringValue = reader.GetString(); | ||
if (stringValue != null) | ||
{ | ||
return global::OpenAI.ChatCompletionRequestDeveloperMessageRoleExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.ChatCompletionRequestDeveloperMessageRole)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.ChatCompletionRequestDeveloperMessageRole value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.ChatCompletionRequestDeveloperMessageRoleExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...bs/OpenAI/Generated/JsonConverters.ChatCompletionRequestDeveloperMessageRoleNullable.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class ChatCompletionRequestDeveloperMessageRoleNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.ChatCompletionRequestDeveloperMessageRole?> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.ChatCompletionRequestDeveloperMessageRole? Read( | ||
ref global::System.Text.Json.Utf8JsonReader reader, | ||
global::System.Type typeToConvert, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
switch (reader.TokenType) | ||
{ | ||
case global::System.Text.Json.JsonTokenType.String: | ||
{ | ||
var stringValue = reader.GetString(); | ||
if (stringValue != null) | ||
{ | ||
return global::OpenAI.ChatCompletionRequestDeveloperMessageRoleExtensions.ToEnum(stringValue); | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.ChatCompletionRequestDeveloperMessageRole)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.ChatCompletionRequestDeveloperMessageRole? value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
if (value == null) | ||
{ | ||
writer.WriteNullValue(); | ||
} | ||
else | ||
{ | ||
writer.WriteStringValue(global::OpenAI.ChatCompletionRequestDeveloperMessageRoleExtensions.ToValueString(value.Value)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/libs/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestReasoningEffort.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateChatCompletionRequestReasoningEffortJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateChatCompletionRequestReasoningEffort> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateChatCompletionRequestReasoningEffort Read( | ||
ref global::System.Text.Json.Utf8JsonReader reader, | ||
global::System.Type typeToConvert, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
switch (reader.TokenType) | ||
{ | ||
case global::System.Text.Json.JsonTokenType.String: | ||
{ | ||
var stringValue = reader.GetString(); | ||
if (stringValue != null) | ||
{ | ||
return global::OpenAI.CreateChatCompletionRequestReasoningEffortExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateChatCompletionRequestReasoningEffort)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateChatCompletionRequestReasoningEffort value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.CreateChatCompletionRequestReasoningEffortExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...s/OpenAI/Generated/JsonConverters.CreateChatCompletionRequestReasoningEffortNullable.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class CreateChatCompletionRequestReasoningEffortNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.CreateChatCompletionRequestReasoningEffort?> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.CreateChatCompletionRequestReasoningEffort? Read( | ||
ref global::System.Text.Json.Utf8JsonReader reader, | ||
global::System.Type typeToConvert, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
switch (reader.TokenType) | ||
{ | ||
case global::System.Text.Json.JsonTokenType.String: | ||
{ | ||
var stringValue = reader.GetString(); | ||
if (stringValue != null) | ||
{ | ||
return global::OpenAI.CreateChatCompletionRequestReasoningEffortExtensions.ToEnum(stringValue); | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.CreateChatCompletionRequestReasoningEffort)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.CreateChatCompletionRequestReasoningEffort? value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
if (value == null) | ||
{ | ||
writer.WriteNullValue(); | ||
} | ||
else | ||
{ | ||
writer.WriteStringValue(global::OpenAI.CreateChatCompletionRequestReasoningEffortExtensions.ToValueString(value.Value)); | ||
} | ||
} | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
src/libs/OpenAI/Generated/JsonConverters.FineTuneDPOMethodHyperparametersBatchSize.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class FineTuneDPOMethodHyperparametersBatchSizeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize Read( | ||
ref global::System.Text.Json.Utf8JsonReader reader, | ||
global::System.Type typeToConvert, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
switch (reader.TokenType) | ||
{ | ||
case global::System.Text.Json.JsonTokenType.String: | ||
{ | ||
var stringValue = reader.GetString(); | ||
if (stringValue != null) | ||
{ | ||
return global::OpenAI.FineTuneDPOMethodHyperparametersBatchSizeExtensions.ToEnum(stringValue) ?? default; | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
writer.WriteStringValue(global::OpenAI.FineTuneDPOMethodHyperparametersBatchSizeExtensions.ToValueString(value)); | ||
} | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...bs/OpenAI/Generated/JsonConverters.FineTuneDPOMethodHyperparametersBatchSizeNullable.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#nullable enable | ||
|
||
namespace OpenAI.JsonConverters | ||
{ | ||
/// <inheritdoc /> | ||
public sealed class FineTuneDPOMethodHyperparametersBatchSizeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize?> | ||
{ | ||
/// <inheritdoc /> | ||
public override global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize? Read( | ||
ref global::System.Text.Json.Utf8JsonReader reader, | ||
global::System.Type typeToConvert, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
switch (reader.TokenType) | ||
{ | ||
case global::System.Text.Json.JsonTokenType.String: | ||
{ | ||
var stringValue = reader.GetString(); | ||
if (stringValue != null) | ||
{ | ||
return global::OpenAI.FineTuneDPOMethodHyperparametersBatchSizeExtensions.ToEnum(stringValue); | ||
} | ||
|
||
break; | ||
} | ||
case global::System.Text.Json.JsonTokenType.Number: | ||
{ | ||
var numValue = reader.GetInt32(); | ||
return (global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize)numValue; | ||
} | ||
default: | ||
throw new global::System.ArgumentOutOfRangeException(nameof(reader)); | ||
} | ||
|
||
return default; | ||
} | ||
|
||
/// <inheritdoc /> | ||
public override void Write( | ||
global::System.Text.Json.Utf8JsonWriter writer, | ||
global::OpenAI.FineTuneDPOMethodHyperparametersBatchSize? value, | ||
global::System.Text.Json.JsonSerializerOptions options) | ||
{ | ||
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); | ||
|
||
if (value == null) | ||
{ | ||
writer.WriteNullValue(); | ||
} | ||
else | ||
{ | ||
writer.WriteStringValue(global::OpenAI.FineTuneDPOMethodHyperparametersBatchSizeExtensions.ToValueString(value.Value)); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.