Skip to content

Commit

Permalink
Remove additional default credential calls
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhulen committed Feb 27, 2024
1 parent 806d9b7 commit 34a80c1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ namespace FoundationaLLM.Common.Services.Azure
/// <summary>
/// Provides services to interact with the Azure Resource Manager (ARM) infrastructure.
/// </summary>
/// <param name="environment">The <see cref="IHostEnvironment"/> providing details about the environment.</param>
/// <param name="logger">The logger used for logging.</param>
public class AzureResourceManagerService(
IHostEnvironment environment,
ILogger<AzureResourceManagerService> logger) : IAzureResourceManagerService
{
private readonly ArmClient _armClient = new(DefaultAuthentication.GetAzureCredential());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ namespace FoundationaLLM.Vectorization.Services.ContentSources
/// </remarks>
/// <param name="vectorizationResourceProviderService">The vectorization resource provider service.</param>
/// <param name="configuration">The global configuration provider.</param>
/// <param name="environment">The hosting environment.</param>
/// <param name="loggerFactory">The logger factory used to create loggers.</param>
public class ContentSourceServiceFactory(
[FromKeyedServices(DependencyInjectionKeys.FoundationaLLM_ResourceProvider_Vectorization)] IResourceProviderService vectorizationResourceProviderService,
IConfiguration configuration,
IHostEnvironment environment,
ILoggerFactory loggerFactory) : IVectorizationServiceFactory<IContentSourceService>
{
private readonly IResourceProviderService _vectorizationResourceProviderService = vectorizationResourceProviderService;
private readonly IConfiguration _configuration = configuration;
private readonly IHostEnvironment _environment = environment;
private readonly ILoggerFactory _loggerFactory = loggerFactory;

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Azure.Search.Documents.Indexes.Models;
using SemanticKernel.Tests.Models;
using FoundationaLLM.Common.Models.TextEmbedding;
using FoundationaLLM.Common.Authentication;

namespace FoundationaLLM.SemanticKernel.Tests.Services
{
Expand All @@ -23,7 +24,7 @@ public AzureAISearchIndexingServiceTests()
var endpoint = Environment.GetEnvironmentVariable("AzureAISearchIndexingServiceTestsSearchEndpoint") ?? "";
_searchIndexClient = new SearchIndexClient(
new Uri(endpoint),
new DefaultAzureCredential()
DefaultAuthentication.GetAzureCredential()
);
_indexingService = new AzureAISearchIndexingService(
Options.Create(
Expand Down

0 comments on commit 34a80c1

Please sign in to comment.