openai-cookbook README

The project's README from github.com/openai/openai-cookbook. As one markdown file: README.md.

OpenAI Cookbook Logo

✨ Navigate at cookbook.openai.com

Example code and guides for accomplishing common tasks with the OpenAI API. To run these examples, you'll need an OpenAI account and associated API key (create a free account here). Set an environment variable called OPENAI_API_KEY with your API key. Alternatively, in most IDEs such as Visual Studio Code, you can create an .env file at the root of your repo containing OPENAI_API_KEY=<your API key>, which will be picked up by the notebooks.

Most code examples are written in Python, though the concepts can be applied in any language.

For other useful tools, guides and courses, check out these related resources from around the web.

License

MIT License

openai-cookbook (openai/openai-cookbook)

gpt-4
Searching Database…

What is this?A collection of example code and guides for accomplishing common tasks with the OpenAI API, covering things like prompting, embeddings, function calling, and retrieval.
Is this a library or a set of example notebooks?It's a cookbook of standalone Jupyter notebooks and guides, not an installable library or framework.
How do I run the examples?Clone the repo and open the notebooks; most examples are written in Python and run in Jupyter or an IDE like VS Code.
Do I need an OpenAI API key?Yes, you need an OpenAI account and API key, set via the OPENAI_API_KEY environment variable or a local .env file.
Is there a browsable version instead of digging through notebooks?Yes, the cookbook is also published as a browsable website for easier navigation.
Are the examples limited to Python?Most are written in Python, but the underlying concepts and API calls can be applied in any programming language.
What kind of tasks do the examples cover?Common tasks with the OpenAI API such as prompting techniques, embeddings, and other integration patterns, organized as individual notebooks.
Does the repo point to other resources beyond its own examples?Yes, it links out to related tools, guides, and courses from around the web for further learning.
Creator
openai
Size
954.5 MB
Stars
76.7K
Updated
CommitOct 09
Age
4y
Commits · 90 Days