Browse Source

update package to KernelMemory

tags/v0.8.0
xbotter 2 years ago
parent
commit
3de9d34093
No known key found for this signature in database GPG Key ID: A3F32F44E9F160E1
4 changed files with 10 additions and 10 deletions
  1. +4
    -4
      LLama.Examples/NewVersion/KernelMemory.cs
  2. +4
    -4
      LLama.KernelMemory/BuilderExtensions.cs
  3. +1
    -1
      LLama.KernelMemory/LLamaSharp.KernelMemory.csproj
  4. +1
    -1
      LLama.KernelMemory/LlamaSharpTextGeneration.cs

+ 4
- 4
LLama.Examples/NewVersion/KernelMemory.cs View File

@@ -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
{
@@ -16,7 +16,7 @@ namespace LLama.Examples.NewVersion
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
{


+ 4
- 4
LLama.KernelMemory/BuilderExtensions.cs View File

@@ -1,4 +1,4 @@
using Microsoft.SemanticMemory;
using Microsoft.KernelMemory;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -18,7 +18,7 @@ namespace LLamaSharp.KernelMemory
/// <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;
@@ -30,7 +30,7 @@ namespace LLamaSharp.KernelMemory
/// <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;
@@ -42,7 +42,7 @@ namespace LLamaSharp.KernelMemory
/// <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);


+ 1
- 1
LLama.KernelMemory/LLamaSharp.KernelMemory.csproj View File

@@ -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>


+ 1
- 1
LLama.KernelMemory/LlamaSharpTextGeneration.cs View File

@@ -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;


Loading…
Cancel
Save