Python documentation should be better

I was looking through the documentation and saw that the Files section has no Python documentation but I had to dig through the openai pypi repo to see that it is in fact there.

No python here: OpenAI API
But the python actually exists: GitHub - openai/openai-python
As a professional technologist, this is what I expect documentation to look like: Keras API reference

You can see that there are copious inline examples of Python snippets to serve as a solid reference.

For instance, the “Files” section of the documentation should have something like this:

filename = 'questions.jsonl'
resp = openai.File.create(purpose='fine-tune', file=open(filename))

And, ideally, this would be duplicated in the Fine Tuning documentation as well.

Hey David,

In the API reference, you can select the language / library from the dropdown at the top right of any of the code examples. It displays cURL code by default, but python is an available option.

1 Like