Summarizer API
The sharedContext read-only property of the Summarizer interface returns a string describing the context the pieces of text to summarize are being used in. This helps the Summarizer to generate more suitable summaries.
Value
A string.
Examples
const summarizer = await Summarizer.create({
sharedContext:
"A general summary to help a user decide if the text is worth reading",
// ...
});
// Logs "A general summary to help a user ..."
console.log(summarizer.sharedContext);
Specifications
Browser compatibility
See also
- Using the Summarizer API
- Web AI demos on chrome.dev
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
