slidedeckai.core.SlideDeckAI#

class slidedeckai.core.SlideDeckAI(model: str, topic: str, api_key: str | None = None, pdf_path_or_stream=None, pdf_page_range=None, template_idx: int = 0)[source]#

The main class for generating slide decks.

__init__(model: str, topic: str, api_key: str | None = None, pdf_path_or_stream=None, pdf_page_range=None, template_idx: int = 0)[source]#

Initialize the SlideDeckAI object.

Parameters:
  • model – The name of the LLM model to use.

  • topic – The topic of the slide deck.

  • api_key – The API key for the LLM provider.

  • pdf_path_or_stream – The path to a PDF file or a file-like object.

  • pdf_page_range – A tuple representing the page range to use from the PDF file.

  • template_idx – The index of the PowerPoint template to use.

Raises:

ValueError – If the model name is not in VALID_MODELS.

Methods

__init__(model, topic[, api_key, ...])

Initialize the SlideDeckAI object.

generate([progress_callback])

Generate the initial slide deck.

reset()

Reset the chat history and internal state.

revise(instructions[, template_idx, ...])

Revise the slide deck with new instructions.

set_model(model_name[, api_key])

Set the LLM model (and API key) to use.

set_template(idx)

Set the PowerPoint template to use.