I am planning to create presentation using OpenAi API. Can any someone suggest me the process (native or other trained models API).
Thanks in advance.
R
I am planning to create presentation using OpenAi API. Can any someone suggest me the process (native or other trained models API).
Thanks in advance.
R
You write a program that has a lot of components let’s say a header and a textblock to not overcomplicate things.
Then you ask the model to give you a presentation about XY but you need it in a structured output like so:
Generate a structured JSON representation of a presentation about "The Future of AI".
Each slide should have a 'header' and 'text'. Format it exactly like this:
{
"pages": [
{ "header": "Introduction", "text": "An overview of AI and its future potential." },
{ "header": "Key Innovations", "text": "AI is evolving rapidly with advances in deep learning..." }
]
}
also read this
https://platform.openai.com/docs/guides/structured-outputs
And then you let the program take the json and create a presentation.
Which could be done with python like this:
from pptx import Presentation
prs = Presentation()
for page in presentation_data["pages"]:
slide = prs.slides.add_slide(prs.slide_layouts[1])
title = slide.shapes.title
content = slide.placeholders[1]
title.text = page["header"]
content.text = page["text"]
prs.save("presentation.pptx")
* this is just a general description not a usable program
Great. Thanks for the info.