Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
การสรุปเอกสารเป็นเครื่องมือที่มีคุณค่าสำหรับการตรวจทานเนื้อหาข้อมูลเชิงลึกอย่างรว Aspose.Wordsรองรับการสรุปเอกสารโดยใช้AI-รุ่นขับเคลื่อน,ทำให้ง่ายต่อการประมวลผลข้อความยาว. ฟังก์ชันAIตามAspose.Wordsจะรวมโมเดลภาษาสร้างขั้นสูงจากOpenAIและGoogleรวมทั้งClaude’sโมเดลภาษาสร้างมนุษย์ รายการรุ่นที่รองรับมีอยู่ในการแจงนับAiModelType.
คุณสามารถระบุตัวเลือกต่างๆสำหรับการสรุปเนื้อหาเอกสาร ใช้วิธีการSummarizeเพื่อสร้างสรุปเอกสารของคุณ นอกจากนี้คุณยังสามารถตั้งค่าความยาวสรุปโดยใช้คุณสมบัติSummaryLength.
ด้วยAspose.Wordsการดำเนินการสรุปเอกสารจะตรงไปตรงมา ตัวอย่างรหัสต่อไปนี้แสดงวิธีการสรุปเอกสารโดยใช้รูปแบบGPT-4o:
Document firstDoc = new Document(getMyDir() + "Big document.docx");
Document secondDoc = new Document(getMyDir() + "Document.docx");
String apiKey = System.getenv("API_KEY");
// Use OpenAI or Google generative language models.
IAiModelText model = (IAiModelText)AiModel.create(AiModelType.GPT_4_O_MINI).withApiKey(apiKey);
Document oneDocumentSummary = model.summarize(firstDoc, new SummarizeOptions(); { oneDocumentSummary.setSummaryLength(SummaryLength.SHORT); });
oneDocumentSummary.save(getArtifactsDir() + "AI.AiSummarize.One.docx");
Document multiDocumentSummary = model.summarize(new Document[] { firstDoc, secondDoc }, new SummarizeOptions(); { multiDocumentSummary.setSummaryLength(SummaryLength.LONG); });
multiDocumentSummary.save(getArtifactsDir() + "AI.AiSummarize.Multi.docx");
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.