总结 API
AI21 Studio 的 Summarize API 使您能够使用我们的高级摘要引擎,该引擎专门针对摘要任务进行了校准。由于它针对此特定目的进行了优化,因此与从头开始开发摘要引擎相比,它更容易集成到您的系统中、更高效且成本更低。此外,它与为 Wordtune Read提供动力的引擎相同,因此您可以放心其令人印象深刻的性能。
简单的 API 请求
由于有效负载中只有 2 个必需参数,因此使用此 API 非常简单:
source`:输入文本,或要摘要的网页的 URL。:上面的类型 -或。
`sourceType``TEXT``URL
可选:
focus
:仅返回针对您选择的主题的摘要。
为了获得更加自定义的摘要,您还有一个可选参数:
focus
:仅返回针对您选择的主题的摘要。最多 50 个字符。
Python
payload = {
"source": "We’ve all experienced reading long, tedious, and boring pieces of text - financial reports, legal documents, or terms and conditions (though, who actually reads those terms and conditions to be honest?). Imagine a company that employs hundreds of thousands of employees. In today's information overload age, nearly 30% of the workday is spent dealing with documents. There's no surprise here, given that some of these documents are long and convoluted on purpose (did you know that reading through all your privacy policies would take almost a quarter of a year?). Aside from inefficiency, workers may simply refrain from reading some documents (for example, Only 16% of Employees Read Their Employment Contracts Entirely Before Signing!). This is where AI-driven summarization tools can be helpful: instead of reading entire documents, which is tedious and time-consuming, users can (ideally) quickly extract relevant information from a text. With large language models, the development of those tools is easier than ever, and you can offer your users a summary that is specifically tailored to their preferences. Let's take legal documents, for example. Though they are written in English, many people find legal documents to be difficult to comprehend, as if they were actually written in a foreign language. Moreover, the interesting parts of each document may differ depending on the person who reads it, so off-the-shelf summarization tools may be too general or too specific. As an example, let's look at the involved personas:",
"sourceType": "TEXT",
"focus": "AI-driven summarization" // Optional
}
以下是上述示例请求的可能响应:
JSON
{
"id": "4f4acb3a-bfb5-a35c-99e5-0be572d97835",
"summary": "AI-driven summarization tools can help users extract relevant information from a text, instead of reading entire documents, which is tedious and time-consuming."
}
最后修改时间: 1 年前