microsoft/kernel-memory

[Bug] Custom TextGenerator is broken with DI issue with .38. Works fine with .37

JohnGalt1717 opened this issue · 1 comments

Context / Scenario

I have a custom TextGenerator that has a parameter that has a value injected into the constructor.

Here's my embedder:

var embedder = sp.GetRequiredService<ISFRLLamaClient>();

This isn't null and is correct.

Then I do this:

builder.WithCustomTextGenerator(new ServerLLamaTextGenerator(embedder));

Then after all of that I have a memoryBuilder.

But if I call memberBuilder.Build().

It errors telling me that it couldn't inject the embedder above despite the fact that I registered it myself.

This doesn't happen with .37

What happened?

Crash on DI injection

Importance

I cannot use Kernel Memory

Platform, Language, Versions

.net 8, C#, .38.xxxx

Relevant log output

N/A.
dluc commented

looks like a regression introduced by #424, fixed in #433