Facade for semantic model inference.
The facade accepts an Inference.Client and either prompt text, message
lists, or an Inference.Request. Provider-specific behavior stays behind the
configured adapter module.
Summary
Functions
Builds a client.
Builds a client or raises when invalid.
Runs a completion through the configured adapter.
Starts a streaming completion when the adapter supports it.
Functions
@spec client(keyword() | map()) :: {:ok, Inference.Client.t()} | {:error, Inference.Error.t()}
Builds a client.
@spec client!(keyword() | map()) :: Inference.Client.t()
Builds a client or raises when invalid.
@spec complete( Inference.Client.t(), Inference.Request.input() | Inference.Request.t(), keyword() ) :: {:ok, Inference.Response.t()} | {:error, Inference.Error.t()}
Runs a completion through the configured adapter.
@spec stream( Inference.Client.t(), Inference.Request.input() | Inference.Request.t(), keyword() ) :: {:ok, Enumerable.t()} | {:error, Inference.Error.t()}
Starts a streaming completion when the adapter supports it.