- Refactored the chat completion implementation in `LLamaSharpChatCompletion.cs` to use `StatelessExecutor` instead of `InteractiveExecutor`.
- Updated the chat history prompt in `LLamaSharpChatCompletion.cs` to include a conversation between the assistant and the user.
- Modified the `HistoryTransform` class in `HistoryTransform.cs` to append the assistant role to the chat history prompt.
- Updated the constructor of `LLamaSharpChatCompletion` to accept optional parameters for `historyTransform` and `outputTransform`.
- Modified the `GetChatCompletionsAsync` and `GetChatCompletions` methods in `LLamaSharpChatCompletion.cs` to use the new `StatelessExecutor` and `outputTransform`.
- Updated the `ExtensionMethods.cs` file to include the assistant and system roles in the list of anti-prompts.
- Renamed files and updated namespaces in Examples folder.
- Moved files from NewVersion folder to Examples folder.
- Removed TestRunner.cs file.
- Updated Runner.cs to include new examples.
- Update Program.cs to use the new Runner class instead of NewVersionTestRunner
- Update LLama.Examples namespace in Program.cs
- Update await NewVersionTestRunner.Run() in Program.cs to await Runner.Run()
- using `Lazy<T>` to initialize it automatically.
- Added in `AVX512` support for all dotnet versions (but not autodetected).
- Added in AVX version auto detection.
- Handle invalid choice in Examples.TryGetValue
- Add exit condition for choice "Exit"
- Display a rule before executing example
- Clear console after each iteration
📝 This change refactors the TestRunner.cs file. It handles invalid choices in Examples.TryGetValue, adds an exit condition for the choice "Exit", displays a rule before executing an example, and clears the console after each iteration.
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