GeneratePresentation

GeneratePresentation(string, PresentationContentAmountType)

从文本描述生成演示文稿实例。提供主题、想法、引用或所需语言的文本片段。

public IPresentation GeneratePresentation(string description, 
    PresentationContentAmountType presentationContentAmount)
参数类型描述
descriptionString主题、想法、引用或文本片段。
presentationContentAmountPresentationContentAmountType生成的演示文稿中的内容量。

异常

异常条件
ArgumentExceptionAI 聊天指令不能为空或空字符串。

备注

下面的示例使用默认 AsposeAIWebClient,它由无参 SlidesAIAgent 构造函数创建并连接到 Aspose 自己的 LLM。若要使用其他 AI 提供商、提供您自己的 LLM,或自定义连接(例如,通过提供您自己的 HttpClient),请将 IAIWebClient 实现传递给 SlidesAIAgent 构造函数。可用实现包括:

另请参见


GeneratePresentation(string, PresentationContentAmountType, IPresentation)

从文本描述生成演示文稿实例。提供主题、想法、引用或所需语言的文本片段。

public IPresentation GeneratePresentation(string description, 
    PresentationContentAmountType presentationContentAmount, IPresentation presentationTemplate)
参数类型描述
descriptionString主题、想法、引用或文本片段。
presentationContentAmountPresentationContentAmountType生成的演示文稿中的内容量。
presentationTemplateIPresentation用作布局和设计模板的演示文稿,替代默认模板。

异常

异常条件
ArgumentNullException未提供演示文稿模板。
ArgumentExceptionAI 聊天指令不能为空或空字符串。

备注

下面的示例使用默认 AsposeAIWebClient,它由无参 SlidesAIAgent 构造函数创建并连接到 Aspose 的自有 LLM。若要使用其他 AI 提供商、提供您自己的 LLM,或自定义连接(例如,通过提供您自己的 HttpClient),请将 IAIWebClient 实现传递给 SlidesAIAgent 构造函数。可用实现包括:

另请参见