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):
...
| Parameter | Type | Description |
|---|---|---|
| description | str | The topic, ideas, quotes, or text snippets. |
| presentation_content_amount | PresentationContentAmountType | The 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
| Exception | Description |
|---|---|
| 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):
...
| Parameter | Type | Description |
|---|---|---|
| description | str | The topic, ideas, quotes, or text snippets. |
| presentation_content_amount | PresentationContentAmountType | The amount of content in the resulting presentation. |
| presentation_template | IPresentation | A 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
| Exception | Description |
|---|---|
| RuntimeError(Proxy error(ArgumentNullException)) | Presentation template is not provided. |
| RuntimeError(Proxy error(ArgumentException)) | AI chat instruction can’t be None or empty. |
See Also
- class
AsposeAIWebClient - class
IAIWebClient - class
IPresentation - class
OpenAICompatibleWebClient - class
OpenAIWebClient - enumeration
PresentationContentAmountType - class
SlidesAIAgent - module
aspose.slides.ai - library
Aspose.Slides