PtcRunner.LLM.PreparedModel (PtcRunner v0.14.0)

Copy Markdown View Source

Immutable result of preparing a configured LLM selector.

The value binds the adapter, original selector, adapter-owned request target, and catalog status. Hosts may pass it to PtcRunner.LLM.callback/2 to avoid repeating adapter preparation; the target remains opaque to the host.

Summary

Types

catalog_status()

@type catalog_status() :: :cataloged | :uncataloged | :unavailable

t()

@type t() :: %PtcRunner.LLM.PreparedModel{
  adapter: module(),
  catalog_status: catalog_status(),
  selector: String.t(),
  target: term()
}

Functions

new(adapter, selector, target, catalog_status)

@spec new(module(), String.t(), term(), catalog_status()) ::
  {:ok, t()} | {:error, :invalid_prepared_model}

valid?(prepared)

@spec valid?(term()) :: boolean()