Fixed it by using float[] type as per documentation and making sure there is a getter and setter for the float[] type specifically.
Previously I had a float[]-to-double[] getter and a double[]-to-float[] setter:
public double[] getEmbedding() {
double[] doubleEmbedding = new double[embedding.length];
for (int i = 0; i < embedding.length; i++) {
doubleEmbedding[i] = embedding[i];
}
return doubleEmbedding;
}
public void setEmbedding(double[] embedding) {
this.embedding = new float[embedding.length];
for (int i = 0; i < embedding.length; i++) {
this.embedding[i] = (float) embedding[i];
}
}
I kept those (because I'm using doubles in my app), but added:
public float[] getFloatEmbedding() {
return embedding;
}
public void setFloatEmbedding(float[] embedding) {
this.embedding = embedding;
}
Thanks for the help, John! (See comments)