Interacting with AI via Python
Event box
Interacting with AI via Python In-Person
Would you like to work with an AI large language model (LLM) like ChatGPT or Claude, but not via web interface or desktop applications? Attend this session to interact with LLMs using the Python programming language to accomplish common tasks.
The workshop will use simple Python code, but no knowledge of Python is required. We’ll start by using “APIs” to send simple questions to an AI model, then learn how to structure a conversation. We will also explore how to work with images by asking the LLM to describe one, and do some simple manipulation and analysis of data. Some key concepts we’ll cover include basic prompting, understanding the “context” of an LLM, and options for accessing LLMs for your own projects.
During the workshop, access to language models will be provided through Yale’s new PortKey AI gateway. You will leave with an understanding of how to request access for yourself.
Participants will leave with an understanding of:
- how to use Python to interact with an AI large language model (LLM)
- prompting an LLM to answer a question or perform a task
- the basics of managing context for an LLM
- how to track and calculate the cost of an LLM call
Audience:
No expectation of prior experience with Python, Coding environments, APIs, or LLMs
Registration: Required (to allow pre-circulation of API keys and links)
Location: Poorvu Center room 121
- Date:
- Thursday, October 1, 2026
- Time:
- 10:30am - 12:00pm
- Time Zone:
- Eastern Time - US & Canada (change)
- Location:
- Poorvu Center
- Campus:
- Central Campus
- Audience:
- Faculty Graduate Students Postdoc Staff Undergraduates
- Categories:
- AI (Artificial Intelligence) Computer Programming
