Skip to content

Commit

Permalink
Update README.md (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeaugrand authored Mar 7, 2024
1 parent f355a39 commit 3a6202c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@ dotnet add package SemanticKernel.Connectors.Memory.SqlServer
To add your SQL Server memory connector, add the following statements to your kernel initialization code:

```csharp
using SemanticKernel.Connectors.Memory.SqlServer;
...
var kernel = Kernel.Builder
...
.WithMemoryStorage(await SqlServerMemoryStore.ConnectAsync(connectionString: "Server=.;Database=SK;Trusted_Connection=True;"))
...
.Build();
using SemanticKernel.Connectors.Memory.SqlServer;

var kernel = Kernel.CreateBuilder()
.Build();

var sqlMemoryStore = await SqlServerMemoryStore.ConnectAsync(connectionString: "Server=.;Database=SK;Trusted_Connection=True;");
var semanticTextMemory = new SemanticTextMemory(sqlMemoryStore, kernel.GetRequiredService<ITextEmbeddingGenerationService>());

kernel.ImportPluginFromObject(new TextMemoryPlugin(semanticTextMemory));

```

The memory store will populate all the needed tables during startup and let you focus on the development of your plugin.
Expand Down

0 comments on commit 3a6202c

Please sign in to comment.