You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Bug: .Net: Kernel functions cause a 400 error (Bad Request) when any kernel function includes a non-primitive input parameter while using Gemini as the AI model.
#10038
Open
rahayzd opened this issue
Dec 29, 2024
· 1 comment
Describe the bug
When using Gemini models for the ChatCompletion service with GeminiToolCallBehavior.AutoInvokeKernelFunctions, I encounter an error indicating that some input arguments of plugins are not acceptable. Only simple data types like int, string, etc., or the Kernel type are accepted. For instance, kernel functions that include parameters of types like DateTime (and many other class types) result in a BadRequest error.
To Reproduce
Steps to reproduce the behavior:
implement a plugin with a DateTime input arg :
ConvertGregorianToJalali(DateTime datetime) {}
register the plugin into kernel
set GeminiToolCallBehavior.AutoInvokeKernelFunctions for execution setting
try to get the result of GetChatMessageContentAsync(prompt , execution setting , kernel) -> chat completion should be registered with an gemini model like "gemini-1.5-flash-latest"
Expected behavior
I did not encounter any issues with the same functions when using the OpenAI API
Screenshots
Platform
OS: Windows
IDE: Visual Studi
Language: C#
Source:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Bug: .Net: Kernel functions cause a 400 error (Bad Request) when any kernel function includes a non-primitive input parameter while using Gemini as the AI model.
.Net: Bug: .Net: Kernel functions cause a 400 error (Bad Request) when any kernel function includes a non-primitive input parameter while using Gemini as the AI model.
Dec 29, 2024
Describe the bug
When using Gemini models for the ChatCompletion service with GeminiToolCallBehavior.AutoInvokeKernelFunctions, I encounter an error indicating that some input arguments of plugins are not acceptable. Only simple data types like int, string, etc., or the Kernel type are accepted. For instance, kernel functions that include parameters of types like DateTime (and many other class types) result in a BadRequest error.
To Reproduce
Steps to reproduce the behavior:
implement a plugin with a DateTime input arg :
ConvertGregorianToJalali(DateTime datetime) {}
register the plugin into kernel
set GeminiToolCallBehavior.AutoInvokeKernelFunctions for execution setting
try to get the result of GetChatMessageContentAsync(prompt , execution setting , kernel) -> chat completion should be registered with an gemini model like "gemini-1.5-flash-latest"
Expected behavior
I did not encounter any issues with the same functions when using the OpenAI API
Screenshots
Platform
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: