HuggingfaceClient.Inference.TaskRunner (huggingface_client v0.1.0)

Copy Markdown View Source

Shared run/stream/resolve_provider logic used by all inference task modules.

Summary

Functions

Executes a non-streaming inference task.

Executes a streaming inference task.

Functions

run(client, args, task)

@spec run(HuggingfaceClient.Client.t(), map(), String.t()) ::
  {:ok, map()} | {:error, Exception.t()}

Executes a non-streaming inference task.

stream(client, args, task)

@spec stream(HuggingfaceClient.Client.t(), map(), String.t()) ::
  {:ok, Enumerable.t()} | {:error, Exception.t()}

Executes a streaming inference task.