Files
fil/packages/java/dev/kreuzberg/IEmbeddingBackend.java

29 lines
712 B
Java
Raw Normal View History

2026-06-01 23:40:55 +02:00
package dev.kreuzberg;
import java.util.List;
/**
* Bridge interface for the EmbeddingBackend plugin system.
*
* Implementations are wrapped by EmbeddingBackendBridge and exposed to the native
* runtime through Panama FFM upcall stubs.
*/
public interface IEmbeddingBackend {
/** Plugin name (used for registry keying). */
String name();
/** Plugin version. */
String version();
/** Initialize the plugin. */
default void initialize() throws Exception {}
/** Shut down the plugin. */
default void shutdown() throws Exception {}
/** dimensions. */ long dimensions() throws Exception;
/** embed. */ List<List<Float>> embed(List<String> texts) throws Exception;
}