summarize_contents returns a summary of a record, which is the copy of a source that getclean stores after a fetch or an upload. With 10 summaries the choice takes at most 15,000 characters of context, and no page is read in full before it is chosen.
5 sourcesa summary of each, by a modelthe 2 worth reading, read wholecite the source, not the summary
Summarize a stored record
Send the id of the record. The request needs no field.CONTENTS_ID with the id of a record.
The response has the summary and names the model step that wrote it. This response is cut to those 2 fields.
200 OK
execution.models says which version of the step ran.
Summarize while you fetch
fetch_contents and upload_contents take summary as a switch, so one call can fetch a source and summarize it. This request asks for the summary and the outline of a source, and for no text.
Request body
SOURCE_URL with the address of a page or a document.
The summary is written from the whole content, whatever size limit the response has. The record stores the summary of its fetch, and get_contents returns it later at no charge.
Summarize the first results of a search
A search can fetch its first results in the same call, and each of them can come with a summary. This request asks for the first 5 results, each with its summary and its outline.Request body
wait_seconds to 30 in place of the default of 10. The agent then reads 5 summaries, chooses, and reads the sections it needs by their ids. For the fields of contents, see Search and get the evidence in one call.
Choose what the summary reads
A summary is written from the main content of the source unless the request says otherwise.block_kinds limits the summary to kinds of block, so ["table"] gives a summary of what the tables of a filing say. scope set to whole_page includes the parts of a web page that are outside its main content.
Cite the source, not the summary
A summary is for choosing what to read. It is a model’s text about the source, and a sentence of a report should rest on a passage of the source itself. A highlight returns that passage with its place. For the request, see Highlight the evidence for each question. A source can contain text that is written as an instruction to a model, and a summary can repeat it. Treat a summary as text from the source, not as an instruction to follow.Check what a summary costs
A summary costs one model step, on a stored record and inside a fetch alike. The key needs the scopecontents:model. A request that sends deterministic_only as true cannot ask for a summary, because a summary is the work of a model.
On a stored record, a model step that fails or takes longer than its time limit ends the call with the problem gateway-error or gateway-timeout. Nothing is charged, and the same call can be sent again.