Skip to content

Commit

Permalink
Merge pull request #172 from Azure-Samples/gk/fix-memory-collection-env
Browse files Browse the repository at this point in the history
  • Loading branch information
thegovind authored Nov 3, 2023
2 parents 0adbc09 + 16bd286 commit 3c7d4dd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using Azure.Storage.Blobs;
using GBB.Miyagi.RecommendationService.config;
using GBB.Miyagi.RecommendationService.Models;
using GBB.Miyagi.RecommendationService.Utils;
using Microsoft.AspNetCore.Mvc;
using Microsoft.SemanticKernel.Memory;
using Microsoft.SemanticKernel.Text;
using ConsoleLogger = GBB.Miyagi.RecommendationService.Utils.ConsoleLogger;

namespace GBB.Miyagi.RecommendationService.Controllers;

Expand All @@ -18,6 +19,7 @@ public class MemoryController : ControllerBase
private const int MaxTokensPerLine = 60;
private readonly BlobServiceClient _blobServiceClient;
private readonly ISemanticTextMemory _memory;
private readonly KernelSettings _kernelSettings = KernelSettings.LoadSettings();

public MemoryController(ISemanticTextMemory memory, BlobServiceClient blobServiceClient)
{
Expand Down Expand Up @@ -78,7 +80,7 @@ public async Task<IActionResult> SaveDatasetAsync([FromBody] DatasetInfo dataset
}

// Chunk, generate embeddings, and persist to vectordb
var memoryCollectionName = Env.Var("MEMORY_COLLECTION");
var memoryCollectionName = _kernelSettings.CollectionName;
log.LogInformation("Saving dataset {DataSetName} to memory collection {MemoryCollectionName}",
datasetInfo.DataSetName, memoryCollectionName);

Expand Down

0 comments on commit 3c7d4dd

Please # to comment.