SummaryLength Enum

Wordize.AI.SummaryLength enum. Enumerates possible lengths of summary.

SummaryLength enumeration

Enumerates possible lengths of summary.

public enum SummaryLength

Values

NameValueDescription
VeryShort0Try to generate 1-2 sentences.
Short1Try to generate 3-4 sentences.
Medium2Try to generate 5-6 sentences.
Long3Try to generate 7-10 sentences.
VeryLong4Try to generate 11-20 sentences.

Examples

Shows how to create custom OpenAiModel and perform document summarization.

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);

SummarizeOptions options = new SummarizeOptions() { SummaryLength = SummaryLength.VeryShort };

Summarizer.Summarize(MyDir + "SimpleAI.docx", ArtifactsDir + "Summarize.docx", model, options);

See Also