Open TaoChenOSU opened 4 months ago
Currently there no simple way to fix this. Because it requires adding line
[JsonDerivedType(typeof(GeminiChatMessageContent), typeDiscriminator: nameof(GeminiChatMessageContent))]
to base class KernelContent or using special JsonTypeInfo but it is not supported on net standard.
But don't worry when function abstraction will be finished, probably classes GeminiChatMessageContent and StreamingGeminiChatMessageContent will be removed.
Describe the bug This is related to https://github.com/microsoft/semantic-kernel/issues/6281.
Using the Gemini connector results in exceptions. It still invokes the function multiple times. However, instead of returning a poem at the end, it throws an exception:
To Reproduce Steps to reproduce the behavior:
GeminiPromptExecutionSettings settings = new() { ToolCallBehavior = GeminiToolCallBehavior.AutoInvokeKernelFunctions };
Expected behavior Return a poem.
There won't be any exception and the code correctly returns a poem with auto invoked disabled. This is because the function will only be invoked once.
Platform
Additional context Tested with gemini-1.0-pro