Skip to content

Commit d2b22ef

Browse files
stephentoubmarkwallace-microsoftrogerbarreto
authored
.Net: Update to latest M.E.AI{.Abstractions} + OpenAI Related Packages (#12685)
This pull request updates package dependencies, refactors the OpenAI Realtime demo to align with API changes, and modifies related unit tests to reflect these updates. The most significant changes include updating package versions, transitioning from the `RealtimeConversation` API to the `Realtime` API, and adjusting test logic to accommodate updated data structures. ### Dependency Updates: * Updated `Azure.AI.OpenAI` to version `2.2.0-beta.5` and `OpenAI` to version `2.2.0`. [[1]](diffhunk://#diff-21abc2ac38e0ade95299a2450724507fe1d080c383a3024337f9177278c64186L22-R22) [[2]](diffhunk://#diff-21abc2ac38e0ade95299a2450724507fe1d080c383a3024337f9177278c64186L73-R73) * Updated `System.Text.Json` to version `8.0.6`. * Upgraded `Microsoft.Extensions.AI` and related libraries to version `9.7.1`. ### OpenAI Realtime Demo Refactor: * Replaced `RealtimeConversationClient` and related classes with `RealtimeClient` and its updated API. This includes changes to session initialization, configuration, and item handling in `Program.cs`. [[1]](diffhunk://#diff-fa8b1514e6458341bf08441b1dc14550fb9bb75d2a0c108c75e1615c2e2ba09dL11-R19) [[2]](diffhunk://#diff-fa8b1514e6458341bf08441b1dc14550fb9bb75d2a0c108c75e1615c2e2ba09dL36-R45) [[3]](diffhunk://#diff-fa8b1514e6458341bf08441b1dc14550fb9bb75d2a0c108c75e1615c2e2ba09dL378-R400) * Adjusted method calls and data types to align with the new API, such as replacing `ConversationItem` with `RealtimeItem` and updating event types like `ConversationUpdate` to `RealtimeUpdate`. [[1]](diffhunk://#diff-fa8b1514e6458341bf08441b1dc14550fb9bb75d2a0c108c75e1615c2e2ba09dL65-R70) [[2]](diffhunk://#diff-fa8b1514e6458341bf08441b1dc14550fb9bb75d2a0c108c75e1615c2e2ba09dL85-R84) [[3]](diffhunk://#diff-fa8b1514e6458341bf08441b1dc14550fb9bb75d2a0c108c75e1615c2e2ba09dL229-R228) ### Unit Test Updates: * Updated test cases to use new data structures, such as replacing `IReadOnlyList<string>` with `IReadOnlyList<ReasoningSummaryPart>` and adapting related assertions. [[1]](diffhunk://#diff-3e486c31e4424c1a3ea61e23b1f7a266d186a4016ad57d7187dacf7b4bc8140fL198-R206) [[2]](diffhunk://#diff-8ea1809160a96b9a3ebca5c1695353800f302aa2c5aabb4a2be51c6494f6f315L105-R105) * Added `OPENAI001` to `NoWarn` lists in several `.csproj` files to suppress warnings related to the OpenAI SDK. [[1]](diffhunk://#diff-ae520434a4ad683f6736397dfbd0b308dda10dbce75af0c5064efbb3b0059dc0L11-R11) [[2]](diffhunk://#diff-5703c2716d4b9753ae67ce3c1434595c4adbff1eb6564dd2fa0a0882c3925551L8-R8) [[3]](diffhunk://#diff-8788687b51a5a626ca287b5c18f667bf1f5fa9b13af4ee425765f8e84b765ac3L10-R10) --------- Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com> Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
1 parent 48f71b1 commit d2b22ef

File tree

16 files changed

+120
-77
lines changed

16 files changed

+120
-77
lines changed

dotnet/Directory.Packages.props

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<PackageVersion Include="AWSSDK.SecurityToken" Version="4.0.1.3" />
2020
<PackageVersion Include="Azure.AI.Agents.Persistent" Version="1.0.0" />
2121
<PackageVersion Include="Azure.AI.ContentSafety" Version="1.0.0" />
22-
<PackageVersion Include="Azure.AI.OpenAI" Version="[2.2.0-beta.4]" />
22+
<PackageVersion Include="Azure.AI.OpenAI" Version="[2.2.0-beta.5]" />
2323
<PackageVersion Include="Azure.AI.Projects" Version="1.0.0-beta.9" />
2424
<PackageVersion Include="Azure.Identity" Version="1.14.1" />
2525
<PackageVersion Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.3.0" />
@@ -70,7 +70,7 @@
7070
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
7171
<PackageVersion Include="Npgsql" Version="8.0.7" />
7272
<PackageVersion Include="OllamaSharp" Version="5.2.3" />
73-
<PackageVersion Include="OpenAI" Version="[2.2.0-beta.4]" />
73+
<PackageVersion Include="OpenAI" Version="[2.2.0]" />
7474
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.12.0" />
7575
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.12.0" />
7676
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.12.0" />
@@ -88,7 +88,7 @@
8888
<PackageVersion Include="System.Memory.Data" Version="8.0.1" />
8989
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
9090
<PackageVersion Include="System.Numerics.Tensors" Version="9.0.6" />
91-
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
91+
<PackageVersion Include="System.Text.Json" Version="8.0.6" />
9292
<PackageVersion Include="System.ValueTuple" Version="4.6.1" />
9393
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
9494
<PackageVersion Include="SharpA2A.Core" Version="0.2.1-preview.1" />
@@ -97,10 +97,10 @@
9797
<!-- Tokenizers -->
9898
<PackageVersion Include="Microsoft.ML.Tokenizers" Version="1.0.2" />
9999
<!-- Microsoft.Extensions.* -->
100-
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.6.0" />
101-
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.5.0" />
102-
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.6.0-preview.1.25310.2" />
103-
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="9.5.0-preview.1.25265.7" />
100+
<PackageVersion Include="Microsoft.Extensions.AI" Version="9.7.1" />
101+
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.7.1" />
102+
<PackageVersion Include="Microsoft.Extensions.AI.AzureAIInference" Version="9.7.1-preview.1.25365.4" />
103+
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="9.7.1-preview.1.25365.4" />
104104
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
105105
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
106106
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />

dotnet/samples/Demos/OpenAIRealtime/OpenAIRealtime.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8-
<NoWarn>$(NoWarn);VSTHRD111,CA2007,CS8618,CS1591,CA1052,SKEXP0001</NoWarn>
8+
<NoWarn>$(NoWarn);VSTHRD111,CA2007,CS8618,CS1591,CA1052,CA1810,SKEXP0001</NoWarn>
99
<UserSecretsId>5ee045b0-aea3-4f08-8d31-32d1a6f8fed0</UserSecretsId>
1010
</PropertyGroup>
1111

dotnet/samples/Demos/OpenAIRealtime/Program.cs

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
using Microsoft.Extensions.Configuration;
99
using Microsoft.SemanticKernel;
1010
using Microsoft.SemanticKernel.Connectors.OpenAI;
11-
using OpenAI.RealtimeConversation;
11+
using OpenAI.Realtime;
1212

1313
namespace OpenAIRealtime;
1414

1515
#pragma warning disable OPENAI002
1616

1717
/// <summary>
1818
/// Demonstrates the use of the OpenAI Realtime API with function calling and Semantic Kernel.
19-
/// For conversational experiences, it is recommended to use <see cref="RealtimeConversationClient"/> from the Azure/OpenAI SDK.
19+
/// For conversational experiences, it is recommended to use <see cref="RealtimeClient"/> from the Azure/OpenAI SDK.
2020
/// Since the OpenAI Realtime API supports function calling, the example shows how to combine it with Semantic Kernel plugins and functions.
2121
/// </summary>
2222
internal sealed class Program
@@ -33,16 +33,16 @@ public static async Task Main(string[] args)
3333
kernel.ImportPluginFromType<WeatherPlugin>();
3434

3535
// Start a new conversation session.
36-
using RealtimeConversationSession session = await realtimeConversationClient.StartConversationSessionAsync();
36+
using RealtimeSession session = await realtimeConversationClient.StartConversationSessionAsync("gpt-4o-realtime-preview");
3737

3838
// Initialize session options.
3939
// Session options control connection-wide behavior shared across all conversations,
4040
// including audio input format and voice activity detection settings.
4141
ConversationSessionOptions sessionOptions = new()
4242
{
4343
Voice = ConversationVoice.Alloy,
44-
InputAudioFormat = ConversationAudioFormat.Pcm16,
45-
OutputAudioFormat = ConversationAudioFormat.Pcm16,
44+
InputAudioFormat = RealtimeAudioFormat.Pcm16,
45+
OutputAudioFormat = RealtimeAudioFormat.Pcm16,
4646
InputTranscriptionOptions = new()
4747
{
4848
Model = "whisper-1",
@@ -62,13 +62,12 @@ public static async Task Main(string[] args)
6262
}
6363

6464
// Configure session with defined options.
65-
await session.ConfigureSessionAsync(sessionOptions);
65+
await session.ConfigureConversationSessionAsync(sessionOptions);
6666

6767
// Items such as user, assistant, or system messages, as well as input audio, can be sent to the session.
6868
// An example of sending user message to the session.
6969
// ConversationItem can be constructed from Microsoft.SemanticKernel.ChatMessageContent if needed by mapping the relevant fields.
70-
await session.AddItemAsync(
71-
ConversationItem.CreateUserMessage(["I'm trying to decide what to wear on my trip."]));
70+
await session.AddItemAsync(RealtimeItem.CreateUserMessage(["I'm trying to decide what to wear on my trip."]));
7271

7372
// Use audio file that contains a recorded question: "What's the weather like in San Francisco, California?"
7473
string inputAudioPath = FindFile("Assets\\realtime_whats_the_weather_pcm16_24khz_mono.wav");
@@ -82,7 +81,7 @@ await session.AddItemAsync(
8281
Dictionary<string, StringBuilder> functionArgumentBuildersById = [];
8382

8483
// Define a loop to receive conversation updates in the session.
85-
await foreach (ConversationUpdate update in session.ReceiveUpdatesAsync())
84+
await foreach (RealtimeUpdate update in session.ReceiveUpdatesAsync())
8685
{
8786
// Notification indicating the start of the conversation session.
8887
if (update is ConversationSessionStartedUpdate sessionStartedUpdate)
@@ -92,21 +91,21 @@ await session.AddItemAsync(
9291
}
9392

9493
// Notification indicating the start of detected voice activity.
95-
if (update is ConversationInputSpeechStartedUpdate speechStartedUpdate)
94+
if (update is InputAudioSpeechStartedUpdate speechStartedUpdate)
9695
{
9796
Console.WriteLine(
9897
$" -- Voice activity detection started at {speechStartedUpdate.AudioStartTime}");
9998
}
10099

101100
// Notification indicating the end of detected voice activity.
102-
if (update is ConversationInputSpeechFinishedUpdate speechFinishedUpdate)
101+
if (update is InputAudioSpeechFinishedUpdate speechFinishedUpdate)
103102
{
104103
Console.WriteLine(
105104
$" -- Voice activity detection ended at {speechFinishedUpdate.AudioEndTime}");
106105
}
107106

108107
// Notification indicating the start of item streaming, such as a function call or response message.
109-
if (update is ConversationItemStreamingStartedUpdate itemStreamingStartedUpdate)
108+
if (update is OutputStreamingStartedUpdate itemStreamingStartedUpdate)
110109
{
111110
Console.WriteLine(" -- Begin streaming of new item");
112111
if (!string.IsNullOrEmpty(itemStreamingStartedUpdate.FunctionName))
@@ -116,7 +115,7 @@ await session.AddItemAsync(
116115
}
117116

118117
// Notification about item streaming delta, which may include audio transcript, audio bytes, or function arguments.
119-
if (update is ConversationItemStreamingPartDeltaUpdate deltaUpdate)
118+
if (update is OutputDeltaUpdate deltaUpdate)
120119
{
121120
Console.Write(deltaUpdate.AudioTranscript);
122121
Console.Write(deltaUpdate.Text);
@@ -148,7 +147,7 @@ await session.AddItemAsync(
148147

149148
// Notification indicating the end of item streaming, such as a function call or response message.
150149
// At this point, audio transcript can be displayed on console, or a function can be called with aggregated arguments.
151-
if (update is ConversationItemStreamingFinishedUpdate itemStreamingFinishedUpdate)
150+
if (update is OutputStreamingFinishedUpdate itemStreamingFinishedUpdate)
152151
{
153152
Console.WriteLine();
154153
Console.WriteLine($" -- Item streaming finished, item_id={itemStreamingFinishedUpdate.ItemId}");
@@ -176,7 +175,7 @@ await session.AddItemAsync(
176175
var resultContent = await functionCallContent.InvokeAsync(kernel);
177176

178177
// Create a function call output conversation item with function call result.
179-
ConversationItem functionOutputItem = ConversationItem.CreateFunctionCallOutput(
178+
RealtimeItem functionOutputItem = RealtimeItem.CreateFunctionCallOutput(
180179
callId: itemStreamingFinishedUpdate.FunctionCallId,
181180
output: ProcessFunctionResult(resultContent.Result));
182181

@@ -198,15 +197,15 @@ await session.AddItemAsync(
198197
}
199198

200199
// Notification indicating the completion of transcription from input audio.
201-
if (update is ConversationInputTranscriptionFinishedUpdate transcriptionCompletedUpdate)
200+
if (update is InputAudioTranscriptionFinishedUpdate transcriptionCompletedUpdate)
202201
{
203202
Console.WriteLine();
204203
Console.WriteLine($" -- User audio transcript: {transcriptionCompletedUpdate.Transcript}");
205204
Console.WriteLine();
206205
}
207206

208207
// Notification about completed model response turn.
209-
if (update is ConversationResponseFinishedUpdate turnFinishedUpdate)
208+
if (update is ResponseFinishedUpdate turnFinishedUpdate)
210209
{
211210
Console.WriteLine($" -- Model turn generation finished. Status: {turnFinishedUpdate.Status}");
212211

@@ -226,7 +225,7 @@ await session.AddItemAsync(
226225
}
227226

228227
// Notification about error in conversation session.
229-
if (update is ConversationErrorUpdate errorUpdate)
228+
if (update is RealtimeErrorUpdate errorUpdate)
230229
{
231230
Console.WriteLine();
232231
Console.WriteLine($"ERROR: {errorUpdate.Message}");
@@ -375,32 +374,30 @@ private static string FindFile(string fileName)
375374
}
376375

377376
/// <summary>
378-
/// Helper method to get an instance of <see cref="RealtimeConversationClient"/> based on provided
377+
/// Helper method to get an instance of <see cref="RealtimeClient"/> based on provided
379378
/// OpenAI or Azure OpenAI configuration.
380379
/// </summary>
381-
private static RealtimeConversationClient GetRealtimeConversationClient()
380+
private static RealtimeClient GetRealtimeConversationClient()
382381
{
383382
var config = new ConfigurationBuilder()
384383
.AddUserSecrets<Program>()
385384
.AddEnvironmentVariables()
386385
.Build();
387386

388-
var openAIOptions = config.GetSection(OpenAIOptions.SectionName).Get<OpenAIOptions>();
389-
var azureOpenAIOptions = config.GetSection(AzureOpenAIOptions.SectionName).Get<AzureOpenAIOptions>();
387+
var openAIOptions = config.GetSection(OpenAIOptions.SectionName).Get<OpenAIOptions>()!;
388+
var azureOpenAIOptions = config.GetSection(AzureOpenAIOptions.SectionName).Get<AzureOpenAIOptions>()!;
390389

391390
if (openAIOptions is not null && openAIOptions.IsValid)
392391
{
393-
return new RealtimeConversationClient(
394-
model: "gpt-4o-realtime-preview",
395-
credential: new ApiKeyCredential(openAIOptions.ApiKey));
392+
return new RealtimeClient(new ApiKeyCredential(openAIOptions.ApiKey));
396393
}
397394
else if (azureOpenAIOptions is not null && azureOpenAIOptions.IsValid)
398395
{
399396
var client = new AzureOpenAIClient(
400397
endpoint: new Uri(azureOpenAIOptions.Endpoint),
401398
credential: new ApiKeyCredential(azureOpenAIOptions.ApiKey));
402399

403-
return client.GetRealtimeConversationClient(azureOpenAIOptions.DeploymentName);
400+
return client.GetRealtimeClient();
404401
}
405402
else
406403
{

dotnet/src/Agents/OpenAI/Extensions/OpenAIResponseExtensions.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static ChatMessageContent ToChatMessageContent(this OpenAIResponse respon
5252
}
5353
else if (item is ReasoningResponseItem reasoningResponseItem)
5454
{
55-
if (reasoningResponseItem.SummaryTextParts is not null && reasoningResponseItem.SummaryTextParts.Count > 0)
55+
if (reasoningResponseItem.SummaryParts is not null && reasoningResponseItem.SummaryParts.Count > 0)
5656
{
5757
return new ChatMessageContent(AuthorRole.Assistant, item.ToChatMessageContentItemCollection(), innerContent: reasoningResponseItem);
5858
}
@@ -77,7 +77,7 @@ public static ChatMessageContentItemCollection ToChatMessageContentItemCollectio
7777
}
7878
else if (item is ReasoningResponseItem reasoningResponseItem)
7979
{
80-
return reasoningResponseItem.SummaryTextParts.ToChatMessageContentItemCollection();
80+
return reasoningResponseItem.SummaryParts.ToChatMessageContentItemCollection();
8181
}
8282
else if (item is FunctionCallResponseItem functionCallResponseItem)
8383
{
@@ -195,12 +195,15 @@ private static ChatMessageContentItemCollection ToChatMessageContentItemCollecti
195195
return collection;
196196
}
197197

198-
private static ChatMessageContentItemCollection ToChatMessageContentItemCollection(this IReadOnlyList<string> texts)
198+
private static ChatMessageContentItemCollection ToChatMessageContentItemCollection(this IReadOnlyList<ReasoningSummaryPart> parts)
199199
{
200200
var collection = new ChatMessageContentItemCollection();
201-
foreach (var text in texts)
201+
foreach (var part in parts)
202202
{
203-
collection.Add(new TextContent(text, innerContent: null));
203+
if (part is ReasoningSummaryTextPart text)
204+
{
205+
collection.Add(new TextContent(text.Text, innerContent: text));
206+
}
204207
}
205208
return collection;
206209
}

dotnet/src/Agents/UnitTests/Extensions/ResponseItemExtensionsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void VerifyToChatMessageContentFromInputFile()
6666
{
6767
// Arrange
6868
var fileBytes = new ReadOnlyMemory<byte>([1, 2, 3, 4, 5]);
69-
IEnumerable<ResponseContentPart> contentParts = [ResponseContentPart.CreateInputFilePart("fileId", "fileName", new(fileBytes))];
69+
IEnumerable<ResponseContentPart> contentParts = [ResponseContentPart.CreateInputFilePart(BinaryData.FromBytes(fileBytes), "text/plain", "fileName")];
7070
MessageResponseItem responseItem = ResponseItem.CreateUserMessageItem(contentParts);
7171

7272
// Act
@@ -102,7 +102,7 @@ public void VerifyToChatMessageContentFromRefusal()
102102
public void VerifyToChatMessageContentFromReasoning()
103103
{
104104
// Arrange
105-
IEnumerable<string> summaryParts = ["Foo"];
105+
IEnumerable<ReasoningSummaryPart> summaryParts = [ReasoningSummaryPart.CreateTextPart("Foo")];
106106
ReasoningResponseItem responseItem = ResponseItem.CreateReasoningItem(summaryParts);
107107

108108
// Act

dotnet/src/Agents/UnitTests/OpenAI/Extensions/OpenAIResponseExtensionsTests.cs

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using System;
44
using System.Collections.Generic;
5+
using System.Linq;
56
using System.Reflection;
67
using Microsoft.SemanticKernel;
78
using Microsoft.SemanticKernel.Agents.OpenAI;
@@ -178,46 +179,71 @@ private OpenAIResponse CreateMockOpenAIResponse(string model, IEnumerable<Respon
178179
private OpenAIResponse CreateMockOpenAIResponse(string id, DateTimeOffset createdAt, ResponseError error, string instructions, string model, string previousResponseId, float temperature, IEnumerable<ResponseTool> tools, float topP, IDictionary<string, string> metadata, ResponseIncompleteStatusDetails incompleteStatusDetails, IEnumerable<ResponseItem> outputItems, bool parallelToolCallsEnabled, ResponseToolChoice toolChoice)
179180
{
180181
Type type = typeof(OpenAIResponse);
182+
var assembly = type.Assembly;
183+
var internalServiceTierType = assembly.GetType("OpenAI.Internal.InternalServiceTier");
184+
var nullableInternalServiceTierType = typeof(Nullable<>).MakeGenericType(internalServiceTierType!);
181185

182186
ConstructorInfo? constructor = type.GetConstructor(
183187
BindingFlags.Instance | BindingFlags.NonPublic,
184188
null,
185189
[
190+
typeof(IDictionary<string, string>),
191+
typeof(float?),
192+
typeof(float?),
193+
nullableInternalServiceTierType,
186194
typeof(string),
187-
typeof(DateTimeOffset),
188-
typeof(ResponseError),
195+
typeof(bool?),
189196
typeof(string),
197+
typeof(IList<ResponseTool>),
190198
typeof(string),
199+
typeof(ResponseStatus?),
200+
typeof(DateTimeOffset),
201+
typeof(ResponseError),
202+
typeof(ResponseTokenUsage),
191203
typeof(string),
192-
typeof(float),
193-
typeof(IEnumerable<ResponseTool>),
194-
typeof(float),
195-
typeof(IDictionary<string, string>),
204+
typeof(ResponseReasoningOptions),
205+
typeof(int?),
206+
typeof(ResponseTextOptions),
207+
typeof(ResponseTruncationMode?),
196208
typeof(ResponseIncompleteStatusDetails),
197-
typeof(IEnumerable<ResponseItem>),
209+
typeof(IList<ResponseItem>),
198210
typeof(bool),
199-
typeof(ResponseToolChoice)
211+
typeof(ResponseToolChoice),
212+
typeof(string),
213+
typeof(string),
214+
typeof(IDictionary<string, BinaryData>)
200215
],
201216
null);
202217

203218
if (constructor != null)
204219
{
205220
return (OpenAIResponse)constructor.Invoke(
206221
[
207-
id,
208-
createdAt,
209-
error,
210-
instructions,
211-
model,
212-
previousResponseId,
213-
temperature,
214-
tools,
215-
topP,
216222
metadata,
217-
incompleteStatusDetails,
218-
outputItems,
219-
parallelToolCallsEnabled,
220-
toolChoice
223+
(float?)temperature,
224+
(float?)topP,
225+
null, // serviceTier
226+
previousResponseId,
227+
null, // background
228+
instructions,
229+
tools.ToList(),
230+
id,
231+
null, // status
232+
createdAt,
233+
error,
234+
null, // usage
235+
null, // endUserId
236+
null, // reasoningOptions
237+
null, // maxOutputTokenCount
238+
null, // textOptions
239+
null, // truncationMode
240+
incompleteStatusDetails,
241+
outputItems.ToList(),
242+
parallelToolCallsEnabled,
243+
toolChoice,
244+
model,
245+
"response",
246+
null // additionalBinaryDataProperties
221247
]
222248
);
223249
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy