Using the latest OpenAI python API (1.8.0) with gpt-3.5-turbo-16k, I am unable to get parity between the OpenAI Playground (Chat) and the OpenAI Python API calls.
I’m aware of the issues with non-deterministic output; however, that is not the issue here. I’ve got temperature at 0 (zero) and Top-P at 0.001 to increase determinism.
In addition, I have tested hundreds of variations to assure that this isn’t a fluke, based on the following: I receive the same output in 3 instances from Playground, then I test 3 instances in the API. All of the Playground output matches (it does not differ between each of the three repsonses). The same for the API. While all responses match within each mode; the API and Playground do not match.
Based on this test, run hundreds of times, I can be certain this is not an issue with non-deterministic output.
I also use the precise system and user prompts, copied directly from the Playground “View Code” option. The model, settings, prompts all match 100%, testing using both gpt-3.5-turbo-16k -and- gpt-3.5-turbo.
This is the approach I’m using for API calls:
gptSystem = [{"role": "system", "content": gptInstructions}]
gptUser = [{"role": "user", "content": gptPrompt}]
response = openai.chat.completions.create(
model="gpt-3.5-turbo-16k",
messages= gptSystem + gptUser
max_tokens=8001,
stop=None,
temperature=0,
top_p=0.001,
frequency_penalty=0,
presence_penalty=0
)
I’ve searched the forum and found others with this problem; however, none of the ideas in the posts have had any effect.
Thank you in advance for any ideas