Closed q-stefanmuscalu closed 5 months ago
The problem is in semantic_kernel.connectors.ai.open_ai.services.utils.kernel_function_metadata_to_openai_tool_format
parse_schema
needs another case for array
, something like this
elif schema_data.get("type") == "array":
result = {
"type": schema_data.get("type", "array"),
"description": schema_data.get("description", ""),
"items": { "type": "string" }
}
@q-stefanmuscalu thank you for filing this issue, we'll take a look at it and get it resolved.
Hey, thank you for opening the pull request! I discovered that list return types don't work either. If my tool returns a list, only the first element of the list makes it to the agent. It looks like a separate issue to me.
Hi @q-stefanmuscalu that issue is also fixed in #6370.
Describe the bug I am writing a native Python plugin. Stuff breaks if I use
list[str]
as parameters for my kernel_function.To Reproduce Steps to reproduce the behavior: Define this kernel function:
My app starts up fine. Then when I ask
"What of the following ingredients are allergens? milk, soy, salt, peanuts, strawberries, and eggs"
I get the following error:I have a workaround where I tell the agent to give me a string with a separator:
Then the agent correctly replies with:
Expected behavior I expect kernel functions to handle list parameters.
Screenshots NA
Platform
Additional context Add any other context about the problem here.