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
6 changes: 3 additions & 3 deletions api/OpenAI.net8.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4991,7 +4991,7 @@ public enum MessageStatus {
}
[Experimental("OPENAI001")]
public class OpenAIResponse : IJsonModel<OpenAIResponse>, IPersistableModel<OpenAIResponse> {
public bool? Background { get; }
public bool? BackgroundModeEnabled { get; }
public DateTimeOffset CreatedAt { get; }
public string EndUserId { get; }
public ResponseError Error { get; }
Expand Down Expand Up @@ -5069,7 +5069,7 @@ public class OpenAIResponseClient {
[Experimental("OPENAI001")]
public static class OpenAIResponsesModelFactory {
public static MessageResponseItem MessageResponseItem(string id = null, MessageRole role = MessageRole.Assistant, MessageStatus? status = null);
public static OpenAIResponse OpenAIResponse(string id = null, DateTimeOffset createdAt = default, ResponseStatus? status = null, ResponseError error = null, ResponseTokenUsage usage = null, string endUserId = null, ResponseReasoningOptions reasoningOptions = null, int? maxOutputTokenCount = null, ResponseTextOptions textOptions = null, ResponseTruncationMode? truncationMode = null, ResponseIncompleteStatusDetails incompleteStatusDetails = null, IEnumerable<ResponseItem> outputItems = null, bool parallelToolCallsEnabled = false, ResponseToolChoice toolChoice = null, string model = null, IDictionary<string, string> metadata = null, float? temperature = null, float? topP = null, ResponseServiceTier? serviceTier = null, string previousResponseId = null, bool? background = null, string instructions = null, IEnumerable<ResponseTool> tools = null);
public static OpenAIResponse OpenAIResponse(string id = null, DateTimeOffset createdAt = default, ResponseStatus? status = null, ResponseError error = null, ResponseTokenUsage usage = null, string endUserId = null, ResponseReasoningOptions reasoningOptions = null, int? maxOutputTokenCount = null, ResponseTextOptions textOptions = null, ResponseTruncationMode? truncationMode = null, ResponseIncompleteStatusDetails incompleteStatusDetails = null, IEnumerable<ResponseItem> outputItems = null, bool parallelToolCallsEnabled = false, ResponseToolChoice toolChoice = null, string model = null, IDictionary<string, string> metadata = null, float? temperature = null, float? topP = null, ResponseServiceTier? serviceTier = null, string previousResponseId = null, bool? backgroundModeEnabled = null, string instructions = null, IEnumerable<ResponseTool> tools = null);
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, IEnumerable<ReasoningSummaryPart> summaryParts = null);
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, string summaryText = null);
public static ReferenceResponseItem ReferenceResponseItem(string id = null);
Expand Down Expand Up @@ -5154,7 +5154,7 @@ public enum ResponseContentPartKind {
}
[Experimental("OPENAI001")]
public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPersistableModel<ResponseCreationOptions> {
public bool? Background { get; set; }
public bool? BackgroundModeEnabled { get; set; }
public string EndUserId { get; set; }
public string Instructions { get; set; }
public int? MaxOutputTokenCount { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions api/OpenAI.netstandard2.0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4390,7 +4390,7 @@ public enum MessageStatus {
Incomplete = 2
}
public class OpenAIResponse : IJsonModel<OpenAIResponse>, IPersistableModel<OpenAIResponse> {
public bool? Background { get; }
public bool? BackgroundModeEnabled { get; }
public DateTimeOffset CreatedAt { get; }
public string EndUserId { get; }
public ResponseError Error { get; }
Expand Down Expand Up @@ -4465,7 +4465,7 @@ public class OpenAIResponseClient {
}
public static class OpenAIResponsesModelFactory {
public static MessageResponseItem MessageResponseItem(string id = null, MessageRole role = MessageRole.Assistant, MessageStatus? status = null);
public static OpenAIResponse OpenAIResponse(string id = null, DateTimeOffset createdAt = default, ResponseStatus? status = null, ResponseError error = null, ResponseTokenUsage usage = null, string endUserId = null, ResponseReasoningOptions reasoningOptions = null, int? maxOutputTokenCount = null, ResponseTextOptions textOptions = null, ResponseTruncationMode? truncationMode = null, ResponseIncompleteStatusDetails incompleteStatusDetails = null, IEnumerable<ResponseItem> outputItems = null, bool parallelToolCallsEnabled = false, ResponseToolChoice toolChoice = null, string model = null, IDictionary<string, string> metadata = null, float? temperature = null, float? topP = null, ResponseServiceTier? serviceTier = null, string previousResponseId = null, bool? background = null, string instructions = null, IEnumerable<ResponseTool> tools = null);
public static OpenAIResponse OpenAIResponse(string id = null, DateTimeOffset createdAt = default, ResponseStatus? status = null, ResponseError error = null, ResponseTokenUsage usage = null, string endUserId = null, ResponseReasoningOptions reasoningOptions = null, int? maxOutputTokenCount = null, ResponseTextOptions textOptions = null, ResponseTruncationMode? truncationMode = null, ResponseIncompleteStatusDetails incompleteStatusDetails = null, IEnumerable<ResponseItem> outputItems = null, bool parallelToolCallsEnabled = false, ResponseToolChoice toolChoice = null, string model = null, IDictionary<string, string> metadata = null, float? temperature = null, float? topP = null, ResponseServiceTier? serviceTier = null, string previousResponseId = null, bool? backgroundModeEnabled = null, string instructions = null, IEnumerable<ResponseTool> tools = null);
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, IEnumerable<ReasoningSummaryPart> summaryParts = null);
public static ReasoningResponseItem ReasoningResponseItem(string id = null, string encryptedContent = null, ReasoningStatus? status = null, string summaryText = null);
public static ReferenceResponseItem ReferenceResponseItem(string id = null);
Expand Down Expand Up @@ -4542,7 +4542,7 @@ public enum ResponseContentPartKind {
Refusal = 5
}
public class ResponseCreationOptions : IJsonModel<ResponseCreationOptions>, IPersistableModel<ResponseCreationOptions> {
public bool? Background { get; set; }
public bool? BackgroundModeEnabled { get; set; }
public string EndUserId { get; set; }
public string Instructions { get; set; }
public int? MaxOutputTokenCount { get; set; }
Expand Down
4 changes: 4 additions & 0 deletions src/Custom/Responses/OpenAIResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ namespace OpenAI.Responses;
[CodeGenSuppress("OutputText")]
public partial class OpenAIResponse
{
// CUSTOM: Renamed.
[CodeGenMember("Background")]
public bool? BackgroundModeEnabled { get; }

// CUSTOM: Renamed.
[CodeGenMember("User")]
public string EndUserId { get; }
Expand Down
4 changes: 2 additions & 2 deletions src/Custom/Responses/OpenAIResponsesModelFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static OpenAIResponse OpenAIResponse(
float? topP = null,
ResponseServiceTier? serviceTier = null,
string previousResponseId = null,
bool? background = null,
bool? backgroundModeEnabled = null,
string instructions = null,
IEnumerable<ResponseTool> tools = null)
{
Expand All @@ -46,7 +46,7 @@ public static OpenAIResponse OpenAIResponse(
topP: topP,
serviceTier: serviceTier,
previousResponseId: previousResponseId,
background: background,
backgroundModeEnabled: backgroundModeEnabled,
instructions: instructions,
tools: tools.ToList(),
id: id,
Expand Down
4 changes: 4 additions & 0 deletions src/Custom/Responses/ResponseCreationOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public partial class ResponseCreationOptions
// CUSTOM: Made internal. This value comes from a parameter on the client method.
internal bool? Stream { get; set; }

// CUSTOM: Renamed.
[CodeGenMember("Background")]
public bool? BackgroundModeEnabled { get; set; }

// CUSTOM: Renamed.
[CodeGenMember("User")]
public string EndUserId { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions src/Generated/Models/Responses/OpenAIResponse.Serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("reasoning"u8);
writer.WriteObjectValue(ReasoningOptions, options);
}
if (Optional.IsDefined(Background) && _additionalBinaryDataProperties?.ContainsKey("background") != true)
if (Optional.IsDefined(BackgroundModeEnabled) && _additionalBinaryDataProperties?.ContainsKey("background") != true)
{
writer.WritePropertyName("background"u8);
writer.WriteBooleanValue(Background.Value);
writer.WriteBooleanValue(BackgroundModeEnabled.Value);
}
if (Optional.IsDefined(MaxOutputTokenCount) && _additionalBinaryDataProperties?.ContainsKey("max_output_tokens") != true)
{
Expand Down Expand Up @@ -263,7 +263,7 @@ internal static OpenAIResponse DeserializeOpenAIResponse(JsonElement element, Mo
string previousResponseId = default;
string model = default;
ResponseReasoningOptions reasoningOptions = default;
bool? background = default;
bool? backgroundModeEnabled = default;
int? maxOutputTokenCount = default;
string instructions = default;
ResponseTextOptions textOptions = default;
Expand Down Expand Up @@ -372,10 +372,10 @@ internal static OpenAIResponse DeserializeOpenAIResponse(JsonElement element, Mo
{
if (prop.Value.ValueKind == JsonValueKind.Null)
{
background = null;
backgroundModeEnabled = null;
continue;
}
background = prop.Value.GetBoolean();
backgroundModeEnabled = prop.Value.GetBoolean();
continue;
}
if (prop.NameEquals("max_output_tokens"u8))
Expand Down Expand Up @@ -520,7 +520,7 @@ internal static OpenAIResponse DeserializeOpenAIResponse(JsonElement element, Mo
previousResponseId,
model,
reasoningOptions,
background,
backgroundModeEnabled,
maxOutputTokenCount,
instructions,
textOptions,
Expand Down
6 changes: 2 additions & 4 deletions src/Generated/Models/Responses/OpenAIResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal OpenAIResponse(IDictionary<string, string> metadata, float? temperature
ParallelToolCallsEnabled = parallelToolCallsEnabled;
}

internal OpenAIResponse(IDictionary<string, string> metadata, float? temperature, float? topP, string endUserId, ResponseServiceTier? serviceTier, string previousResponseId, string model, ResponseReasoningOptions reasoningOptions, bool? background, int? maxOutputTokenCount, string instructions, ResponseTextOptions textOptions, IList<ResponseTool> tools, ResponseToolChoice toolChoice, ResponseTruncationMode? truncationMode, string id, string @object, ResponseStatus? status, DateTimeOffset createdAt, ResponseError error, ResponseIncompleteStatusDetails incompleteStatusDetails, IList<ResponseItem> outputItems, ResponseTokenUsage usage, bool parallelToolCallsEnabled, IDictionary<string, BinaryData> additionalBinaryDataProperties)
internal OpenAIResponse(IDictionary<string, string> metadata, float? temperature, float? topP, string endUserId, ResponseServiceTier? serviceTier, string previousResponseId, string model, ResponseReasoningOptions reasoningOptions, bool? backgroundModeEnabled, int? maxOutputTokenCount, string instructions, ResponseTextOptions textOptions, IList<ResponseTool> tools, ResponseToolChoice toolChoice, ResponseTruncationMode? truncationMode, string id, string @object, ResponseStatus? status, DateTimeOffset createdAt, ResponseError error, ResponseIncompleteStatusDetails incompleteStatusDetails, IList<ResponseItem> outputItems, ResponseTokenUsage usage, bool parallelToolCallsEnabled, IDictionary<string, BinaryData> additionalBinaryDataProperties)
{
// Plugin customization: ensure initialization of collections
Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
Expand All @@ -42,7 +42,7 @@ internal OpenAIResponse(IDictionary<string, string> metadata, float? temperature
PreviousResponseId = previousResponseId;
Model = model;
ReasoningOptions = reasoningOptions;
Background = background;
BackgroundModeEnabled = backgroundModeEnabled;
MaxOutputTokenCount = maxOutputTokenCount;
Instructions = instructions;
TextOptions = textOptions;
Expand Down Expand Up @@ -71,8 +71,6 @@ internal OpenAIResponse(IDictionary<string, string> metadata, float? temperature

public string PreviousResponseId { get; }

public bool? Background { get; }

public string Instructions { get; }

public IList<ResponseTool> Tools { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("reasoning"u8);
writer.WriteObjectValue(ReasoningOptions, options);
}
if (Optional.IsDefined(Background) && _additionalBinaryDataProperties?.ContainsKey("background") != true)
if (Optional.IsDefined(BackgroundModeEnabled) && _additionalBinaryDataProperties?.ContainsKey("background") != true)
{
writer.WritePropertyName("background"u8);
writer.WriteBooleanValue(Background.Value);
writer.WriteBooleanValue(BackgroundModeEnabled.Value);
}
if (Optional.IsDefined(MaxOutputTokenCount) && _additionalBinaryDataProperties?.ContainsKey("max_output_tokens") != true)
{
Expand Down Expand Up @@ -205,7 +205,7 @@ internal static ResponseCreationOptions DeserializeResponseCreationOptions(JsonE
string previousResponseId = default;
string model = default;
ResponseReasoningOptions reasoningOptions = default;
bool? background = default;
bool? backgroundModeEnabled = default;
int? maxOutputTokenCount = default;
string instructions = default;
ResponseTextOptions textOptions = default;
Expand Down Expand Up @@ -304,10 +304,10 @@ internal static ResponseCreationOptions DeserializeResponseCreationOptions(JsonE
{
if (prop.Value.ValueKind == JsonValueKind.Null)
{
background = null;
backgroundModeEnabled = null;
continue;
}
background = prop.Value.GetBoolean();
backgroundModeEnabled = prop.Value.GetBoolean();
continue;
}
if (prop.NameEquals("max_output_tokens"u8))
Expand Down Expand Up @@ -438,7 +438,7 @@ internal static ResponseCreationOptions DeserializeResponseCreationOptions(JsonE
previousResponseId,
model,
reasoningOptions,
background,
backgroundModeEnabled,
maxOutputTokenCount,
instructions,
textOptions,
Expand Down
6 changes: 2 additions & 4 deletions src/Generated/Models/Responses/ResponseCreationOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class ResponseCreationOptions
{
private protected IDictionary<string, BinaryData> _additionalBinaryDataProperties;

internal ResponseCreationOptions(IDictionary<string, string> metadata, float? temperature, float? topP, string endUserId, ResponseServiceTier? serviceTier, string previousResponseId, string model, ResponseReasoningOptions reasoningOptions, bool? background, int? maxOutputTokenCount, string instructions, ResponseTextOptions textOptions, IList<ResponseTool> tools, ResponseToolChoice toolChoice, ResponseTruncationMode? truncationMode, IList<ResponseItem> input, IList<InternalIncludable> include, bool? parallelToolCallsEnabled, bool? storedOutputEnabled, bool? stream, IDictionary<string, BinaryData> additionalBinaryDataProperties)
internal ResponseCreationOptions(IDictionary<string, string> metadata, float? temperature, float? topP, string endUserId, ResponseServiceTier? serviceTier, string previousResponseId, string model, ResponseReasoningOptions reasoningOptions, bool? backgroundModeEnabled, int? maxOutputTokenCount, string instructions, ResponseTextOptions textOptions, IList<ResponseTool> tools, ResponseToolChoice toolChoice, ResponseTruncationMode? truncationMode, IList<ResponseItem> input, IList<InternalIncludable> include, bool? parallelToolCallsEnabled, bool? storedOutputEnabled, bool? stream, IDictionary<string, BinaryData> additionalBinaryDataProperties)
{
// Plugin customization: ensure initialization of collections
Metadata = metadata ?? new ChangeTrackingDictionary<string, string>();
Expand All @@ -25,7 +25,7 @@ internal ResponseCreationOptions(IDictionary<string, string> metadata, float? te
PreviousResponseId = previousResponseId;
Model = model;
ReasoningOptions = reasoningOptions;
Background = background;
BackgroundModeEnabled = backgroundModeEnabled;
MaxOutputTokenCount = maxOutputTokenCount;
Instructions = instructions;
TextOptions = textOptions;
Expand All @@ -50,8 +50,6 @@ internal ResponseCreationOptions(IDictionary<string, string> metadata, float? te

public string PreviousResponseId { get; set; }

public bool? Background { get; set; }

public string Instructions { get; set; }

internal IDictionary<string, BinaryData> SerializedAdditionalRawData
Expand Down
Loading