Package com.google.genkit.plugins.milvus
Class MilvusPlugin
java.lang.Object
com.google.genkit.plugins.milvus.MilvusPlugin
- All Implemented Interfaces:
Plugin
Milvus vector database plugin for Genkit.
Registers a retriever and indexer named milvus/<collectionName> for each configured
collection, talking to a Milvus server over its v2 REST API.
Example usage:
Genkit genkit = Genkit.builder()
.plugin(GoogleGenAIPlugin.create(apiKey))
.plugin(
MilvusPlugin.builder()
.url("http://localhost:19530")
.addCollection(
MilvusCollectionConfig.builder()
.collectionName("films")
.embedderName("googleai/gemini-embedding-001")
.build())
.build())
.build();
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic MilvusPlugin.Builderbuilder()Creates a new builder.getName()Returns the unique identifier for the plugin.init()Initializes the plugin.Initializes the plugin with access to the registry.
-
Field Details
-
PLUGIN_NAME
The plugin name; used as themilvus/...action prefix.- See Also:
-
DEFAULT_URL
Default Milvus server URL.- See Also:
-
-
Method Details
-
builder
Creates a new builder.- Returns:
- a new builder
-
getName
Description copied from interface:PluginReturns the unique identifier for the plugin. This name is used for registration and lookup. -
init
Description copied from interface:PluginInitializes the plugin. This method is called once during Genkit initialization. The plugin should return a list of actions that it provides. -
init
Description copied from interface:PluginInitializes the plugin with access to the registry. This method is called once during Genkit initialization. The plugin should return a list of actions that it provides.Override this method instead of
Plugin.init()when your plugin needs to resolve dependencies from the registry (e.g., embedders, models).
-