Vibe.Model.Transport.WebSocketPool (vibe v0.2.3)

Copy Markdown View Source

Pools reusable ReqLLM Responses WebSocket sessions per Vibe session and model.

The cache is deliberately opt-in. Callers request a session only after provider options enable OpenAI Responses WebSocket reuse, and failures are reported to the caller so it can fall back to ordinary streaming or surface a provider error.

Summary

Types

key()

@type key() :: {String.t(), String.t()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

close_session(session_id)

@spec close_session(String.t()) :: :ok

get(model, request_opts, session_id)

@spec get(term(), keyword(), String.t()) :: {:ok, pid()} | {:error, term()}

start_link(opts \\ [])

@spec start_link(keyword()) :: GenServer.on_start()