Package dev.langchain4j.internal
package dev.langchain4j.internal
-
ClassDescriptionFactory for the "not implemented" result of an asynchronous / reactive SPI default method.Propagates cancellation from a single caller-facing "root" future to every downstream future produced while composing an asynchronous, possibly fan-out, pipeline (e.g. the RAG graph: transform → route → retrieve over many queries × retrievers).Utility methods for working with
CompletableFuture.Holds theInvocationContext.invocationId()of the AI Service invocation that is doing its own work on the current thread (for example running a tool, a guardrail, retrieval or thechatRequestTransformer), so that an AI Service invoked by that work can record it as its parent invocation.Utility class to guess the mime-type of a file from its path or URI.Converts chat messages into the input of aDecisionModel, the same way for all components that use one.A conversation as one map per message, and the contents other than text it refers to, in order.Resolves theExecutorthat LangChain4j uses to offload blocking work and run its asynchronous continuations.Utility methods for creating common exceptions.Wraps the handler an AI Service passes to its streaming chat model, so that the handler runs without the current invocation, also when the model calls it on the thread of the call, during the call.Annotation to mark methods where JaCoCo coverage should be ignored.JSON helper class.The abstract JSON codec interface.Converts betweenJsonSchemaElementand JSON SchemaMaprepresentation with round-trip fidelity.DelegatingStreamingChatResponseHandlerthat records whether the underlying handler received any typed, user-facing callback (partial response/thinking/tool call, complete tool call, complete response or error) while processing a single provider streaming event - i.e. whether the event was mapped to a typed callback.Adds the listeners of theObservabilityListenersProviders found withServiceLoaderto AI Services and to model calls.Detection and naming for polymorphic base types — sealed interfaces / classes (no annotations needed) and types annotated with Jackson'sJsonSubTypes.Entry point for the JSON codec used by provider wire DTOs.Describes how a provider's wire DTOs are mapped to JSON, in terms that carry no dependency on a particular JSON library.Which property values are written.How Java property names are translated to JSON field names.Utility class for retrying actions.This class encapsulates a retry policy.This class encapsulates a retry policy builder.Hides credentials in what LangChain4j writes to logs and exception messages.Entry point for the JSON codec used where values are not known ahead of time and their types have to be written into the document.Internal helper that helps to build partial and complete tool calls during streaming.Handles JSON serialization and deserialization ofToolSpecification.Decides which types may be instantiated while reading JSON that carries type information.BuildsTypeinstances for generic types, so that a caller can ask aJson.JsonCodecfor aList<Foo>without a JSON library's type token.Utility class for URI operations.Utility methods.Utility class for validating method arguments.Utility class for working with virtual threads introduced in Java 21.