Function: readResponsesOutput()
readResponsesOutput(
payload):ResponsesOutput
Read the answer text and cited sources out of a Responses response payload.
This is the inverse of chatToResponse: it consumes what an endpoint
speaking Responses natively returns, rather than producing it. The Databricks
native web-search tool answers this way, with each source attached as a
url_citation annotation on the content part that used it.
Prefers the flattened output_text when the payload carries it, and falls
back to walking output[].content[].text. Every field is optional upstream,
so a payload missing any of it yields empty results rather than throwing.
Parameters
Section titled “Parameters”payload
Section titled “payload”Record<string, unknown>