semantic-kernel icon indicating copy to clipboard operation
semantic-kernel copied to clipboard

.Net: Agents - plugins with a boolean parameter is resulting in an exception

Open deepinderdeol opened this issue 2 years ago • 5 comments

One of the functions in a plugin has a bool parameter. This works fine with regular function calling. However, including this functions as a plugin for agent is resulting in the following error:

Exception: Response status code does not indicate success: 400 (Bad Request). { "error": { "message": "Invalid schema for function 'MappingSkills-applyStyleSymbology': 'Boolean' is not valid under any of the given schemas.", "type": "invalid_request_error", "param": "tools[3].function.parameters", "code": "invalid_function_parameters" } }

Am using version 1.6.2

deepinderdeol avatar Mar 19 '24 01:03 deepinderdeol

hi, i can confirm the same error using an agent and a simple kernel function with a boolean input parameter. Is there any link or documentation for the Agents package? thanks in advance

zimeo99 avatar Mar 19 '24 13:03 zimeo99

Boolean isn't an understood as a type by OpenAI.

https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-4.2.1

Correct that this isn't agent specific.

crickman avatar Mar 20 '24 17:03 crickman

@deepinderdeol, is this an issue with native functions? Are you able to share what the signature looks like? Sounds like we need change booleans into enums or something.

madsbolaris avatar Jun 07 '24 09:06 madsbolaris

@deepinderdeol Is this still an issue?

markwallace-microsoft avatar Nov 25 '24 12:11 markwallace-microsoft

@markwallace-microsoft I will try again and let you know

deepinderdeol avatar Nov 26 '24 15:11 deepinderdeol