CheckGrammarOptions.MakeRevisions

CheckGrammarOptions MakeRevisions property. Allows to specify either final or revised document to be returned with proofed text. Default value is false.

CheckGrammarOptions.MakeRevisions property

Allows to specify either final or revised document to be returned with proofed text. Default value is false.

public bool MakeRevisions { get; set; }

Examples

Shows how to create custom OpenAiModel and perform grammar checking.

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

CheckGrammarOptions options = new CheckGrammarOptions() { MakeRevisions = true };

GrammarChecker.CheckGrammar(MyDir + "SimpleAI.docx", ArtifactsDir + "CheckGrammar.docx", model, options);

See Also