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, azure_endpoint_url: str = '', azure_deployment_name: str = '', azure_api_version: str = '')[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, azure_endpoint_url: str = '', azure_deployment_name: str = '', azure_api_version: str = '')[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.
azure_endpoint_url – Azure OpenAI endpoint URL (required when using Azure provider).
azure_deployment_name – Azure OpenAI deployment name (required when using Azure provider).
azure_api_version – Azure OpenAI API version (required when using Azure provider).
- 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 optionally API key / Azure credentials) to use.
set_template(idx)Set the PowerPoint template to use.