Describe the bug
Using KernelFunctionYaml.FromPromptYaml() to deserialize YAML to an SK function in an existing codebase, with an existing dependency on YamlDotNet latest version (16.1.3).
The call to KernelFunctionYaml.FromPromptYaml() results in a TypeLoadException with the message:
Method 'ReadYaml' in type 'Microsoft.SemanticKernel.PromptExecutionSettingsTypeConverter' from assembly 'Microsoft.SemanticKernel.Yaml, Version=1.20.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3' does not have an implementation.
It appears to be a breaking change with YamlDotNet 16.0.0, released 7/14/2024, specifically a change to the method signature of IYamlTypeConverter.ReadYaml()
To Reproduce
Steps to reproduce the behavior:
Have a project that references YamlDotNet 16.1.3 and Microsoft.SemanticKernel.Yaml
Call KernelFunctionYaml.FromPromptYaml() with valid (or invalid) YAML.
The TypeLoadException is thrown.
Expected behavior
The call to KernelFunctionYaml.FromPromptYaml() should parse the YAML and if it is valid, return a valid KernelFunction object.
Describe the bug Using
KernelFunctionYaml.FromPromptYaml()
to deserialize YAML to an SK function in an existing codebase, with an existing dependency onYamlDotNet
latest version (16.1.3).The call to
KernelFunctionYaml.FromPromptYaml()
results in aTypeLoadException
with the message:It appears to be a breaking change with YamlDotNet 16.0.0, released 7/14/2024, specifically a change to the method signature of
IYamlTypeConverter.ReadYaml()
To Reproduce Steps to reproduce the behavior:
YamlDotNet
16.1.3 andMicrosoft.SemanticKernel.Yaml
KernelFunctionYaml.FromPromptYaml()
with valid (or invalid) YAML.TypeLoadException
is thrown.Expected behavior The call to
KernelFunctionYaml.FromPromptYaml()
should parse the YAML and if it is valid, return a valid KernelFunction object.Screenshots N/A
Platform
Additional context The problem occurred while using Microsoft.SemanticKernel.Yaml < 1.20.0 but was not investigated until now.