SlidesAIAgent

SlidesAIAgent class

Provides AI-powered features for processing presentations.

SlidesAIAgent

NameDescription
SlidesAIAgent(OpenAIWebClient)SlidesAIAgent function

Parameters:

NameTypeDescription
nullOpenAIWebClientaiClient

Returns: SlidesAIAgent

Error

ErrorCondition
ArgumentNullExceptionAI client instance is not provided

translate

NameDescription
translate (Presentation, String)Translates a presentation to the specified language using AI.

Parameters:

NameTypeDescription
presentationPresentationTarget presentation
languageStringTarget language

Returns: void

Exception

ErrorCondition
OperationCanceledExceptionif translation fails Example usage: Presentation presentation = new Presentation(“Presentation.pptx”); try { IAIWebClient aiWebClient = new OpenAIWebClient(“gpt-4o-mini”, “apiKey”, null); SlidesAIAgent aiAgent = new SlidesAIAgent(aiWebClient); aiAgent.translate(presentation, “spanish”); presentation.save(“translated.pptx”, SaveFormat.Pptx); } finally { if (presentation != null) presentation.dispose(); }