diff --git a/OpenAI-DotNet-Proxy/OpenAI-DotNet-Proxy.csproj b/OpenAI-DotNet-Proxy/OpenAI-DotNet-Proxy.csproj
index f245fb9e..bef4ab03 100644
--- a/OpenAI-DotNet-Proxy/OpenAI-DotNet-Proxy.csproj
+++ b/OpenAI-DotNet-Proxy/OpenAI-DotNet-Proxy.csproj
@@ -22,8 +22,10 @@
true
false
false
- 8.8.2
+ 8.8.6
+Version 8.8.6
+- Fix unimplemented routePrefix in OpenAIProxyStartup.CreateWebApplication
Version 8.8.2
- Updated forwarded request headers
Version 8.8.0
diff --git a/OpenAI-DotNet-Proxy/Proxy/OpenAIProxy.cs b/OpenAI-DotNet-Proxy/Proxy/OpenAIProxy.cs
index 1b31ff24..84f35faf 100644
--- a/OpenAI-DotNet-Proxy/Proxy/OpenAIProxy.cs
+++ b/OpenAI-DotNet-Proxy/Proxy/OpenAIProxy.cs
@@ -17,6 +17,7 @@ namespace OpenAI.Proxy
///
public class OpenAIProxy
{
+ private string routePrefix = "";
private OpenAIClient openAIClient;
private IAuthenticationFilter authenticationFilter;
@@ -46,7 +47,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/health", HealthEndpoint);
- endpoints.MapOpenAIEndpoints(openAIClient, authenticationFilter);
+ endpoints.MapOpenAIEndpoints(openAIClient, authenticationFilter, routePrefix);
});
}
@@ -92,7 +93,10 @@ public static WebApplication CreateWebApplication(string[] args, OpenAIClient
builder.Services.AddSingleton(openAIClient);
builder.Services.AddSingleton();
var app = builder.Build();
- var startup = new OpenAIProxy();
+ var startup = new OpenAIProxy
+ {
+ routePrefix = routePrefix
+ };
startup.Configure(app, app.Environment);
return app;
}
diff --git a/OpenAI-DotNet-Tests-Proxy/Program.cs b/OpenAI-DotNet-Tests-Proxy/Program.cs
index 5e80fffe..45eb1359 100644
--- a/OpenAI-DotNet-Tests-Proxy/Program.cs
+++ b/OpenAI-DotNet-Tests-Proxy/Program.cs
@@ -15,6 +15,7 @@ public partial class Program
{
private const string TestUserToken = "aAbBcCdDeE123456789";
+ // ReSharper disable once ClassNeverInstantiated.Local
private class AuthenticationFilter : AbstractAuthenticationFilter
{
///
diff --git a/OpenAI-DotNet-Tests/TestFixture_13_Realtime.cs b/OpenAI-DotNet-Tests/TestFixture_13_Realtime.cs
index 00139924..1aeed259 100644
--- a/OpenAI-DotNet-Tests/TestFixture_13_Realtime.cs
+++ b/OpenAI-DotNet-Tests/TestFixture_13_Realtime.cs
@@ -59,6 +59,7 @@ public async Task Test_01_01_RealtimeSession()
await session.SendAsync(new ConversationItemCreateRequest("Hello!"), cts.Token);
await session.SendAsync(new CreateResponseRequest(), cts.Token);
await session.SendAsync(new InputAudioBufferAppendRequest(new ReadOnlyMemory(new byte[1024 * 4])), cts.Token);
+ await session.SendAsync(new UpdateSessionRequest(new SessionConfiguration(model: Model.Transcribe_GPT_4o_Mini, instructions: "You are a fearsome dinosaur. Rawr!", tools: tools)), cts.Token);
await session.SendAsync(new ConversationItemCreateRequest("Goodbye!"), cts.Token);
await session.SendAsync(new CreateResponseRequest(), cts.Token);
diff --git a/OpenAI-DotNet/OpenAI-DotNet.csproj b/OpenAI-DotNet/OpenAI-DotNet.csproj
index 235e3f0e..1b5e1624 100644
--- a/OpenAI-DotNet/OpenAI-DotNet.csproj
+++ b/OpenAI-DotNet/OpenAI-DotNet.csproj
@@ -29,8 +29,10 @@ More context [on Roger Pincombe's blog](https://rogerpincombe.com/openai-dotnet-
OpenAI-DotNet.pfx
true
true
- 8.8.4
+ 8.8.6
+Version 8.8.6
+- Fix Realtime.UpdateSessionRequests failing to update session due to extra client secret data
Version 8.8.4
- Fix RealtimeSessionConfiguration and CreateResponseRequest model parameter overriding prompt settings
- Fix Threads.MessageResponse.Status not being properly set to Completed
diff --git a/OpenAI-DotNet/OpenAIClient.cs b/OpenAI-DotNet/OpenAIClient.cs
index cf576eb1..499c64e2 100644
--- a/OpenAI-DotNet/OpenAIClient.cs
+++ b/OpenAI-DotNet/OpenAIClient.cs
@@ -118,6 +118,7 @@ private void Dispose(bool disposing)
internal static JsonSerializerOptions JsonSerializationOptions { get; } = new()
{
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
+ ReferenceHandler = ReferenceHandler.IgnoreCycles,
Converters =
{
new JsonStringEnumConverterFactory(),
@@ -129,7 +130,6 @@ private void Dispose(bool disposing)
new FilterConverter(),
new ToolConverter(),
},
- ReferenceHandler = ReferenceHandler.IgnoreCycles
};
///
diff --git a/OpenAI-DotNet/Realtime/SessionConfiguration.cs b/OpenAI-DotNet/Realtime/SessionConfiguration.cs
index 3e76bb53..8608938e 100644
--- a/OpenAI-DotNet/Realtime/SessionConfiguration.cs
+++ b/OpenAI-DotNet/Realtime/SessionConfiguration.cs
@@ -180,7 +180,7 @@ internal SessionConfiguration(
[JsonInclude]
[JsonPropertyName("client_secret")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- public ClientSecret ClientSecret { get; private set; }
+ public ClientSecret ClientSecret { get; internal set; }
///
/// The set of modalities the model can respond with.
diff --git a/OpenAI-DotNet/Realtime/UpdateSessionRequest.cs b/OpenAI-DotNet/Realtime/UpdateSessionRequest.cs
index 72c89cf7..8bd0740b 100644
--- a/OpenAI-DotNet/Realtime/UpdateSessionRequest.cs
+++ b/OpenAI-DotNet/Realtime/UpdateSessionRequest.cs
@@ -19,6 +19,7 @@ public UpdateSessionRequest() { }
public UpdateSessionRequest(SessionConfiguration configuration)
{
Configuration = configuration;
+ Configuration.ClientSecret = null;
}
///