Skip to content

Adapts to SK Kernel Memory #226

Merged
SanftMonster merged 11 commits intoSciSharp:masterfrom
xbotter:kernel-memory
Nov 4, 2023
Merged

Adapts to SK Kernel Memory #226
SanftMonster merged 11 commits intoSciSharp:masterfrom
xbotter:kernel-memory

Conversation

@xbotter
Copy link
Copy Markdown
Collaborator

@xbotter xbotter commented Oct 30, 2023

Adapts to SK Kernel Memory (Semantic Memory)
closes #200

Add the LLamaSharp.KernelMemory project to the solution. This project includes classes for text embedding generation and text generation using the LLamaSharp library.
Added a project reference to LLama.KernelMemory  in the LLama.Examples.csproj file.

🔧 Add KernelMemory class and update TestRunner

Added a new class KernelMemory to the LLama.Examples.NewVersion namespace, which includes a Run method that demonstrates the usage of Semantic Kernel Memory. The class imports a sample PDF document and asks a question to the memory, displaying the answer and relevant sources.

Updated the TestRunner class in the same namespace to include an option (choice 15) to run the KernelMemory example.

🔧 Fix typo in LLamaSharpTextEmbeddingGeneration class

Fixed a typo in the LLamaSharpTextEmbeddingGeneration class where the LlamaSharpConfig variable was incorrectly named as LlamaSharpConfig.

Added XML documentation for the LLamaSharpTextEmbeddingGeneration constructor, Dispose method, and GenerateEmbeddingsAsync method.

Summary:
- Added project reference to LLama.KernelMemory and LLama.SemanticKernel in LLama.Examples.csproj
- Added KernelMemory class to demonstrate Semantic Kernel Memory usage
- Updated TestRunner class to include option for running KernelMemory example
- Fixed typo in LLamaSharpTextEmbeddingGeneration class
- Added XML documentation for constructor, Dispose method, and GenerateEmbeddingsAsync method in LLamaSharpTextEmbeddingGeneration class
@SanftMonster SanftMonster added the enhancement New feature or request label Oct 30, 2023
@SanftMonster
Copy link
Copy Markdown
Collaborator

Thank you for the contribution! The example enables the document search for LLamaSharp, which is a great work. Would you like to further add the example to LLamaSharp.Web? I think adding a button which allows users to specify a document as memory will be great. (please take it easy, this is not a required item for this PR)

@xbotter
Copy link
Copy Markdown
Collaborator Author

xbotter commented Nov 1, 2023

Thank you for the contribution! The example enables the document search for LLamaSharp, which is a great work. Would you like to further add the example to LLamaSharp.Web? I think adding a button which allows users to specify a document as memory will be great. (please take it easy, this is not a required item for this PR)

There are still some adjustments needed for the current adaptation work. After it is completed, I will try to add an example.

@xbotter xbotter marked this pull request as ready for review November 2, 2023 06:05
@SanftMonster
Copy link
Copy Markdown
Collaborator

LGTM, thank you for the contribution!

@SanftMonster SanftMonster merged commit c933a71 into SciSharp:master Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapts to SK Kernel Memory

2 participants