Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
การสรุปเอกสารเป็นเครื่องมือที่มีค่าสำหรับการตรวจสอบเนื้อหา ข้อมูลเชิงลึกอย่างรวดเร็ว หรือการเตรียมบทคัดย่อ Aspose.Words รองรับการสรุปเอกสารโดยใช้โมเดลที่ขับเคลื่อนด้วย AI ทำให้ประมวลผลข้อความยาวๆ ได้ง่ายขึ้น ฟีเจอร์นี้ซึ่งมีอยู่ในโมดูล aspose.words.ai จะผสานรวมโมเดลภาษากำเนิดขั้นสูงจาก OpenAI และ Google รวมถึงโมเดลภาษากำเนิดแบบแอนโธรปิก Claude’s รายชื่อโมเดลที่รองรับมีอยู่ในข้อมูลแจงนับ AiModelType.
คุณสามารถระบุตัวเลือกต่างๆสำหรับการสรุปเนื้อหาเอกสาร ใช้วิธีการsummarizeเพื่อสร้างสรุปเอกสารของคุณ คุณยังสามารถตั้งค่าความยาวสรุปโดยใช้คุณสมบัติsummary_length.
ด้วยAspose.Wordsการดำเนินการสรุปเอกสารจะตรงไปตรงมา ตัวอย่างรหัสต่อไปนี้แสดงวิธีการสรุปเอกสารโดยใช้รูปแบบGPT-4o:
first_doc = aw.Document(MyDir + "Big document.docx")
second_doc = aw.Document(MyDir + "Document.docx")
api_key = os.getenv("API_KEY")
# Use OpenAI or Google generative language models.
model = aw.ai.AiModel.create(aw.ai.AiModelType.GPT_4O_MINI).with_api_key(api_key).as_open_ai_model()
options = aw.ai.SummarizeOptions()
options.summary_length = aw.ai.SummaryLength.SHORT
one_document_summary = model.summarize(first_doc, options)
oneDocumentSummary.save(ArtifactsDir + "AI.AiSummarize.One.docx")
options.summary_length = aw.ai.SummaryLength.LONG
multi_document_summary = model.summarize([first_doc, second_doc], options)
multiDocumentSummary.save(ArtifactsDir + "AI.AiSummarize.Multi.docx")
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.