Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling openai.beta.chat.completions.runTools with gpt-4-32k returns error: "Additional properties are not allowed ('parsed', 'refusal' were unexpected)" #1161

Open
1 task done
JotaP opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JotaP
Copy link

JotaP commented Nov 1, 2024

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

I am using the example from https://github.com/openai/openai-node/blob/master/examples/tool-call-helpers.ts and using OpenAI node SDK v.4.69.0.

When I execute the example using gpt-4-32k model, I receive the following error: BadRequestError: 400 Additional properties are not allowed ('parsed', 'refusal' were unexpected) - 'messages.2'

image

When I execute the example using gpt-4o model, the example works correctly.

image

I have been testing with different OpenAI node SDK versions. The last one where runTools actually works with this example is v.4.54.0. Once you upgrade to 4.55.x the error starts happening.

It could be related with the addition of Structured outputs that was added in 4.55.x.

I am using GPT models deployed in an Azure OpenAI service.

Maybe I should be doing something different to make it work with gpt-4-32k? (I haven't tested with gpt-4-1106-preview that is used in the example, but this should also work with gpt-4-32k, right?).

To Reproduce

  • Use the example available at https://github.com/openai/openai-node/blob/master/examples/tool-call-helpers.ts
  • Configure the OpenAI instance to use a GPT4 32k model.
  • Execute the example

Code snippets

No response

OS

macOS

Node version

v20.18.0

Library version

openai v.4.69.0

@JotaP JotaP added the bug Something isn't working label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@JotaP and others