notes on ChatGPT Prompt Engineering for Developers (1)

Shi
CI/CD/DevOps
Published in
2 min readJan 21, 2024

--

I started enrolling the free course at https://learn.deeplearning.ai/ by Andrew Ng.

today, I am trying to run some sample code in section 3) Iterative

I am trying to capture my notes so that anybody can could refer to them if they got some minor surprise here and there.

my approach is to setup a local environment on windows using VS Code and Jupyter Noteook, so in short, you need to

-- install VS Code
-- start a new Jupyter notebook
-- try the code and install missing modules
-- setup your account with OpenAPI and create a openAPI api token

Note that you don’t need a ChatGPT subscription as you are going to interact with GPT model directly without ChatGPT app, so you just need to set a pay-as-use account with OpenAI.

some of the code in the course doesn’t work with latest openAI module anymore, so you will need the following (as of 2024.1.21).

.\python3.11.exe -m pip install openai==0.28
.\python3.11.exe -m pip install python-dotenv

here is the result:

--

--

Shi
CI/CD/DevOps

I am a coder/engineer/application security specialist. I like to play around with language and tools; I have strong interest in efficiency improvement.