Class AwsBedrockEmbedder
java.lang.Object
com.google.genkit.ai.Embedder
com.google.genkit.plugins.awsbedrock.AwsBedrockEmbedder
- All Implemented Interfaces:
Action<EmbedRequest,,EmbedResponse, Void> Registerable
AWS Bedrock embedder implementation for Genkit.
Uses the AWS Bedrock InvokeModel API (via HTTP with AWS SigV4 signing) to generate
embeddings. Handles the differing request/response shapes of Amazon Titan Text Embeddings and
Cohere Embed models.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.genkit.ai.Embedder
Embedder.Builder -
Constructor Summary
ConstructorsConstructorDescriptionAwsBedrockEmbedder(String modelId, AwsBedrockPluginOptions options) Creates a new AwsBedrockEmbedder. -
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
-
AwsBedrockEmbedder
Creates a new AwsBedrockEmbedder.- Parameters:
modelId- the Bedrock embedding model ID (e.g., "amazon.titan-embed-text-v2:0")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
-