Class GeminiEmbedder
java.lang.Object
com.google.genkit.ai.Embedder
com.google.genkit.plugins.googlegenai.GeminiEmbedder
- All Implemented Interfaces:
Action<EmbedRequest,,EmbedResponse, Void> Registerable
Gemini embedder implementation using the official Google GenAI SDK.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.genkit.ai.Embedder
Embedder.Builder -
Constructor Summary
ConstructorsConstructorDescriptionGeminiEmbedder(String modelName, GoogleGenAIPluginOptions options) Creates a new GeminiEmbedder. -
Method Summary
Modifier and TypeMethodDescriptionrun(ActionContext context, EmbedRequest request) Runs the action with the given input.Methods inherited from class com.google.genkit.ai.Embedder
builder, getDesc, getInfo, getInputSchema, getMetadata, getName, getOutputSchema, getType, register, run, runJson, runJsonWithTelemetry
-
Constructor Details
-
GeminiEmbedder
Creates a new GeminiEmbedder.- Parameters:
modelName- the embedding model name (e.g., "text-embedding-004", "gemini-embedding-001")options- the plugin options
-
-
Method Details
-
run
Description copied from interface:ActionRuns the action with the given input.- Specified by:
runin interfaceAction<EmbedRequest,EmbedResponse, Void> - Overrides:
runin classEmbedder- Parameters:
context- the action contextrequest- the input to the action- Returns:
- the output of the action
-