ExBifrost.Api.Compaction (ex_bifrost v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged Compaction.

Summary

Functions

Compact context Compresses a conversation into an opaque encrypted compaction item using the OpenAI-compatible context compaction API. The response output array contains the original user messages plus a final item with type: "response.compaction" and an encrypted_content field. Pass the full output array as input to future Responses API requests to continue the conversation without retransmitting the full history. Supported providers: OpenAI, Azure OpenAI, xAI. Requests to unsupported providers return a 400 error.

Functions

create_compaction(connection, create_compaction_request, opts \\ [])

Compact context Compresses a conversation into an opaque encrypted compaction item using the OpenAI-compatible context compaction API. The response output array contains the original user messages plus a final item with type: "response.compaction" and an encrypted_content field. Pass the full output array as input to future Responses API requests to continue the conversation without retransmitting the full history. Supported providers: OpenAI, Azure OpenAI, xAI. Requests to unsupported providers return a 400 error.

Parameters

  • connection (ExBifrost.Connection): Connection to server
  • create_compaction_request (CreateCompactionRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExBifrost.Model.CreateCompaction200Response.t} on success
  • {:error, Tesla.Env.t} on failure