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

.Net - openai function calling seems to be failing if a plugin-function has underscore in its name

Open deepinderdeol opened this issue 2 years ago • 2 comments

This is what I am seeing and took a while to figure out the problem -

  • function does not get executed if function name has an underscore: sk_removeLayer
  • and function is executed if the function name is changed to: removeLayer

Seems strange...maybe there is some naming requirement that I am unaware of?

I only see this issue with OpenAI function calling, the same plugin/functions work okay with the Handlebars planner.

Tested with : v1-rc3

deepinderdeol avatar Dec 09 '23 20:12 deepinderdeol

It looks like we need to have better error messaging. OpenAI does not allow underscores when using their function calling API.

madsbolaris avatar Dec 11 '23 18:12 madsbolaris

After investigating on the issue, there's no requirement on the underscores, the examples in OpenAI APIs uses cobra_case. The problem arises randomly if you are using an older OpenAI model.

Suggest using the latest 1106 versions for best experience.

rogerbarreto avatar Jan 03 '24 12:01 rogerbarreto