GeneratePresentationAsync
内容
[
隐藏
]GeneratePresentationAsync(string, PresentationContentAmountType)
根据文本描述生成演示文稿实例。提供所需语言的主题、想法、引语或文本片段。
public Task<IPresentation> GeneratePresentationAsync(string description,
PresentationContentAmountType presentationContentAmount)
| 参数 | 类型 | 描述 |
|---|---|---|
| description | String | 主题、想法、引语或文本片段。 |
| presentationContentAmount | PresentationContentAmountType | 生成的演示文稿中的内容数量。 |
异常
| 异常 | 触发条件 |
|---|---|
| ArgumentException | AI 聊天指令不能为 null 或为空。 |
备注
下面的示例使用默认的 AsposeAIWebClient,该实例由无参的 SlidesAIAgent 构造函数创建,并连接到 Aspose 的自有 LLM。要使用其他 AI 提供商,提供您自己的 LLM,或自定义连接(例如,提供您自己的 HttpClient),请将 IAIWebClient 实现传递给 SlidesAIAgent 构造函数。可用的实现包括:
另请参见
- 接口 IPresentation
- 枚举 PresentationContentAmountType
- 类 SlidesAIAgent
- 命名空间 Aspose.Slides.AI
- 程序集 Aspose.Slides
GeneratePresentationAsync(string, PresentationContentAmountType, IPresentation)
根据文本描述生成演示文稿实例。提供所需语言的主题、想法、引语或文本片段。
public Task<IPresentation> GeneratePresentationAsync(string description,
PresentationContentAmountType presentationContentAmount, IPresentation presentationTemplate)
| 参数 | 类型 | 描述 |
|---|---|---|
| description | String | 主题、想法、引语或文本片段。 |
| presentationContentAmount | PresentationContentAmountType | 生成的演示文稿中的内容数量。 |
| presentationTemplate | IPresentation | 用于布局和设计的演示文稿模板,以替代默认模板。 |
异常
| 异常 | 触发条件 |
|---|---|
| ArgumentNullException | 未提供演示文稿模板。 |
| ArgumentException | AI 聊天指令不能为 null 或为空。 |
备注
下面的示例使用默认的 AsposeAIWebClient,该实例由无参的 SlidesAIAgent 构造函数创建,并连接到 Aspose 的自有 LLM。要使用其他 AI 提供商,提供您自己的 LLM,或自定义连接(例如,提供您自己的 HttpClient),请将 IAIWebClient 实现传递给 SlidesAIAgent 构造函数。可用的实现包括: