# Class Embedding

java.lang.Object
com.codename1.ai.Embedding

public final class Embedding extends Object
A single embedding vector. `index` matches the position of the corresponding input string in the original request.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Embedding(float[] vector, int index)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getDimensions()`
  `int`
  `getIndex()`
  `float[]`
  `getVector()`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Embedding

    public Embedding(float[] vector, int index)

- ## Method Details

  - ### getVector

    public float[] getVector()

  - ### getIndex

    public int getIndex()

  - ### getDimensions

    public int getDimensions()