microsoft / semantic-kernel

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

custom local connector VTable setup of type OnnxRuntimeGenAIChatCompletionService failed to load #6126

Closed PrestigeDevop closed 2 weeks ago

PrestigeDevop commented 4 months ago

Describe the bug

A clear and concise description of what the bug is.

in 2.1 standard apps ( that doesn't use .net 8 ) to be exact (Unity engine)

TypeLoadException: VTable setup of type unity.SemanticKernel.Connectors.OnnxRuntimeGenAI.OnnxRuntimeGenAIChatCompletionService failed

however I manged to inference directly using onnxGenAI manged library . but when using semantic kernel I got this error and no luck with assembly .load dynamically or using assembly definition.

To Reproduce Steps to reproduce the behavior:

  1. I modify https://github.com/feiyun0112/SemanticKernel.Connectors.OnnxRuntimeGenAI a little bit .
  2. compile the dlls , and put it into unity asset folder .
  3. error occur .

    this probably due to the compiler having some issue loading the dll at runtime ? or perhaps because my edits ...

Additional context

after some adjustment trying and exporting again .. I got this

InvalidOperationException: Build is not permitted on instances returned from AddKernel. Resolve the Kernel from the service provider Microsoft.SemanticKernel.KernelExtensions.Build

I think I couldn't load it natively without any edits and I'm not expert in the scaffold process , so I hope someone have some ideas about this message .

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.