Playground and API returing different results?

Yep, it’s a bug in the openai node library.
I just tried with an alternate node library (GitHub - lgrammel/modelfusion: The TypeScript library for building multi-modal AI applications.) and it works just same as with Curl.

Thanks for being sounding board! This has been frustrating me for a while.

ps. before doing so, i set the other params to the defaults in case that was the problem:

    const { choices } = await openai.chat.completions.create({
      messages: formattedMessages,
      model: OPENAI_API_MODEL,
      temperature: OPENAI_TEMPERATURE,
      top_p: 1,
      frequency_penalty: 0,
      presence_penalty: 0
    });

but that didn’t change the behavior.

4 Likes