Just updated the README.md file to make it easier for people to understand like novices like myself, it explains what things are, what they do.
Enhanced README.md with Teen-Friendly Explanations.
N.B Thank you for so much great work!! if needed i can complete the readme and have all the internal hyperlinks working to connect to the Quick Definitions section. And to have these links in blue for people to learn.
Summary This pull request updates the README.md file, specifically enhancing the Pagination section with additional explanations tailored for younger audiences (around 15 years old). The changes aim to make the documentation more accessible and easier to understand for newcomers to the OpenAI API and programming concepts. Changes Made
Added emoji-prefixed explanations after each code block in the Pagination section. Introduced relatable analogies (e.g., books, relay races, encyclopedias) to explain complex concepts. Maintained the original code examples and structure while improving readability. Ensured explanations cover both synchronous and asynchronous pagination methods.
Benefits
Improves accessibility of the documentation for younger developers or those new to API concepts. Provides clear, relatable explanations without sacrificing technical accuracy. Enhances overall user experience by making complex topics more approachable.
The story.
Why Dave?
I am a 3rd Level IT Support agent and an Applied Psychologist in IT. (Not saying much!! but that's what I did in life) I was watching a YouTube video and I went to the OpenAI README.md file to attempt using the OpenaAI code, as the API has changed from the last time I was playing with it to link the OpenAI API key to talk to my computer. (Macbook Pro M3) and after adding the code to VS Code opened a terminal and entered. python chat.py, it ran but there was no output in the terminal. I have used OpenAi many times with projects and knew the print option was missing. So I added it, but it took a few attempts to get it right.
I understand Python but couldn't order a sandwich meaning, I can't program but know how to miniplate the code with the help of OpenAI and ChatGPT, as it can explain on every level the meaning of what I want to be explained, from a 15-year-old to a professional explanation, I get to understand the jargon, technical language and what they mean in context.
So a 5 minute coding challenge turned into a 2 hour drama!! Lolz.... But I got it working with persistence.
I then had the idea of adding this line to the official README.md so other people could save the time I did and get it to work 1st time, as this is the main reason. Making things hard to do turns those away, as internally we don't want to feel unsmart or silly not being able to understand, and our minds will protect us and distract us to something we do understand and bring back that feeling of confidence inside ourselves again. (Thats the dyslexic in me to need to understand, and the psychologist in me to share that understanding to make it easier.) So I began to then continue the README.me and add more explanations and examples using real life anologies to link what we know in the mind already to complex ideas and make them easy to connect the nurons and nodes. Like computers. So, my writing is code in English for linking two models together using WordChains. ;)
My background in why I did this, as I do actually love writing manuals and guides for people, maybe due to being dyslexic and I find it hard to understand things, so I make them easier for me, then I build on that level, as I have helped people with disabilities understand things by first doing it myself.
I used to write computer/program manuals for IBM Call Center Dublin. At the same time training new employees with no computer experience. So IBM asked me to rewrite the manuals for entry-level understanding, and then combine both scripts so the knowledge gap is understood and seen simultaneously. It is funny as I help create an internal program called RICK, rich in computer knowledge, and the purpose was to ask the program questions about a problem, the database will bring back answers in steps to help the employee fix the customer's problem over the phone. And now we have OpenAI!!!
Sorry for the background, but people might ask why I bothered to add to an already masterful readme.
My Problem Fixed.
What I Added.
I add a line of code at the bottom of the code block, this block is the 1st usage of code from Openai on the README.md file.
This line is print(chat_completion.choices[0].message.content)
I added this as it was needed to see something appear in the terminal, I ran the script a few times and nothing happened but returned to the prompt and no sign of errors, which is a good sign I believe.
This made me worry I was doing something wrong and copied and pasted into ChatGPT and that gave me an incorrect print command.
- print(chat_completion.choices[0].message['content'])
- print(response['choices'][0]['message']['content'])
- print(chat_completion['choices'][0]['message']['content'])
The API Code to get a response from OpenAI servers saying "Huston we can hear you"
import os from openai import OpenAI
client = OpenAI( # This is the default and can be omitted api_key=os.environ.get("OPENAI_API_KEY"), )
chat_completion = client.chat.completions.create( messages=[ { "role": "user", "content": "Say this is a test", } ], model="gpt-3.5-turbo", )
print(chat_completion.choices[0].message.content)
1.st Job is to test all the openai code in the README.md using Python 3.11.9 and I will add what openai module I am using and all other details, as every machine is different.
I will post my findings here, so my version of readme has all the code blocks working and tested to work, this is for me, so I can use the other kinds of options available, but have to spend hours working them out, but for you brilliant experts, it seems and looks easy! And it is easy if you are at that level.
Accessibility for people with disabilities tends to help people without as the explanations covers everyone.
Please do not get annoyed if I presume that your README is not good enough or difficult, it is not when you are in a place to understand complex technical language. This is what I am to achieve with my readme, to combine complex with basic English to bridge the gap.
I will post updates one by one.
Kind regards,
David.
Just wondering if people could suggest if the README is ok by them, and its not too much. Just want to help people with disabilities and new learners how to use the openai code and learn python. THanks
Hey, thanks for the PR! While we appreciate the intent of making the README more accessible to users, we think this is better-suited for something like a blog post rather than in this repository.