Summarizer.SummarizeToImages
SummarizeToImages(string, ImageSaveOptions, AiModel, SummarizeOptions)
Generates summary for the document, with options to control the summary length and other settings and renders the result to images.
public static Stream[] SummarizeToImages(string inputFile, ImageSaveOptions saveOptions,
AiModel model, SummarizeOptions options = null)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
saveOptions | ImageSaveOptions | Image save options. |
model | AiModel | Specifies the AI model responsible for generating the summary of a document. |
options | SummarizeOptions | Optional set of options used when summarizing a document with AI. |
Return Value
Returns array of image streams. The streams should be disposed by the end user.
Examples
Demonstrates how to summarize a document and save the result as an array of image streams.
string apiUrl = Environment.GetEnvironmentVariable("CUSTOM_OPENAI_URL", EnvironmentVariableTarget.User);
string apiName = Environment.GetEnvironmentVariable("CUSTOM_OPENAI_NAME", EnvironmentVariableTarget.User);
string apiKey = Environment.GetEnvironmentVariable("CUSTOM_OPENAI_KEY", EnvironmentVariableTarget.User);
AiModel model = OpenAiModel.Create(apiUrl, apiName, apiKey);
Stream[] pages = Summarizer.SummarizeToImages(MyDir + "SimpleAI.docx", new ImageSaveOptions(SaveFormat.Png), model);
See Also
- class ImageSaveOptions
- class AiModel
- class SummarizeOptions
- class Summarizer
- namespace Wordize.AI
- assembly Wordize
SummarizeToImages(string[], ImageSaveOptions, AiModel, SummarizeOptions)
Generates summaries for an array of documents, with options to control the summary length and other settings and renders the result to images. This method utilizes the connected AI model for processing each document in the array.
public static Stream[] SummarizeToImages(string[] inputFiles, ImageSaveOptions saveOptions,
AiModel model, SummarizeOptions options = null)
Parameter | Type | Description |
---|---|---|
inputFiles | String[] | The input file names. |
saveOptions | ImageSaveOptions | Image save options. |
model | AiModel | Specifies the AI model responsible for generating the summary of a document. |
options | SummarizeOptions | Optional set of options used when summarizing a document with AI. |
Return Value
Returns array of image streams. The streams should be disposed by the end user.
See Also
- class ImageSaveOptions
- class AiModel
- class SummarizeOptions
- class Summarizer
- namespace Wordize.AI
- assembly Wordize
SummarizeToImages(Stream, ImageSaveOptions, AiModel, SummarizeOptions)
Generates summary for the document, with options to control the summary length and other settings and renders the result to images.
public static Stream[] SummarizeToImages(Stream inputStream, ImageSaveOptions saveOptions,
AiModel model, SummarizeOptions options = null)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
saveOptions | ImageSaveOptions | Image save options. |
model | AiModel | Specifies the AI model responsible for generating the summary of a document. |
options | SummarizeOptions | Optional set of options used when summarizing a document with AI. |
Return Value
Returns array of image streams. The streams should be disposed by the end user.
See Also
- class ImageSaveOptions
- class AiModel
- class SummarizeOptions
- class Summarizer
- namespace Wordize.AI
- assembly Wordize
SummarizeToImages(Stream[], ImageSaveOptions, AiModel, SummarizeOptions)
Generates summaries for an array of documents, with options to control the summary length and other settings and renders the result to images. This method utilizes the connected AI model for processing each document in the array.
public static Stream[] SummarizeToImages(Stream[] inputStreams, ImageSaveOptions saveOptions,
AiModel model, SummarizeOptions options = null)
Parameter | Type | Description |
---|---|---|
inputStreams | Stream[] | The input streams. |
saveOptions | ImageSaveOptions | Image save options. |
model | AiModel | Specifies the AI model responsible for generating the summary of a document. |
options | SummarizeOptions | Optional set of options used when summarizing a document with AI. |
Return Value
Returns array of image streams. The streams should be disposed by the end user.
See Also
- class ImageSaveOptions
- class AiModel
- class SummarizeOptions
- class Summarizer
- namespace Wordize.AI
- assembly Wordize