microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
22.14k stars 3.31k forks source link

.Net: Bug: Blazor WASM not supported from Microsoft.SemanticKernel.PromptTemplates.Handlebars from version >= 1.16 #9830

Open antonio8101 opened 4 days ago

antonio8101 commented 4 days ago

Describe the bug

Microsoft.SemanticKernel.PromptTemplates.Handlebars which depends on uses Handlebars.Net.Helpers, does not support anymore the Blazor WASN projects. This is because from version 2.4.5 it starts to use using System.Diagnostics in file HandlebarsHelpers in the method Register.

Process.GetCurrentProcess().MainModule?.FileName

System.Diagnostics is not supported for this platform.

Please do downgrade to version < 2.4.5 if it is possible, and wait for them to fix the issue (open the issue also in their project).

To Reproduce Steps to reproduce the behavior:

To Reproduce Steps to reproduce the behavior:

  1. Create a new Blazor application with WebAssembly as Interactive Render Mode
  2. Install Semantic Kernel and Microsoft.SemanticKernel with a version 1.30,0
  3. Install Semantic Kernel Handlebars with version greater than 1.16
  4. Whenever you execute a Kernel function having a prompt with handlebar format

Expected behavior Prompt should be sent to the LLM model

Platform

evchaki commented 4 days ago

@luisquintanilla - can you take a look at this and see what we can do with the Blazer team.

@antonio8101 - can you log an issue with Blazer on their GitHub to support this again.

antonio8101 commented 2 days ago

It seems the problem was solved in Handlebars project, please update to the latest build from it. So that I can jump to the version which contains this fix.

Thanks!