
自版本 24.11 起, Aspose.Words 對應 .NET提供了由 AI 提供支援的文檔摘要功能,使用戶能夠從長篇文本中快速提取關鍵見解。在版本 25.2 中,我們透過啟用 Anthropic generative language models 匯總擴展了此功能。這就是我們將在這篇短文中討論的內容。
文檔摘要有哪些新功能?
- Support for Anthropic AI models – 使用者現在可以使用 Anthropic 的高階生成語言模型來產生摘要,從而提供更大的靈活性和更好的結果。新的公開課程
- AnthropicAiModel – 此類別允許與 Anthropic AI 模型無縫集成,從而可以輕鬆地在不同的 AI 提供者之間切換。
使用 Anthropic AI 模型 {#document-summarization-using-anthropic-ai-model} 進行文件摘要
隨著文件摘要功能的更新, Aspose.Words 對應 .NET提供更多 AI 功能,幫助使用者高效處理和匯總大量文字。
使用新的 AnthropicAiModel 總結文件的方法如下:
Document doc = new Document("Big document.docx");
string apiKey = Environment.GetEnvironmentVariable("API_KEY");
// Use Claude 3.5 Haiku generative language models.IAiModelText model = new AnthropicAiModel(AiModelType.Claude35Haiku).WithApiKey(apiKey);
Document docSummary = model.Summarize(doc, new SummarizeOptions() { SummaryLength = SummaryLength.Short });
docSummary.Save("AiSummarizeDoc.docx");
為什麼要使用Anthropic模型進行總結?
將 Claude 的人擇生成語言模式整合到Aspose.Words(針對 .NET)提高了文檔摘要的準確性和效率。這些模型提供高速處理、改進的連貫性和更好的上下文理解,使其成為需要高品質摘要的用戶的絕佳選擇。
透過新的 AnthropicAiModel 類,可以在不同的 AI 提供者之間無縫切換,讓您可以更靈活地選擇最符合您需求的型號。立即嘗試最新更新並體驗由人擇模型支援的AI摘要帶來的好處!