Skip to content

Commit

Permalink
update package to KernelMemory
Browse files Browse the repository at this point in the history
  • Loading branch information
xbotter committed Oct 30, 2023
1 parent a49438e commit 3de9d34
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions LLama.Examples/NewVersion/KernelMemory.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Microsoft.SemanticMemory.Handlers;
using Microsoft.SemanticMemory;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LLamaSharp.KernelMemory;
using Microsoft.KernelMemory;
using Microsoft.KernelMemory.Handlers;

namespace LLama.Examples.NewVersion
{
Expand All @@ -16,7 +16,7 @@ public static async Task Run()
Console.WriteLine("Example from: https://github.com/microsoft/kernel-memory/blob/main/examples/101-using-core-nuget/Program.cs");
Console.Write("Please input your model path: ");
var modelPath = Console.ReadLine();
var memory = new MemoryClientBuilder()
var memory = new KernelMemoryBuilder()
.WithLLamaSharpDefaults(new LLamaSharpConfig(modelPath))
.With(new TextPartitioningOptions
{
Expand Down
8 changes: 4 additions & 4 deletions LLama.KernelMemory/BuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.SemanticMemory;
using Microsoft.KernelMemory;
using System;
using System.Collections.Generic;
using System.Linq;
Expand All @@ -18,7 +18,7 @@ public static class BuilderExtensions
/// <param name="builder">The MemoryClientBuilder instance.</param>
/// <param name="config">The LLamaSharpConfig instance.</param>
/// <returns>The MemoryClientBuilder instance with LLamaSharpTextEmbeddingGeneration added.</returns>
public static MemoryClientBuilder WithLLamaSharpTextEmbeddingGeneration(this MemoryClientBuilder builder, LLamaSharpConfig config)
public static KernelMemoryBuilder WithLLamaSharpTextEmbeddingGeneration(this KernelMemoryBuilder builder, LLamaSharpConfig config)
{
builder.WithCustomEmbeddingGeneration(new LLamaSharpTextEmbeddingGeneration(config));
return builder;
Expand All @@ -30,7 +30,7 @@ public static MemoryClientBuilder WithLLamaSharpTextEmbeddingGeneration(this Mem
/// <param name="builder">The MemoryClientBuilder instance.</param>
/// <param name="config">The LLamaSharpConfig instance.</param>
/// <returns>The MemoryClientBuilder instance with LLamaSharpTextGeneration added.</returns>
public static MemoryClientBuilder WithLLamaSharpTextGeneration(this MemoryClientBuilder builder, LLamaSharpConfig config)
public static KernelMemoryBuilder WithLLamaSharpTextGeneration(this KernelMemoryBuilder builder, LLamaSharpConfig config)
{
builder.WithCustomTextGeneration(new LlamaSharpTextGeneration(config));
return builder;
Expand All @@ -42,7 +42,7 @@ public static MemoryClientBuilder WithLLamaSharpTextGeneration(this MemoryClient
/// <param name="builder">The MemoryClientBuilder instance.</param>
/// <param name="config">The LLamaSharpConfig instance.</param>
/// <returns>The MemoryClientBuilder instance with LLamaSharpTextEmbeddingGeneration and LLamaSharpTextGeneration added.</returns>
public static MemoryClientBuilder WithLLamaSharpDefaults(this MemoryClientBuilder builder, LLamaSharpConfig config)
public static KernelMemoryBuilder WithLLamaSharpDefaults(this KernelMemoryBuilder builder, LLamaSharpConfig config)
{
builder.WithLLamaSharpTextEmbeddingGeneration(config);
builder.WithLLamaSharpTextGeneration(config);
Expand Down
2 changes: 1 addition & 1 deletion LLama.KernelMemory/LLamaSharp.KernelMemory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SemanticMemory.Core" Version="0.4.231023.1-preview" />
<PackageReference Include="Microsoft.KernelMemory.Core" Version="0.5.231030.1-preview" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion LLama.KernelMemory/LlamaSharpTextGeneration.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using LLama;
using LLama.Common;
using Microsoft.SemanticMemory.AI;
using Microsoft.KernelMemory.AI;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down

0 comments on commit 3de9d34

Please sign in to comment.