Package ai.velr

Class VectorEmbeddingInput

java.lang.Object
ai.velr.VectorEmbeddingInput

public final class VectorEmbeddingInput extends Object
One source row or query payload passed to a registered vector embedding callback.

For index maintenance, inputs describe graph entities and their indexed source fields. For vector queries, inputs describe the query payload that must be embedded before search.

  • Method Details

    • indexName

      public String indexName()
      Return the vector index name requesting the embedding.
      Returns:
      vector index name
    • dimensions

      public int dimensions()
      Return the number of dimensions the embedder must produce.
      Returns:
      required vector dimension count
    • purpose

      public VectorEmbeddingPurpose purpose()
      Return why Velr is requesting this embedding.
      Returns:
      embedding purpose
    • entityKind

      public VectorEntityKind entityKind()
      Return the graph entity kind for index-maintenance inputs.

      Query inputs do not represent a stored graph entity and return null.

      Returns:
      entity kind, or null for query inputs
    • entityId

      public Long entityId()
      Return the graph entity identifier for index-maintenance inputs.

      Query inputs do not represent a stored graph entity and return null.

      Returns:
      entity id, or null for query inputs
    • fields

      public List<VectorEmbeddingField> fields()
      Fields in the index source order. For query text, Velr passes one unnamed string field.
      Returns:
      immutable input fields
    • text

      public String text()
      Join field display strings with newlines.

      This helper is convenient for text embedding models when the desired input text is simply the display rendering of each source field.

      Returns:
      joined display text