Uses of Class
com.google.genkit.core.ActionContext
Packages that use ActionContext
Package
Description
Middleware support for Genkit Java.
Firestore vector search retriever and indexer components.
Pinecone plugin for Genkit providing vector database integration.
PostgreSQL plugin for Genkit providing vector database integration using
pgvector extension.
Weaviate plugin for Genkit providing vector database integration for RAG
workflows.
-
Uses of ActionContext in com.google.genkit
Method parameters in com.google.genkit with type arguments of type ActionContextModifier and TypeMethodDescriptionGenkit.defineFlow(String name, Class<I> inputClass, Class<O> outputClass, BiFunction<ActionContext, I, O> handler) Defines a flow.Genkit.defineFlow(String name, Class<I> inputClass, Class<O> outputClass, BiFunction<ActionContext, I, O> handler, List<Middleware<I, O>> middleware) Defines a flow with middleware.Genkit.defineIndexer(String name, BiFunction<ActionContext, IndexerRequest, IndexerResponse> handler) Defines and registers an indexer.<I> Prompt<I> Genkit.definePrompt(String name, String template, Class<I> inputClass, BiFunction<ActionContext, I, ModelRequest> renderer) Defines a prompt.Genkit.defineRetriever(String name, BiFunction<ActionContext, RetrieverRequest, RetrieverResponse> handler) Defines and registers a retriever.<I,O> Tool <I, O> Genkit.defineTool(String name, String description, BiFunction<ActionContext, I, O> handler, Class<I> inputClass, Class<O> outputClass) Defines a tool with typed input and output classes.<I,O> Tool <I, O> Genkit.defineTool(String name, String description, Map<String, Object> inputSchema, Class<I> inputClass, BiFunction<ActionContext, I, O> handler) Defines a tool. -
Uses of ActionContext in com.google.genkit.ai
Methods in com.google.genkit.ai with parameters of type ActionContextModifier and TypeMethodDescriptionEmbedder.run(ActionContext ctx, EmbedRequest input) Embedder.run(ActionContext ctx, EmbedRequest input, Consumer<Void> streamCallback) GenerateAction.run(ActionContext ctx, GenerateAction.GenerateActionOptions options) GenerateAction.run(ActionContext ctx, GenerateAction.GenerateActionOptions options, Consumer<ModelResponseChunk> streamCallback) Indexer.run(ActionContext ctx, IndexerRequest input) Indexer.run(ActionContext ctx, IndexerRequest input, Consumer<Void> streamCallback) Model.run(ActionContext ctx, ModelRequest request) Generates a response from the given request.default ModelResponseModel.run(ActionContext ctx, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) Generates a streaming response from the given request.Prompt.run(ActionContext ctx, I input) Prompt.run(ActionContext ctx, I input, Consumer<Void> streamCallback) Retriever.run(ActionContext ctx, RetrieverRequest input) Retriever.run(ActionContext ctx, RetrieverRequest input, Consumer<Void> streamCallback) Tool.run(ActionContext ctx, I input) Tool.run(ActionContext ctx, I input, Consumer<Void> streamCallback) com.fasterxml.jackson.databind.JsonNodeEmbedder.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) com.fasterxml.jackson.databind.JsonNodeGenerateAction.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) com.fasterxml.jackson.databind.JsonNodeIndexer.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) default com.fasterxml.jackson.databind.JsonNodeModel.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) com.fasterxml.jackson.databind.JsonNodePrompt.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) com.fasterxml.jackson.databind.JsonNodeRetriever.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) com.fasterxml.jackson.databind.JsonNodeTool.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Embedder.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> GenerateAction.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Indexer.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) default ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Model.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Prompt.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Retriever.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Tool.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) Method parameters in com.google.genkit.ai with type arguments of type ActionContextModifier and TypeMethodDescriptionEmbedder.Builder.handler(BiFunction<ActionContext, EmbedRequest, EmbedResponse> handler) Indexer.Builder.handler(BiFunction<ActionContext, IndexerRequest, IndexerResponse> handler) Retriever.Builder.handler(BiFunction<ActionContext, RetrieverRequest, RetrieverResponse> handler) Tool.Builder.handler(BiFunction<ActionContext, I, O> handler) Prompt.Builder.renderer(BiFunction<ActionContext, I, ModelRequest> renderer) Constructor parameters in com.google.genkit.ai with type arguments of type ActionContextModifierConstructorDescriptionEmbedder(String name, EmbedderInfo info, BiFunction<ActionContext, EmbedRequest, EmbedResponse> handler) Creates a new Embedder.Indexer(String name, BiFunction<ActionContext, IndexerRequest, IndexerResponse> handler) Creates a new Indexer.Prompt(String name, String model, String template, Map<String, Object> inputSchema, GenerationConfig config, Class<I> inputClass, BiFunction<ActionContext, I, ModelRequest> renderer) Creates a new Prompt.Retriever(String name, BiFunction<ActionContext, RetrieverRequest, RetrieverResponse> handler) Creates a new Retriever.Tool(String name, String description, Map<String, Object> inputSchema, Map<String, Object> outputSchema, Class<I> inputClass, BiFunction<ActionContext, I, O> handler) Creates a new Tool. -
Uses of ActionContext in com.google.genkit.ai.evaluation
Methods in com.google.genkit.ai.evaluation with parameters of type ActionContextModifier and TypeMethodDescriptionEvaluator.run(ActionContext ctx, EvalRequest input) Evaluator.run(ActionContext ctx, EvalRequest input, Consumer<Void> streamCallback) com.fasterxml.jackson.databind.JsonNodeEvaluator.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Evaluator.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) -
Uses of ActionContext in com.google.genkit.core
Methods in com.google.genkit.core that return ActionContextModifier and TypeMethodDescriptionActionContext.Builder.build()ActionContext.withFlowName(String flowName) Creates a new ActionContext with a different flow name.ActionContext.withSessionId(String sessionId) Creates a new ActionContext with a session ID.ActionContext.withSpanContext(SpanContext spanContext) Creates a new ActionContext with a different span context.ActionContext.withSpanPath(String spanPath) Creates a new ActionContext with a different span path.ActionContext.withThreadName(String threadName) Creates a new ActionContext with a thread name.Methods in com.google.genkit.core with parameters of type ActionContextModifier and TypeMethodDescriptionActionDef.ActionFunction.apply(ActionContext ctx, I input) ActionDef.StreamingFunction.apply(ActionContext ctx, I input, Consumer<S> streamCallback) Action.run(ActionContext ctx, I input) Runs the action with the given input.Action.run(ActionContext ctx, I input, Consumer<S> streamCallback) Runs the action with the given input and streaming callback.ActionDef.run(ActionContext ctx, I input) ActionDef.run(ActionContext ctx, I input, Consumer<S> streamCallback) Flow.run(ActionContext ctx, I input) Flow.run(ActionContext ctx, I input, Consumer<S> streamCallback) static <T> TFlow.run(ActionContext ctx, String name, Function<Void, T> fn) Runs a named step within the current flow.com.fasterxml.jackson.databind.JsonNodeAction.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) Runs the action with JSON input and returns JSON output.com.fasterxml.jackson.databind.JsonNodeActionDef.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) com.fasterxml.jackson.databind.JsonNodeFlow.runJson(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Action.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) Runs the action with JSON input and returns the result with telemetry information.ActionRunResult<com.fasterxml.jackson.databind.JsonNode> ActionDef.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) ActionRunResult<com.fasterxml.jackson.databind.JsonNode> Flow.runJsonWithTelemetry(ActionContext ctx, com.fasterxml.jackson.databind.JsonNode input, Consumer<com.fasterxml.jackson.databind.JsonNode> streamCallback) voidFlow.stream(ActionContext ctx, I input, Consumer<Flow.StreamingFlowValue<O, S>> consumer) Streams the flow output with the given input.Method parameters in com.google.genkit.core with type arguments of type ActionContextModifier and TypeMethodDescriptionFlow.define(Registry registry, String name, Class<I> inputClass, Class<O> outputClass, BiFunction<ActionContext, I, O> fn) Defines a new non-streaming flow and registers it.Flow.define(Registry registry, String name, Class<I> inputClass, Class<O> outputClass, BiFunction<ActionContext, I, O> fn, List<Middleware<I, O>> middleware) Defines a new non-streaming flow with middleware and registers it. -
Uses of ActionContext in com.google.genkit.core.middleware
Methods in com.google.genkit.core.middleware with parameters of type ActionContextModifier and TypeMethodDescriptionMiddlewareNext.apply(I request, ActionContext context) Calls the next middleware in the chain or the actual action.MiddlewareChain.execute(I request, ActionContext context, BiFunction<ActionContext, I, O> finalAction) Executes the middleware chain with the given request, context, and final action.Middleware.handle(I request, ActionContext context, MiddlewareNext<I, O> next) Processes the request through this middleware.Method parameters in com.google.genkit.core.middleware with type arguments of type ActionContextModifier and TypeMethodDescriptionstatic <I,O> Middleware <I, O> CommonMiddleware.beforeAfter(BiConsumer<I, ActionContext> before, BiConsumer<O, ActionContext> after) Creates a before/after middleware that runs callbacks before and after execution.static <I,O> Middleware <I, O> CommonMiddleware.conditional(BiPredicate<I, ActionContext> predicate, Middleware<I, O> middleware) Creates a conditional middleware that only applies if the predicate is true.MiddlewareChain.execute(I request, ActionContext context, BiFunction<ActionContext, I, O> finalAction) Executes the middleware chain with the given request, context, and final action. -
Uses of ActionContext in com.google.genkit.core.tracing
Methods in com.google.genkit.core.tracing with parameters of type ActionContextModifier and TypeMethodDescriptionstatic <I,O> O Tracer.runInNewSpan(ActionContext ctx, SpanMetadata metadata, I input, BiFunction<SpanContext, I, O> fn) Runs a function within a new tracing span. -
Uses of ActionContext in com.google.genkit.plugins.anthropic
Methods in com.google.genkit.plugins.anthropic with parameters of type ActionContextModifier and TypeMethodDescriptionAnthropicModel.run(ActionContext context, ModelRequest request) AnthropicModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) -
Uses of ActionContext in com.google.genkit.plugins.awsbedrock
Methods in com.google.genkit.plugins.awsbedrock with parameters of type ActionContextModifier and TypeMethodDescriptionAwsBedrockModel.run(ActionContext context, ModelRequest request) AwsBedrockModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) -
Uses of ActionContext in com.google.genkit.plugins.compatoai
Methods in com.google.genkit.plugins.compatoai with parameters of type ActionContextModifier and TypeMethodDescriptionCompatOAIModel.run(ActionContext context, ModelRequest request) CompatOAIModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) -
Uses of ActionContext in com.google.genkit.plugins.firebase.retriever
Methods in com.google.genkit.plugins.firebase.retriever with parameters of type ActionContextModifier and TypeMethodDescriptionFirestoreVectorStore.index(ActionContext ctx, IndexerRequest request) Indexes documents into Firestore with their embeddings.FirestoreVectorStore.retrieve(ActionContext ctx, RetrieverRequest request) Retrieves documents from Firestore using vector similarity search. -
Uses of ActionContext in com.google.genkit.plugins.googlegenai
Methods in com.google.genkit.plugins.googlegenai with parameters of type ActionContextModifier and TypeMethodDescriptionGeminiEmbedder.run(ActionContext context, EmbedRequest request) GeminiModel.run(ActionContext context, ModelRequest request) GeminiModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) ImagenModel.run(ActionContext context, ModelRequest request) ImagenModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) TtsModel.run(ActionContext context, ModelRequest request) TtsModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) VeoModel.run(ActionContext context, ModelRequest request) VeoModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) -
Uses of ActionContext in com.google.genkit.plugins.localvec
Methods in com.google.genkit.plugins.localvec with parameters of type ActionContextModifier and TypeMethodDescriptionvoidLocalVecDocStore.index(ActionContext ctx, List<Document> documents) Indexes documents with their embeddings.LocalVecDocStore.retrieve(ActionContext ctx, RetrieverRequest request) Retrieves documents similar to the query. -
Uses of ActionContext in com.google.genkit.plugins.ollama
Methods in com.google.genkit.plugins.ollama with parameters of type ActionContextModifier and TypeMethodDescriptionOllamaModel.run(ActionContext context, ModelRequest request) OllamaModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) -
Uses of ActionContext in com.google.genkit.plugins.openai
Methods in com.google.genkit.plugins.openai with parameters of type ActionContextModifier and TypeMethodDescriptionOpenAIEmbedder.run(ActionContext context, EmbedRequest request) OpenAIImageModel.run(ActionContext context, ModelRequest request) OpenAIImageModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) OpenAIModel.run(ActionContext context, ModelRequest request) OpenAIModel.run(ActionContext context, ModelRequest request, Consumer<ModelResponseChunk> streamCallback) -
Uses of ActionContext in com.google.genkit.plugins.pinecone
Methods in com.google.genkit.plugins.pinecone with parameters of type ActionContextModifier and TypeMethodDescriptionPineconeVectorStore.index(ActionContext context, IndexerRequest request) Indexes documents into the vector store.PineconeVectorStore.retrieve(ActionContext context, RetrieverRequest request) Retrieves documents similar to the query. -
Uses of ActionContext in com.google.genkit.plugins.postgresql
Methods in com.google.genkit.plugins.postgresql with parameters of type ActionContextModifier and TypeMethodDescriptionPostgresVectorStore.index(ActionContext context, IndexerRequest request) Indexes documents into the vector store.PostgresVectorStore.retrieve(ActionContext context, RetrieverRequest request) Retrieves documents similar to the query. -
Uses of ActionContext in com.google.genkit.plugins.weaviate
Methods in com.google.genkit.plugins.weaviate with parameters of type ActionContextModifier and TypeMethodDescriptionWeaviateVectorStore.index(ActionContext ctx, IndexerRequest request) Indexes documents into Weaviate with their embeddings.WeaviateVectorStore.retrieve(ActionContext ctx, RetrieverRequest request) Retrieves documents from Weaviate using vector similarity search.