Spectre.Inference.Profile (Spectre v0.3.0)

Copy Markdown View Source

Provider-neutral cognitive capability profile.

Summary

Functions

Returns whether this profile satisfies all hard request constraints.

Types

t()

@type t() :: %Spectre.Inference.Profile{
  context_window: pos_integer() | nil,
  cost_tier: :low | :medium | :high,
  fallback: [term()],
  id: term(),
  latency_tier: :low | :medium | :high,
  metadata: map(),
  model: term(),
  privacy: :local | :private_cloud | :cloud,
  profile_hash: String.t() | nil,
  rank: integer(),
  supports: MapSet.t(atom())
}

Functions

compatible?(profile, request, profiles)

@spec compatible?(t(), Spectre.Inference.Request.t(), [t()]) :: boolean()

Returns whether this profile satisfies all hard request constraints.

hash(profile)

@spec hash(t()) :: String.t()

new(profile)

@spec new(t() | map() | keyword()) :: t()