Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class ListFilesResponseObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.ListFilesResponseObject>
public sealed class ListFilesOrderJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.ListFilesOrder>
{
/// <inheritdoc />
public override global::OpenAI.ListFilesResponseObject Read(
public override global::OpenAI.ListFilesOrder Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class ListFilesResponseObjectJsonConverter : global::System.Text.J
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenAI.ListFilesResponseObjectExtensions.ToEnum(stringValue) ?? default;
return global::OpenAI.ListFilesOrderExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenAI.ListFilesResponseObject)numValue;
return (global::OpenAI.ListFilesOrder)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,12 +38,12 @@ public sealed class ListFilesResponseObjectJsonConverter : global::System.Text.J
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenAI.ListFilesResponseObject value,
global::OpenAI.ListFilesOrder value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::OpenAI.ListFilesResponseObjectExtensions.ToValueString(value));
writer.WriteStringValue(global::OpenAI.ListFilesOrderExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class ListFilesResponseObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.ListFilesResponseObject?>
public sealed class ListFilesOrderNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.ListFilesOrder?>
{
/// <inheritdoc />
public override global::OpenAI.ListFilesResponseObject? Read(
public override global::OpenAI.ListFilesOrder? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class ListFilesResponseObjectNullableJsonConverter : global::Syste
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenAI.ListFilesResponseObjectExtensions.ToEnum(stringValue);
return global::OpenAI.ListFilesOrderExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenAI.ListFilesResponseObject)numValue;
return (global::OpenAI.ListFilesOrder)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,7 +38,7 @@ public sealed class ListFilesResponseObjectNullableJsonConverter : global::Syste
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenAI.ListFilesResponseObject? value,
global::OpenAI.ListFilesOrder? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -49,7 +49,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::OpenAI.ListFilesResponseObjectExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::OpenAI.ListFilesOrderExtensions.ToValueString(value.Value));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class RealtimeClientEventSessionUpdateSessionMaxOutputTokensJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens>
public sealed class PredictionContentTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.PredictionContentType>
{
/// <inheritdoc />
public override global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens Read(
public override global::OpenAI.PredictionContentType Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class RealtimeClientEventSessionUpdateSessionMaxOutputTokensJsonCo
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokensExtensions.ToEnum(stringValue) ?? default;
return global::OpenAI.PredictionContentTypeExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens)numValue;
return (global::OpenAI.PredictionContentType)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,12 +38,12 @@ public sealed class RealtimeClientEventSessionUpdateSessionMaxOutputTokensJsonCo
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens value,
global::OpenAI.PredictionContentType value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokensExtensions.ToValueString(value));
writer.WriteStringValue(global::OpenAI.PredictionContentTypeExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace OpenAI.JsonConverters
{
/// <inheritdoc />
public sealed class RealtimeClientEventSessionUpdateSessionMaxOutputTokensNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens?>
public sealed class PredictionContentTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::OpenAI.PredictionContentType?>
{
/// <inheritdoc />
public override global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens? Read(
public override global::OpenAI.PredictionContentType? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
Expand All @@ -18,15 +18,15 @@ public sealed class RealtimeClientEventSessionUpdateSessionMaxOutputTokensNullab
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokensExtensions.ToEnum(stringValue);
return global::OpenAI.PredictionContentTypeExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens)numValue;
return (global::OpenAI.PredictionContentType)numValue;
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
Expand All @@ -38,7 +38,7 @@ public sealed class RealtimeClientEventSessionUpdateSessionMaxOutputTokensNullab
/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokens? value,
global::OpenAI.PredictionContentType? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
Expand All @@ -49,7 +49,7 @@ public override void Write(
}
else
{
writer.WriteStringValue(global::OpenAI.RealtimeClientEventSessionUpdateSessionMaxOutputTokensExtensions.ToValueString(value.Value));
writer.WriteStringValue(global::OpenAI.PredictionContentTypeExtensions.ToValueString(value.Value));
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading