Skip to content

Commit e992611

Browse files
committed
Update generated code
1 parent 2b83621 commit e992611

20 files changed

+6
-94
lines changed

examples/Chat/Example10_AdditionalProperties.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public void Example10_AdditionalProperties()
2222
Console.WriteLine($"[ASSISTANT]: {completion.Content[0].Text}");
2323

2424
// You can also read additional properties back from the response
25-
var effort = completion.Patch.GetString("$.reasoning_effort"u8);
26-
Console.WriteLine($"effort={effort}");
25+
var serviceTier = completion.Patch.GetString("$.service_tier"u8);
26+
Console.WriteLine($"service_tier={serviceTier}");
2727
}
2828
}
2929

examples/Chat/Example10_AdditionalPropertiesAsync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public async Task Example10_AdditionalPropertiesAsync()
2323
Console.WriteLine($"[ASSISTANT]: {completion.Content[0].Text}");
2424

2525
// You can also read additional properties back from the response
26-
var effort = completion.Patch.GetString("$.reasoning_effort"u8);
27-
Console.WriteLine($"effort={effort}");
26+
var serviceTier = completion.Patch.GetString("$.service_tier"u8);
27+
Console.WriteLine($"service_tier={serviceTier}");
2828
}
2929
}
3030

examples/Responses/Example08_OutputAdditionalProperties.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void Example08_OutputAdditionalProperties()
3939
var outputFormat = imageGenResponse.Patch.GetString("$.output_format"u8);
4040
var quality = imageGenResponse.Patch.GetString("$.quality"u8);
4141
var size = imageGenResponse.Patch.GetString("$.size"u8);
42-
Console.WriteLine($"outputFormat={outputFormat}, quality={quality}, size={size}");
42+
Console.WriteLine($"output_format={outputFormat}, quality={quality}, size={size}");
4343
}
4444
}
4545

examples/Responses/Example08_OutputAdditionalPropertiesAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public async Task Example08_OutputAdditionalPropertiesAsync()
4040
var outputFormat = imageGenResponse.Patch.GetString("$.output_format"u8);
4141
var quality = imageGenResponse.Patch.GetString("$.quality"u8);
4242
var size = imageGenResponse.Patch.GetString("$.size"u8);
43-
Console.WriteLine($"outputFormat={outputFormat}, quality={quality}, size={size}");
43+
Console.WriteLine($"output_format={outputFormat}, quality={quality}, size={size}");
4444
}
4545
}
4646

src/Generated/Models/Chat/AssistantChatMessage.Serialization.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
6262
Patch.WriteTo(writer, "$.tool_calls"u8);
6363
writer.WriteEndArray();
6464
}
65-
else
66-
{
67-
writer.WriteNull("tool_calls"u8);
68-
}
6965
if (Optional.IsDefined(FunctionCall) && !Patch.Contains("$.function_call"u8))
7066
{
7167
writer.WritePropertyName("function_call"u8);

src/Generated/Models/Chat/ChatCompletionMessageListDatum.Serialization.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
8181
Patch.WriteTo(writer, "$.tool_calls"u8);
8282
writer.WriteEndArray();
8383
}
84-
else
85-
{
86-
writer.WriteNull("tool_calls"u8);
87-
}
8884
if (Patch.Contains("$.annotations"u8))
8985
{
9086
if (!Patch.IsRemoved("$.annotations"u8))
@@ -108,10 +104,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
108104
Patch.WriteTo(writer, "$.annotations"u8);
109105
writer.WriteEndArray();
110106
}
111-
else
112-
{
113-
writer.WriteNull("annotations"u8);
114-
}
115107
if (!Patch.Contains("$.role"u8))
116108
{
117109
writer.WritePropertyName("role"u8);

src/Generated/Models/Chat/ChatCompletionOptions.Serialization.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
133133
Patch.WriteTo(writer, "$.modalities"u8);
134134
writer.WriteEndArray();
135135
}
136-
else
137-
{
138-
writer.WriteNull("modalities"u8);
139-
}
140136
if (Optional.IsDefined(ReasoningEffortLevel) && !Patch.Contains("$.reasoning_effort"u8))
141137
{
142138
writer.WritePropertyName("reasoning_effort"u8);
@@ -200,10 +196,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
200196
writer.WritePropertyName("stop"u8);
201197
SerializeStopSequencesValue(writer, options);
202198
}
203-
else
204-
{
205-
writer.WriteNull("stop"u8);
206-
}
207199
if (Optional.IsCollectionDefined(LogitBiases) && !Patch.Contains("$.logit_bias"u8))
208200
{
209201
writer.WritePropertyName("logit_bias"u8);
@@ -262,10 +254,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
262254
Patch.WriteTo(writer, "$.tools"u8);
263255
writer.WriteEndArray();
264256
}
265-
else
266-
{
267-
writer.WriteNull("tools"u8);
268-
}
269257
if (Optional.IsDefined(ToolChoice) && !Patch.Contains("$.tool_choice"u8))
270258
{
271259
writer.WritePropertyName("tool_choice"u8);
@@ -304,10 +292,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
304292
Patch.WriteTo(writer, "$.functions"u8);
305293
writer.WriteEndArray();
306294
}
307-
else
308-
{
309-
writer.WriteNull("functions"u8);
310-
}
311295

312296
Patch.WriteTo(writer);
313297
#pragma warning restore SCME0001 // Type is for evaluation purposes only and is subject to change or removal in future updates.

src/Generated/Models/Chat/InternalChatCompletionResponseMessage.Serialization.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
8181
Patch.WriteTo(writer, "$.tool_calls"u8);
8282
writer.WriteEndArray();
8383
}
84-
else
85-
{
86-
writer.WriteNull("tool_calls"u8);
87-
}
8884
if (Patch.Contains("$.annotations"u8))
8985
{
9086
if (!Patch.IsRemoved("$.annotations"u8))
@@ -108,10 +104,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
108104
Patch.WriteTo(writer, "$.annotations"u8);
109105
writer.WriteEndArray();
110106
}
111-
else
112-
{
113-
writer.WriteNull("annotations"u8);
114-
}
115107
if (!Patch.Contains("$.role"u8))
116108
{
117109
writer.WritePropertyName("role"u8);

src/Generated/Models/Chat/InternalChatCompletionStreamResponseDelta.Serialization.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
7474
Patch.WriteTo(writer, "$.tool_calls"u8);
7575
writer.WriteEndArray();
7676
}
77-
else
78-
{
79-
writer.WriteNull("tool_calls"u8);
80-
}
8177
if (Optional.IsDefined(Role) && !Patch.Contains("$.role"u8))
8278
{
8379
writer.WritePropertyName("role"u8);

src/Generated/Models/Responses/AutomaticCodeInterpreterToolContainerConfiguration.Serialization.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
6565
Patch.WriteTo(writer, "$.file_ids"u8);
6666
writer.WriteEndArray();
6767
}
68-
else
69-
{
70-
writer.WriteNull("file_ids"u8);
71-
}
7268

7369
Patch.WriteTo(writer);
7470
#pragma warning restore SCME0001 // Type is for evaluation purposes only and is subject to change or removal in future updates.

0 commit comments

Comments
 (0)