This is the repository for the LinkedIn Learning course OpenAI API: Building custom agents with the Assistant API [ASI]
. The full course is available from LinkedIn Learning.
See the readme file in the main branch for updated instructions and information.
This repository provides basic examples of how to use the OpenAI Assistant API in both Python and Node.js. The Python examples are found in the /python
folder, the Node.js examples in the /node
folder. The examples perform identical tasks using the same API across the two different languages.
To use these exercise files you need an OpenAI API key. You get that key at platform.openai.com
- Click the "Code" button and select "Codespaces."
- Create a new Codespace or open one you've already created.
- Create a new file named
.env
in the root folder. - Add
OPENAI_API_KEY=
followed by your OpenAI API key to.env
- Note
.env
is not tracked by GitHub so the file will only exist in this Codespace. - To run the Python examples in terminal, navigate to the
/python
folder and use thepython [filename.py]
command. - To run the Node.js examples in terminal, navigate to the
/node
folder and use thenode [filename.js]
command.