Context
The Go client defines separate interfaces for sparse and multimodal embedding functions, beyond the standard dense EmbeddingFunction. The Java client only has the basic EmbeddingFunction interface.
Missing interfaces
SparseEmbeddingFunction
public interface SparseEmbeddingFunction {
List<SparseVector> embedDocuments(List<String> texts);
SparseVector embedQuery(String text);
String name();
}
public final class SparseVector {
private final int[] indices;
private final float[] values;
}
Providers: BM25, Chroma Cloud Splade
MultimodalEmbeddingFunction
public interface MultimodalEmbeddingFunction extends EmbeddingFunction {
List<float[]> embedImages(List<ImageInput> images);
float[] embedImage(ImageInput image);
}
public final class ImageInput {
public static ImageInput fromBase64(String base64) { ... }
public static ImageInput fromUrl(String url) { ... }
public static ImageInput fromFile(Path path) { ... }
}
Providers: Roboflow CLIP
Reference
- Go client:
SparseEmbeddingFunction, MultimodalEmbeddingFunction interfaces
- Go sparse:
bm25, chromacloudsplade packages
- Go multimodal:
roboflow package
Context
The Go client defines separate interfaces for sparse and multimodal embedding functions, beyond the standard dense
EmbeddingFunction. The Java client only has the basicEmbeddingFunctioninterface.Missing interfaces
SparseEmbeddingFunction
Providers: BM25, Chroma Cloud Splade
MultimodalEmbeddingFunction
Providers: Roboflow CLIP
Reference
SparseEmbeddingFunction,MultimodalEmbeddingFunctioninterfacesbm25,chromacloudspladepackagesroboflowpackage