Examples and guides for using the OpenAI API
The openai-cookbook is a collection of examples and guides for using the OpenAI API, built and maintained by OpenAI. The repository is organized around runnable Python notebooks and scripts that demonstrate how to use OpenAI's services, including the ChatGPT and GPT-4 APIs, with topics spanning agent development, deployment, and various practical applications. The project uses Python with Jupyter notebooks as its primary format, organized with supporting tools like Flask for backend services, React for user interfaces, Docker for containerization, and `uv` for dependency management. Contributors are expected to follow specific conventions for code style (PEP 8), documentation, testing with pytest, and metadata management via YAML configuration files, with particular emphasis on security practices like storing API keys in environment variables rather than hardcoding them.