Responses

Compact a conversation

Summarize a conversation so it can continue in fewer tokens. Takes model and the conversation as input (and/or previous_response_id, plus instructions). The output keeps your user messages and ends with a compaction item that stands for everything else; send the output, followed by new items, as the next input. Nothing is stored. Billed like a response.

post/responses/compact

Request

  • Base URL
    https://api.openscale.so/v1
  • URL
    https://api.openscale.so/v1/responses/compact
  • Auth
    HTTP bearer

Request body

modelstring required
inputunknown
previous_response_idstring
instructionsstring

Response

The compacted conversation.

idstring required
object'response.compaction' required
created_atinteger required
outputobject[] required
usageobject required

Changes

No recorded changes to this operation across all 1 revision of this API.