TranslateAsync
SlidesAIAgent.TranslateAsync method
Translates a presentation to the specified language using AI.
public Task TranslateAsync(IPresentation presentation, string language)
| Parameter | Type | Description |
|---|---|---|
| presentation | IPresentation | Target presentation |
| language | String | Target language |
Exceptions
| exception | condition |
|---|---|
| ArgumentNullException | Presentation instance is not provided |
| ArgumentException | Language value can’t be null or empty |
Remarks
The example below uses the default AsposeAIWebClient, which is created by the parameterless SlidesAIAgent 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 SlidesAIAgent constructor. Available implementations include:
See Also
- interface IPresentation
- class SlidesAIAgent
- namespace Aspose.Slides.AI
- assembly Aspose.Slides