openai / openai-python

The official Python library for the OpenAI API

Home Page:https://pypi.org/project/openai/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different request methods lead to different results.

djshowtime opened this issue · comments

Hi,

I requested through python-client-library "openai" and restful request—all with default parameters.

With identical input text, it returned different results. Besides the difference in the output text, the other difference appears in "finish_reason". One is "stop", and the other is "length".

Could you please let me know the reason why the results were different?

Hi @djshowtime! Thanks for writing in.

If I had to take a guess, it sounds like you're running into our model's non-determinimism. If you set the temperature equal to 0, you should be able to see the same response from both openai-python and restful requests. See https://beta.openai.com/docs/quickstart/adjust-your-settings for more information.

Does that help?