Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapts to SK Kernel Memory #226

Merged
merged 11 commits into from
Nov 4, 2023
Merged

Conversation

xbotter
Copy link
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
@AsakusaRinne AsakusaRinne added the enhancement New feature or request label Oct 30, 2023
@AsakusaRinne
Copy link
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
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.

@AsakusaRinne
Copy link
Collaborator

LGTM, thank you for the contribution!

@AsakusaRinne AsakusaRinne merged commit c933a71 into SciSharp:master Nov 4, 2023
4 checks passed
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