GeneratePresentationAsync

GeneratePresentationAsync(string, PresentationContentAmountType)

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

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

异常

异常触发条件
ArgumentExceptionAI 聊天指令不能为 null 或为空。

备注

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

另请参见


GeneratePresentationAsync(string, PresentationContentAmountType, IPresentation)

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

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

异常

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

备注

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

另请参见