generate_presentation method

generate_presentation

Generates a presentation instance from a text description. Provide a topic, ideas, quotes, or text snippets in the required language.

def generate_presentation(self, description, presentation_content_amount):
    ...
ParameterTypeDescription
descriptionstrThe topic, ideas, quotes, or text snippets.
presentation_content_amountPresentationContentAmountTypeThe amount of content in the resulting presentation.

Remarks

The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent.#ctor constructor and connects to Aspose’s own LLM. To use a different AI provider, supply your own LLM, or customize the connection (for example, by providing your own HttpClient), pass an IAIWebClient implementation to the Aspose.Slides.AI.SlidesAIAgent.#ctor(Aspose.Slides.A constructor. Available implementations include:

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentException))AI chat instruction can’t be None or empty.

generate_presentation

Generates a presentation instance from a text description. Provide a topic, ideas, quotes, or text snippets in the required language.

def generate_presentation(self, description, presentation_content_amount, presentation_template):
    ...
ParameterTypeDescription
descriptionstrThe topic, ideas, quotes, or text snippets.
presentation_content_amountPresentationContentAmountTypeThe amount of content in the resulting presentation.
presentation_templateIPresentationA presentation to use as a template for layout and design, replacing the default template.

Remarks

The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent.#ctor constructor and connects to Aspose’s own LLM. To use a different AI provider, supply your own LLM, or customize the connection (for example, by providing your own HttpClient), pass an IAIWebClient implementation to the Aspose.Slides.AI.SlidesAIAgent.#ctor(Aspose.Slides.A constructor. Available implementations include:

Exceptions

ExceptionDescription
RuntimeError(Proxy error(ArgumentNullException))Presentation template is not provided.
RuntimeError(Proxy error(ArgumentException))AI chat instruction can’t be None or empty.

See Also