WAIT
Have you installed VS Code, Git, and other prequisites?
If not, please do the Foundational Labs.
Write your first Python script.
Make your first call to OpenAI’s API.
Part 1. Hello Python
Open VS Code
In a new Jupyter notebook, run:
python
name = "TechForge"
print(f"Hello, {name} ⚒️")
Try changing name to your own.
✅ You just wrote your first Python code.
Part 2. First API Call (requires free OpenAI API key)
Install the OpenAI library:
python
!pip install openai
Import and set your API key:
python
from openai import OpenAI
client = OpenAI(api_key="YOUR_API_KEY")
Make your first request:
python
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": "Say hello from TechForge"}]
)
print(response.choices[0].message.content)
✅ The model should reply back with a greeting.
Next Lab →