Skip to content

Commit

Permalink
Merge pull request #1743 from solliancenet/cj-fix-external-orchestrat…
Browse files Browse the repository at this point in the history
…ion-082

(0.8.2) Fix external orchestration selection bug
  • Loading branch information
joelhulen authored Sep 18, 2024
2 parents 47123af + ef3b5c0 commit 7a1bf19
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System.Text.Json;

namespace FoundationaLLM.Orchestration.Core.Services
{
Expand Down Expand Up @@ -67,9 +68,9 @@ private async Task Initialize()
_externalOrchestrationServiceNames = apiEndpointConfigurations
.Where(aec => aec.Category == APIEndpointCategory.ExternalOrchestration
&& aec.AuthenticationParameters.TryGetValue(AuthenticationParametersKeys.APIKeyConfigurationName, out var apiKeyConfigObj)
&& apiKeyConfigObj is string apiKeyConfig
&& !string.IsNullOrWhiteSpace(apiKeyConfig)
&& apiKeyConfig.StartsWith(AppConfigurationKeySections.FoundationaLLM_APIEndpoints))
&& apiKeyConfigObj is JsonElement apiKeyConfig
&& !string.IsNullOrWhiteSpace(apiKeyConfig.GetString())
&& apiKeyConfig.GetString()!.StartsWith(AppConfigurationKeySections.FoundationaLLM_APIEndpoints))
.Select(aec => aec.Name)
.ToList();

Expand Down

0 comments on commit 7a1bf19

Please sign in to comment.