Uses of Class
com.google.genkit.core.GenkitException
Packages that use GenkitException
Package
Description
Provides session management for multi-turn agent conversations with
persistence.
Telemetry module for Genkit Java SDK.
Middleware support for Genkit Java.
Firestore vector search retriever and indexer components.
Weaviate plugin for Genkit providing vector database integration for RAG
workflows.
-
Uses of GenkitException in com.google.genkit
Methods in com.google.genkit that throw GenkitExceptionModifier and TypeMethodDescriptionGenerates a structured output from the model with a simple prompt.<T> TGenkit.generate(GenerateOptions options) Generates a model response using the specified options.Generates a model response with a simple prompt.<T> TGenkit.generateObject(GenerateOptions options) Generates a structured output from the model, returning a typed object.<T> TGenkit.generateObject(GenerateOptions<?> options, Class<T> outputClass) Generates a structured output from the model, returning a typed object.<T> TGenkit.generateObject(String modelName, String prompt, Class<T> outputClass) Generates a structured output from the model with a simple prompt.Genkit.generateStream(GenerateOptions<?> options, Consumer<ModelResponseChunk> streamCallback) Generates a streaming model response using the specified options.voidIndexes documents using the specified indexer.Loads a prompt by name using a Map as input type.<I> ExecutablePrompt<I> Loads a prompt by name from the prompts directory.<I> ExecutablePrompt<I> Loads a prompt by name with an optional variant.Retrieves documents using a Document as the query.Retrieves documents using the specified retriever.Genkit.retrieve(String retrieverName, String query, RetrieverRequest.RetrieverOptions options) Retrieves documents using the specified retriever with options.<I,O> O Runs a flow by name. -
Uses of GenkitException in com.google.genkit.ai
Methods in com.google.genkit.ai that throw GenkitExceptionModifier 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) -
Uses of GenkitException in com.google.genkit.ai.evaluation
Methods in com.google.genkit.ai.evaluation that throw GenkitExceptionModifier 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 GenkitException in com.google.genkit.ai.session
Subclasses of GenkitException in com.google.genkit.ai.sessionModifier and TypeClassDescriptionstatic classException thrown when session operations fail.Methods in com.google.genkit.ai.session that throw GenkitExceptionModifier and TypeMethodDescriptionSends a message and gets a response.Chat.send(Message message, Chat.SendOptions sendOptions) Sends a message with send options and gets a response.Sends a message and gets a response.Chat.send(String text, Chat.SendOptions sendOptions) Sends a message with send options and gets a response.Chat.sendStream(Message message, Chat.SendOptions sendOptions, Consumer<ModelResponseChunk> streamCallback) Sends a message with streaming response.Chat.sendStream(String text, Consumer<ModelResponseChunk> streamCallback) Sends a message with streaming response. -
Uses of GenkitException in com.google.genkit.ai.telemetry
Methods in com.google.genkit.ai.telemetry that throw GenkitExceptionModifier and TypeMethodDescriptionModelTelemetryHelper.ModelExecutor.execute(ModelRequest request) Executes the model with the given request.ModelTelemetryHelper.StreamingModelExecutor.execute(ModelRequest request) Executes the model with the given request (streaming mode).static ModelResponseModelTelemetryHelper.runWithTelemetry(String modelName, String featureName, String path, ModelRequest request, ModelTelemetryHelper.ModelExecutor modelFn) Executes a model call with automatic telemetry recording.static ModelResponseModelTelemetryHelper.runWithTelemetryStreaming(String modelName, String featureName, String path, ModelRequest request, ModelTelemetryHelper.StreamingModelExecutor modelFn) Executes a streaming model call with automatic telemetry recording. -
Uses of GenkitException in com.google.genkit.core
Methods in com.google.genkit.core that return GenkitExceptionMethods in com.google.genkit.core that throw GenkitExceptionModifier and TypeMethodDescriptionActionDef.ActionFunction.apply(ActionContext ctx, I input) ActionDef.StreamingFunction.apply(ActionContext ctx, I input, Consumer<S> streamCallback) static <T> TConverts an object to the specified type.static <T> TParses a JSON string to the specified type.static <T> TJsonUtils.fromJsonNode(com.fasterxml.jackson.databind.JsonNode node, Class<T> clazz) Converts a JsonNode to the specified type.static com.fasterxml.jackson.databind.JsonNodeParses a JSON string to a JsonNode.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) static StringConverts an object to JSON string.static StringJsonUtils.toPrettyJson(Object value) Pretty prints a JSON object. -
Uses of GenkitException in com.google.genkit.core.middleware
Method parameters in com.google.genkit.core.middleware with type arguments of type GenkitExceptionModifier and TypeMethodDescriptionstatic <I,O> Middleware <I, O> CommonMiddleware.errorHandler(Function<GenkitException, O> errorHandler) Creates an error handling middleware that catches and transforms exceptions.static <I,O> Middleware <I, O> CommonMiddleware.retry(int maxRetries, long initialDelayMs, Function<GenkitException, Boolean> shouldRetry) Creates a retry middleware with exponential backoff and custom retry predicate.Methods in com.google.genkit.core.middleware that throw GenkitExceptionModifier 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. -
Uses of GenkitException in com.google.genkit.core.tracing
Methods in com.google.genkit.core.tracing that throw GenkitExceptionModifier 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 GenkitException in com.google.genkit.plugins.firebase.retriever
Methods in com.google.genkit.plugins.firebase.retriever that throw GenkitExceptionModifier and TypeMethodDescriptionvoidFirestoreVectorStore.ensureDatabaseExists()Ensures the Firestore database exists, creating it if configured to do so.voidFirestoreVectorStore.ensureVectorIndexExists()Ensures the Firestore vector index exists, creating it if configured to do so.FirestoreVectorStore.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 GenkitException in com.google.genkit.plugins.localvec
Methods in com.google.genkit.plugins.localvec that throw GenkitExceptionModifier 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 GenkitException in com.google.genkit.plugins.mcp
Methods in com.google.genkit.plugins.mcp that throw GenkitExceptionModifier and TypeMethodDescriptionCalls an MCP tool directly.Calls an MCP tool directly.voidMCPClient.connect()Connects to the MCP server.MCPClient.getResources()Gets resources from the MCP server.MCPPlugin.getResources(String serverName) Gets resources from a specific MCP server.Gets tools from the MCP server as Genkit tools.Gets tools from a specific MCP server.MCPClient.readResource(String uri) Reads a resource by URI.MCPPlugin.readResource(String serverName, String uri) Reads a resource from an MCP server.voidMCPServer.start()Starts the MCP server with STDIO transport.voidMCPServer.start(io.modelcontextprotocol.spec.McpServerTransportProvider transportProvider) Starts the MCP server with a custom transport provider. -
Uses of GenkitException in com.google.genkit.plugins.weaviate
Methods in com.google.genkit.plugins.weaviate that throw GenkitExceptionModifier and TypeMethodDescriptionvoidWeaviateVectorStore.ensureCollectionExists()Ensures the Weaviate collection (class) exists, creating it if configured to do so.WeaviateVectorStore.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. -
Uses of GenkitException in com.google.genkit.prompt
Methods in com.google.genkit.prompt that throw GenkitExceptionModifier and TypeMethodDescriptionGenerates a response using this prompt with the given registry.DotPrompt.generate(Registry registry, I input, GenerateOptions options) Generates a response using this prompt with custom options.DotPrompt.generate(Registry registry, I input, GenerateOptions options, Consumer<ModelResponseChunk> streamCallback) Generates a response using this prompt with streaming.Generates a response using the default model specified in the prompt.<T> TExecutablePrompt.generate(I input, GenerateOptions options) Generates a response with custom options.<T> TGenerates a structured output using the default model specified in the prompt.ExecutablePrompt.GenerateFunction.generate(GenerateOptions<?> options) ExecutablePrompt.GenerateObjectFunction.generateObject(GenerateOptions<?> options, Class<?> outputClass) static <I> DotPrompt<I> DotPrompt.loadFromResource(String resourcePath) Loads a DotPrompt from a resource file.static voidDotPrompt.loadPartialFromResource(String resourcePath) Loads and registers a partial from a resource file.static <I> DotPrompt<I> Parses a DotPrompt from its string content.static voidDotPrompt.registerPartial(String name, String source) Registers a partial template that can be included in other prompts.Renders the prompt with the given input.Renders the prompt template without generating.ExecutablePrompt.stream(I input, GenerateOptions options, Consumer<ModelResponseChunk> streamCallback) Generates a response with streaming and custom options.ExecutablePrompt.stream(I input, Consumer<ModelResponseChunk> streamCallback) Generates a response with streaming.DotPrompt.toModelRequest(I input) Renders the prompt and creates a ModelRequest.ExecutablePrompt.toModelRequest(I input) Gets the ModelRequest that would be sent to the model.