SummaryLength Enum
Wordize.AI.SummaryLength enum. Enumerates possible lengths of summary.
SummaryLength enumeration
Enumerates possible lengths of summary.
public enum SummaryLength
Values
Name | Value | Description |
---|---|---|
VeryShort | 0 | Try to generate 1-2 sentences. |
Short | 1 | Try to generate 3-4 sentences. |
Medium | 2 | Try to generate 5-6 sentences. |
Long | 3 | Try to generate 7-10 sentences. |
VeryLong | 4 | Try 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
- namespace Wordize.AI
- assembly Wordize