Sycophant.EmbeddingParams (sycophant v0.4.2)

Copy Markdown

Canonical embedding parameters with Zoi validation.

All fields are optional. Wire protocol adapters translate these into provider-specific parameter names and value formats.

Supported Parameters

  • :dimensions - Desired output vector dimensionality (positive integer)
  • :embedding_types - List of output types (:float, :int8, :uint8, :binary, :ubinary). Defaults to [:float]
  • :truncate - Truncation strategy (:none, :left, :right). Defaults to :none
  • :max_tokens - Maximum tokens to embed per input (positive integer)

Summary

Functions

Deserializes embedding params from a plain map.

t()

Types

t()

@type t() :: %Sycophant.EmbeddingParams{
  dimensions: nil | integer(),
  embedding_types: [:float | :int8 | :uint8 | :binary | :ubinary],
  max_tokens: nil | integer(),
  truncate: :none | :left | :right
}

Functions

from_map(data)

@spec from_map(map()) :: t()

Deserializes embedding params from a plain map.

t()