Open RogerBarreto opened 4 months ago
Currently this cannot be until AnyKey
is backported to .Net 8
or we move to .Net 9
.
Detailed below:
The recommended approach for this scenario is to build the Kernel from KernelBuilder
and it will work for keyed services.
Describe the bug When using
IServiceCollection.AddKernel
and all connectors are key based (using ServiceId), is not possible to callkernel.InvokePromptAsync
without specifying a serviceId in the configuration.To Reproduce
Expected behavior The last registered service in the builder that matches any of the
ITextGenerationService
orIChatCompletionService
interfaces is used similar tovar kernel = builder.Build()
.