Best method of summarizing Jupyter notebooks

I’ve written some simple code to convert notebook cells in Jupyter notebooks (input text/code and output text and images) to the openai API messages content format: {'role' : 'user', 'content' : content}.

The goal is to summarize >=1 Jupyter notebook (e.g., “Summarize the following Jupyter Notebook as would a researcher writing an academic paper”).

However, I’m wondering whether the high token count of providing entire notebooks to the openai API is worth it, versus just providing a PDF of the Jupyter notebook(s) to ChatGPT Pro.

Any thoughts?