openai/openai-python ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python library that acts as a convenient wrapper for the OpenAI REST API. It should be really easy to use for a Python developer.
The main thing is that I need to be able to call the different endpoints, like chat completions. I want to be able to send a prompt to a model like GPT-4 and get a response back. It should also support the vision models, so I can pass in an image URL or a base64-encoded image and ask questions about it.
Make sure it includes both a synchronous client for simple scripts and an async client for modern web apps using asyncio. It's also critical that it supports streaming responses, so I can get the results back token-by-token. For authentication, it should just work by reading the API key from an environment variable.
Are you gonna build this?
make sure you review the code using coderabbit