Arcanum.Gateway (arcanum v0.1.10)

Copy Markdown View Source

Single entry point for all inference calls.

Pipeline: auth → profile resolution → adapter → normalizer.

Callers never touch adapters, profiles, or normalizers directly.

Options

All public functions accept an opts keyword list:

  • :adapter — override the adapter module (testing)
  • :profile_overrides — map of ModelProfile fields (highest priority)

Summary

Functions

Synchronous chat completion.

Generates embeddings for the given text input.

Generates images via the provider's image generation API.

Generates videos via the provider's video generation API.

Lists available models from the provider.

Streaming chat completion.

Functions

chat(provider, intent, opts \\ [])

@spec chat(map(), Arcanum.Intent.t(), keyword()) ::
  {:ok, Arcanum.Response.t()} | {:error, term()}

Synchronous chat completion.

embed(provider, model, input)

@spec embed(map(), String.t(), String.t()) :: {:ok, [float()]} | {:error, term()}

Generates embeddings for the given text input.

generate_image(provider, intent, opts \\ [])

@spec generate_image(map(), Arcanum.Intent.t(), keyword()) ::
  {:ok, Arcanum.Response.t()} | {:error, term()}

Generates images via the provider's image generation API.

generate_video(provider, intent, opts \\ [])

@spec generate_video(map(), Arcanum.Intent.t(), keyword()) ::
  {:ok, Arcanum.Response.t()} | {:error, term()}

Generates videos via the provider's video generation API.

list_models(provider)

@spec list_models(map()) :: {:ok, [String.t()]} | {:error, term()}

Lists available models from the provider.

stream(provider, intent, opts \\ [])

@spec stream(map(), Arcanum.Intent.t(), keyword()) ::
  {:ok, Enumerable.t()} | {:error, term()}

Streaming chat completion.