GeneratePresentationAsync

GeneratePresentationAsync(string, PresentationContentAmountType)

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

public Task<IPresentation> GeneratePresentationAsync(string description, 
    PresentationContentAmountType presentationContentAmount)
ParameterTypeDescription
descriptionStringThe topic, ideas, quotes, or text snippets.
presentationContentAmountPresentationContentAmountTypeThe amount of content in the resulting presentation.

Exceptions

exceptioncondition
ArgumentExceptionAI chat instruction can’t be null or empty.

Remarks

The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent 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 SlidesAIAgent constructor. Available implementations include:

See Also


GeneratePresentationAsync(string, PresentationContentAmountType, IPresentation)

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

public Task<IPresentation> GeneratePresentationAsync(string description, 
    PresentationContentAmountType presentationContentAmount, IPresentation presentationTemplate)
ParameterTypeDescription
descriptionStringThe topic, ideas, quotes, or text snippets.
presentationContentAmountPresentationContentAmountTypeThe amount of content in the resulting presentation.
presentationTemplateIPresentationA presentation to use as a template for layout and design, replacing the default template.

Exceptions

exceptioncondition
ArgumentNullExceptionPresentation template is not provided.
ArgumentExceptionAI chat instruction can’t be null or empty.

Remarks

The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent 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 SlidesAIAgent constructor. Available implementations include:

See Also