Closed Alerinos closed 1 year ago
With PR #2013 , AddOpenAITextCompletionService
is no longer available, so this issue is not relevant anymore. Now the approach would be:
.WithOpenAITextCompletionService("text-davinci-003", "xxx")
.WithOpenAITextEmbeddingGenerationService("text-embedding-ada-002", "xxx")
Leaving out the text embedding service gives a clearer error message now:
Service not found: Service of type Microsoft.SemanticKernel.AI.Embeddings.ITextEmbeddingGeneration and name <NONE> not registered.
Thanks for informing us about this and glad to hear the issue is now resolved.
If we add memory
WithMemoryStorage
to the build then an exception pops upMicrosoft.SemanticKernel.KernelException: „Service not found: '__SK_DEFAULT' text embedding service not available”
Unfortunately we do not have documentation, so it is worth adding the information that we are missing in the config
AddOpenAITextEmbeddingGenerationService
. Alternatively, let's add documentation in the code next to this exception.My code:
To bypass the exception it is sufficient to add a config which is missing from the documentation.
https://github.com/microsoft/semantic-kernel/blob/9faa7e935007d8628035c95f009d51ee35b13ab2/dotnet/src/SemanticKernel.Abstractions/KernelConfig.cs#L56