Skip to content

Commit 0c1529a

Browse files
authored
Revert "Fix membase json"
1 parent 9bc6ebc commit 0c1529a

3 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/Plugins/BotSharp.Plugin.Membase/Interfaces/IMembaseApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public interface IMembaseApi
6060
Task<PgtValidationResponse> ValidatePgtDefinitionAsync(string graphId, string definitionId, [Body] PgtValidationRequest request);
6161

6262
[Post("/graph/{graphId}/pgt-external/{correlationId}/complete")]
63-
Task<PgtExternalCompleteResponse> CompletePgtExternalAsync(string graphId, string correlationId, [FromBody] object body);
63+
Task<PgtExternalCompleteResponse> CompletePgtExternalAsync(string graphId, string correlationId, [FromBody] object emptyBody);
6464
#endregion
6565

6666
#region Procedure

src/Plugins/BotSharp.Plugin.Membase/MembasePlugin.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ public void RegisterDI(IServiceCollection services, IConfiguration config)
2626

2727
services.AddHttpContextAccessor();
2828
services.AddTransient<MembaseAuthHandler>();
29-
// Use plain Web options WITHOUT Refit's default ObjectToInferredTypesConverter:
30-
// consumers (ObjectExtensions.TryGetValue<JsonElement>, GraphBuilder, GetNodePropertiesOrDefault)
31-
// rely on Dictionary<string, object?> values deserializing as JsonElement.
32-
services.AddRefitClient<IMembaseApi>(new RefitSettings(
33-
new SystemTextJsonContentSerializer(new JsonSerializerOptions(JsonSerializerDefaults.Web)))
29+
services.AddRefitClient<IMembaseApi>(new RefitSettings
3430
{
3531
CollectionFormat = CollectionFormat.Multi
3632
})

src/Plugins/BotSharp.Plugin.OpenAI/Providers/ProviderHelper.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ public static OpenAIClient GetClient(string provider, string model, string? apiK
99
{
1010
var settingsService = services.GetRequiredService<ILlmProviderService>();
1111
var settings = settingsService.GetSetting(provider, model);
12-
if (settings == null && string.IsNullOrEmpty(apiKey))
13-
{
14-
throw new InvalidOperationException($"No LLM model settings found for '{provider}.{model}'. Register the model under LlmProviders (appsettings/user secrets) or pass an api key.");
15-
}
1612
var options = !string.IsNullOrEmpty(settings?.Endpoint) ?
1713
new OpenAIClientOptions { Endpoint = new Uri(settings.Endpoint) } : null;
1814
return new OpenAIClient(new ApiKeyCredential(apiKey ?? settings!.ApiKey), options);

0 commit comments

Comments
 (0)