microsoft / semantic-kernel

Integrate cutting-edge LLM technology quickly and easily into your apps
https://aka.ms/semantic-kernel
MIT License
22.15k stars 3.31k forks source link

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

Open deepinderdeol opened 8 months ago

deepinderdeol commented 8 months ago

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

zimeo99 commented 8 months ago

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

crickman commented 8 months ago

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.

matthewbolanos commented 5 months ago

@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.

markwallace-microsoft commented 6 days ago

@deepinderdeol Is this still an issue?

deepinderdeol commented 5 days ago

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