GPT-Live WebSocket session, accessible through Agent.duplexSession. Also emits openai_server_event_received, openai_client_event_queued and delegation_created. Append methods queue context without waiting for acknowledgment. The appended events arrive at the estimated context-injection end and do not indicate speech completion.

Hierarchy (view full)

  • DuplexSession<{
        delegation_created: ((event) => void);
        openai_client_event_queued: ((event) => void);
        openai_server_event_received: ((event) => void);
    }>
    • GPTLiveSession

Constructors

Properties

duplexModel: DuplexModel

Model that created this session.

Accessors

  • get capabilities(): DuplexCapabilities
  • Provider features declared by the owning model.

    Returns DuplexCapabilities

Methods

  • Apply the complete startup configuration before releasing a waiting provider connection.

    Parameters

    Returns Promise<void>

  • Give the model text to paraphrase aloud, or answer a client delegation. Capped at 500 tokens by the service.

    Parameters

    • text: string
    • options: {
          delegationId?: null | string;
      } = {}
      • Optional delegationId?: null | string

    Returns void

  • Add a standing rule retained in reconnect history. The service caps each append at 500 tokens.

    Parameters

    • text: string
    • options: {
          delegationId?: null | string;
      } = {}
      • Optional delegationId?: null | string

    Returns void

  • Add silent context retained in reconnect history. The service caps each append at 500 tokens.

    Parameters

    • text: string
    • options: {
          delegationId?: null | string;
      } = {}
      • Optional delegationId?: null | string

    Returns void

  • Mark the session closing, release configuration waits, and close provider resources.

    Returns Promise<void>

  • Feed an input video frame. Providers without video input can ignore it.

    Parameters

    • _frame: VideoFrame

    Returns void