This commit is contained in:
28
packages/java/dev/kreuzberg/IEmbeddingBackend.java
generated
Normal file
28
packages/java/dev/kreuzberg/IEmbeddingBackend.java
generated
Normal file
@@ -0,0 +1,28 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user