From cdd5d536e9329247647f46c080437ae0ae8284cf Mon Sep 17 00:00:00 2001 From: Govind Kamtamneni Date: Mon, 6 Nov 2023 08:07:27 -0800 Subject: [PATCH] fix plugins folder case --- .../dotnet/Controllers/AssetsController.cs | 4 ++-- .../dotnet/Controllers/InvestmentsController.cs | 4 ++-- services/recommendation-service/dotnet/Utils/RepoUtils.cs | 4 ++-- .../recommendation-service/dotnet/appsettings.json.example | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/services/recommendation-service/dotnet/Controllers/AssetsController.cs b/services/recommendation-service/dotnet/Controllers/AssetsController.cs index 8f26fa25..3b655ace 100644 --- a/services/recommendation-service/dotnet/Controllers/AssetsController.cs +++ b/services/recommendation-service/dotnet/Controllers/AssetsController.cs @@ -45,7 +45,7 @@ public async Task GetRecommendations([FromBody] MiyagiContext miy sw.Start(); // ========= Import semantic functions as plugins ========= log.LogDebug("Path: {S}", Directory.GetCurrentDirectory()); - var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "plugins"); + var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Plugins"); var advisorPlugin = _kernel.ImportSemanticFunctionsFromDirectory(pluginsDirectory, "AdvisorPlugin"); // ========= Import native function ========= @@ -95,7 +95,7 @@ public async Task GetRecommendations([FromBody] MiyagiContext miy public async Task GetRecommendationsRunAsync([FromBody] MiyagiContext miyagiContext) { // ========= Import semantic functions as plugins ========= - var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "plugins"); + var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Plugins"); var advisorPlugin = _kernel.ImportSemanticFunctionsFromDirectory(pluginsDirectory, "AdvisorPlugin"); // ========= Import native function ========= diff --git a/services/recommendation-service/dotnet/Controllers/InvestmentsController.cs b/services/recommendation-service/dotnet/Controllers/InvestmentsController.cs index aaeb83b4..8d9695be 100644 --- a/services/recommendation-service/dotnet/Controllers/InvestmentsController.cs +++ b/services/recommendation-service/dotnet/Controllers/InvestmentsController.cs @@ -44,7 +44,7 @@ public async Task GetRecommendationsWithPlanner([FromBody] Miyagi log.BeginScope("InvestmentController.GetRecommendationsAsync"); // ========= Import Advisor skill from local filesystem ========= log.LogDebug("Path: {P}", Directory.GetCurrentDirectory()); - var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "plugins"); + var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Plugins"); _kernel.ImportSemanticFunctionsFromDirectory(pluginsDirectory, "AdvisorPlugin"); _kernel.ImportFunctions(new UserProfilePlugin(), "UserProfilePlugin"); var memoryCollection = _kernelSettings.CollectionName; @@ -105,7 +105,7 @@ public async Task GetRecommendations([FromBody] MiyagiContext miy log.BeginScope("InvestmentController.GetRecommendationsAsync"); // ========= Import Advisor skill from local filesystem ========= log.LogDebug("Path: {P}", Directory.GetCurrentDirectory()); - var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "plugins"); + var pluginsDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Plugins"); var advisorPlugin = _kernel.ImportSemanticFunctionsFromDirectory(pluginsDirectory, "AdvisorPlugin"); var userProfilePlugin = _kernel.ImportFunctions(new UserProfilePlugin(), "UserProfilePlugin"); var memoryCollection = _kernelSettings.CollectionName; diff --git a/services/recommendation-service/dotnet/Utils/RepoUtils.cs b/services/recommendation-service/dotnet/Utils/RepoUtils.cs index 4615aff4..b1b1cadc 100644 --- a/services/recommendation-service/dotnet/Utils/RepoUtils.cs +++ b/services/recommendation-service/dotnet/Utils/RepoUtils.cs @@ -9,13 +9,13 @@ namespace GBB.Miyagi.RecommendationService.Utils; public static class RepoUtils { /// - /// Scan the local folders from the repo, looking for "plugins" folder. + /// Scan the local folders from the repo, looking for "Plugins" folder. /// /// The full path to samples/skills public static string GetSamplePluginsPath() { const string Parent = ""; - const string Folder = "plugins"; + const string Folder = "Plugins"; bool SearchPath(string pathToFind, out string result, int maxAttempts = 10) { diff --git a/services/recommendation-service/dotnet/appsettings.json.example b/services/recommendation-service/dotnet/appsettings.json.example index 77834eec..0738c0bb 100644 --- a/services/recommendation-service/dotnet/appsettings.json.example +++ b/services/recommendation-service/dotnet/appsettings.json.example @@ -18,6 +18,6 @@ "collectionName": "miyagi-embeddings", "bingApiKey": "", "cosmosDbContainerName": "recommendations", - "comosDbConnectionString": "", + "cosmosDbConnectionString": "", "logLevel": "Trace" } \ No newline at end of file