Sycophant.EmbeddingRequest (sycophant v0.5.0)

Copy Markdown

Input struct for embedding requests.

Each element in inputs produces one embedding vector. Elements can be plain text strings, image content parts, or mixed lists.

Examples

# Text embeddings
%Sycophant.EmbeddingRequest{
  inputs: ["Hello world", "Goodbye world"],
  model: "amazon_bedrock:cohere.embed-english-v3"
}

# With parameters
%Sycophant.EmbeddingRequest{
  inputs: ["Hello world"],
  model: "amazon_bedrock:cohere.embed-english-v3",
  params: %Sycophant.EmbeddingParams{dimensions: 256, embedding_types: [:float, :int8]}
}

Summary

Types

input()

t()

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

Functions

t()