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