Skip to content

Commit

Permalink
fix: Fixed issue with OpenAI after update.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Sep 3, 2024
1 parent 69e1cd1 commit 8c5763a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Serve/OpenAI/ServeController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public ModelsList GetModel()
Models = options.ListModels().Select(static x => new Model12
{
Object = ModelObject.Model,
Created = 0,
Created = DateTimeOffset.UtcNow,
Id = x,
OwnedBy = "OpenAI",
}).ToList()
Expand All @@ -27,7 +27,7 @@ public ModelsList ListModels()
Models = options.ListModels().Select(static x => new Model12
{
Object = ModelObject.Model,
Created = 0,
Created = DateTimeOffset.UtcNow,
Id = x,
OwnedBy = "OpenAI",
}).ToList()
Expand Down
2 changes: 1 addition & 1 deletion src/Serve/OpenAI/ServeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static WebApplication UseLangChainServeOpenAi(this WebApplication app, Ac
return Results.Ok(new CreateChatCompletionResponse
{
Id = Guid.NewGuid().ToString(),
Created = 0,
Created = DateTimeOffset.UtcNow,
Model = request.Model.Value1 ?? request.Model.Value2?.ToValueString() ?? string.Empty,
Object = CreateChatCompletionResponseObject.ChatCompletion,
Choices =
Expand Down

0 comments on commit 8c5763a

Please sign in to comment.