Uses of Annotation Interface
dev.langchain4j.Experimental
Packages that use Experimental
Package
Description
AWS Bedrock integration for LangChain4j.
Contains interfaces and classes for model catalog functionality.
Packages with annotations of type Experimental
Package
Description
-
Uses of Experimental in dev.langchain4j.agent.tool
Classes in dev.langchain4j.agent.tool with annotations of type ExperimentalModifier and TypeClassDescription@interfaceMarks a method as the compensating action for aTool.enumPer-tool setting controlling what happens with a tool's result after execution.enumDefines the behavior of a tool whendev.langchain4j.service.tool.search.ToolSearchStrategyis configured for an AI Service. -
Uses of Experimental in dev.langchain4j.data.message
Methods in dev.langchain4j.data.message with annotations of type ExperimentalModifier and TypeMethodDescription<T> TReturns additional attribute by it's key.<T> TReturns additional attribute by it's key.<T> TReturns additional attribute by it's key.AiMessage.attributes()Returns additional attributes, typically provider-specific.AiMessage.Builder.attributes(Map<String, Object> attributes) SystemMessage.attributes()Returns additional attributes.UserMessage.attributes()Returns additional attributes.Sets the contents of the tool execution result.Sets the contents of the tool execution result.ToolExecutionResultMessage.contents()Returns theContents of the tool execution result.booleanToolExecutionResultMessage.hasSingleText()Whether this message contains a singleTextContent.AiMessage.thinking()Get the thinking/reasoning text of the message. -
Uses of Experimental in dev.langchain4j.exception
Classes in dev.langchain4j.exception with annotations of type ExperimentalModifier and TypeClassDescriptionclassSignals that an asynchronous SPI method (an*Asyncmethod, or a reactivePublisher-returning method) is not implemented by a component, and is therefore the internal "this component is not genuinely asynchronous" marker carried by those methods'defaultimplementations. -
Uses of Experimental in dev.langchain4j.experimental.rag.content.retriever.sql
Classes in dev.langchain4j.experimental.rag.content.retriever.sql with annotations of type ExperimentalConstructors in dev.langchain4j.experimental.rag.content.retriever.sql with annotations of type ExperimentalModifierConstructorDescriptionSqlDatabaseContentRetriever(DataSource dataSource, String sqlDialect, String databaseStructure, PromptTemplate promptTemplate, ChatModel chatModel, Integer maxRetries) Creates an instance of aSqlDatabaseContentRetriever. -
Uses of Experimental in dev.langchain4j.guardrail
Methods in dev.langchain4j.guardrail with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<ChatResponse> ChatExecutor.executeAsync()Non-blocking counterpart ofChatExecutor.execute().default CompletableFuture<ChatResponse> ChatExecutor.executeAsync(List<ChatMessage> chatMessages) Non-blocking counterpart ofChatExecutor.execute(List).default CompletableFuture<R> Guardrail.validateAsync(P request) Non-blocking counterpart ofGuardrail.validate(GuardrailRequest), invoked by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service modes. -
Uses of Experimental in dev.langchain4j.http.client
Classes in dev.langchain4j.http.client with annotations of type ExperimentalMethods in dev.langchain4j.http.client with annotations of type ExperimentalModifier and TypeMethodDescriptionHttpRequest.Builder.addFormDataField(String name, String value) HttpRequest.Builder.addFormDataFile(String name, String fileName, String contentType, byte[] content) default CompletableFuture<SuccessfulHttpResponse> HttpClient.executeAsync(HttpRequest request) Non-blocking counterpart ofHttpClient.execute(HttpRequest).HttpRequest.Builder.formDataFields(Map<String, String> formDataFields) HttpRequest.formDataFields()HttpRequest.Builder.formDataFiles(Map<String, FormDataFile> formDataFiles) HttpRequest.formDataFiles()default Flow.Publisher<HttpStreamingEvent> HttpClient.stream(HttpRequest request) Executes a streaming HTTP request and exposes the parsed events as a coldFlow.PublisherofHttpStreamingEvents.default Flow.Publisher<HttpStreamingEvent> HttpClient.stream(HttpRequest request, ServerSentEventParser parser) LikeHttpClient.stream(HttpRequest), but with a caller-suppliedServerSentEventParser. -
Uses of Experimental in dev.langchain4j.http.client.apache
Methods in dev.langchain4j.http.client.apache with annotations of type ExperimentalModifier and TypeMethodDescriptionApacheHttpClientBuilder.streamingBufferSize()ApacheHttpClientBuilder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer used by the streaming (stream) path. -
Uses of Experimental in dev.langchain4j.http.client.jdk
Methods in dev.langchain4j.http.client.jdk with annotations of type ExperimentalModifier and TypeMethodDescriptionJdkHttpClientBuilder.streamingBufferSize()JdkHttpClientBuilder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer used by the streaming (stream) path. -
Uses of Experimental in dev.langchain4j.http.client.okhttp
Methods in dev.langchain4j.http.client.okhttp with annotations of type ExperimentalModifier and TypeMethodDescriptionOkHttpClientBuilder.streamingBufferSize()OkHttpClientBuilder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer used by the streaming (stream) path. -
Uses of Experimental in dev.langchain4j.http.client.sse
Classes in dev.langchain4j.http.client.sse with annotations of type ExperimentalModifier and TypeClassDescriptionclassHttpStreamingEventsignalling that the HTTP response head (status and headers) was received and the stream opened successfully.interfaceAn event emitted while consuming a streaming HTTP response viaHttpClient.stream(dev.langchain4j.http.client.HttpRequest).classinterfaceHandle that can be used to cancel the parsing of server-sent events.Methods in dev.langchain4j.http.client.sse with annotations of type ExperimentalModifier and TypeMethodDescriptionServerSentEventParser.incremental()Returns a freshServerSentEventParser.Incrementalparser instance backed by the same parsing logic asServerSentEventParser.parse(InputStream, ServerSentEventListener), but driven by byte chunks instead of a blockingInputStream.default voidServerSentEventListener.onEvent(ServerSentEvent event, ServerSentEventContext context) Handles server-sent event. -
Uses of Experimental in dev.langchain4j.mcp.client
Methods in dev.langchain4j.mcp.client with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<ToolExecutionResult> McpClient.executeToolAsync(ToolExecutionRequest executionRequest, InvocationContext invocationContext) Non-blocking counterpart ofMcpClient.executeTool(ToolExecutionRequest, InvocationContext): executes a tool on the MCP server without holding a thread while the result is in flight. -
Uses of Experimental in dev.langchain4j.memory
Methods in dev.langchain4j.memory with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<Void> ChatMemory.addAsync(List<ChatMessage> messages) Non-blocking counterpart ofChatMemory.add(Iterable), used by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service APIs.default CompletableFuture<List<ChatMessage>> ChatMemory.messagesAsync()Non-blocking counterpart ofChatMemory.messages(), used by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service APIs.default CompletableFuture<Void> ChatMemory.setAsync(List<ChatMessage> messages) Non-blocking counterpart ofChatMemory.set(Iterable), used by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service APIs (e.g. to rewrite memory for tool compensation without blocking the model-delivery thread). -
Uses of Experimental in dev.langchain4j.micrometer.metrics.listeners
Classes in dev.langchain4j.micrometer.metrics.listeners with annotations of type ExperimentalModifier and TypeClassDescriptionclassAChatModelListenerthat uses a MicrometerMeterRegistryto collect metrics about chat model interactions following OpenTelemetry Semantic Conventions for Generative AI. -
Uses of Experimental in dev.langchain4j.model.anthropic
Classes in dev.langchain4j.model.anthropic with annotations of type ExperimentalModifier and TypeClassDescriptionfinal classABatchChatModelfor the Anthropic Message Batches API, which processes multiple chat requests asynchronously at 50% of the standard per-token price.classResult of Anthropic's (beta) cache diagnostics comparison for a single request, surfaced viaAnthropicChatResponseMetadata.cacheDiagnostics().classclassRepresents a result from an Anthropic server-executed tool (e.g., web_search, code_execution).enumAnthropic-managed Agent Skills that let Claude generate real downloadable documents by running pre-built skills inside the code execution container.classMethods in dev.langchain4j.model.anthropic with annotations of type ExperimentalModifier and TypeMethodDescriptionAnthropicStreamingChatModel.AnthropicStreamingChatModelBuilder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer for the reactive (Flow.Publisher) streaming path. -
Uses of Experimental in dev.langchain4j.model.audio
Classes in dev.langchain4j.model.audio with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceA model that can transcribe audio into text.classRequest to transcribe audio.classResponse containing the transcription of an audio file.interfaceA model that can synthesize audio from text.classclassResponse containing the audio generated from text. -
Uses of Experimental in dev.langchain4j.model.azure
Classes in dev.langchain4j.model.azure with annotations of type ExperimentalModifier and TypeClassDescriptionclassRepresents an Azure OpenAI audio transcription model, such as Whisper. -
Uses of Experimental in dev.langchain4j.model.batch
Classes in dev.langchain4j.model.batch with annotations of type ExperimentalModifier and TypeClassDescriptionfinal classRepresents an error status for a failed request within a batch operation.interfaceRepresents the outcome of a single request within a batch operation.classBatchPage<T>Represents a set of batch jobs that is potentially paginated.final classclassBatchRequest<T>Represents a batch of requests to be processed together.classRepresents the responses of a batch operation.enumRepresents the possible states of a batch job. -
Uses of Experimental in dev.langchain4j.model.bedrock
Methods in dev.langchain4j.model.bedrock with annotations of type ExperimentalModifier and TypeMethodDescriptionBedrockChatModel.Builder.asyncClient(software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient asyncClient) Sets the async Bedrock client used bychatAsync.BedrockStreamingChatModel.Builder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer for the reactive (Flow.Publisher) streaming path. -
Uses of Experimental in dev.langchain4j.model.catalog
Classes in dev.langchain4j.model.catalog with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceRepresents a service that can discover available models from an LLM provider.classRepresents metadata about an available model from a provider.enumRepresents the type/category of a model. -
Uses of Experimental in dev.langchain4j.model.chat
Classes in dev.langchain4j.model.chat with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceA model interface for processing multiple chat requests asynchronously in a batch.Methods in dev.langchain4j.model.chat with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault Flow.Publisher<ChatModelStreamingEvent> StreamingChatModel.chat(ChatMessage... messages) Reactive convenience overload accepting the messages directly: returns a coldPublisherthat streams the response tomessages.default Flow.Publisher<ChatModelStreamingEvent> StreamingChatModel.chat(ChatRequest request) Reactive entry point: sends a chat request and returns aFlow.PublisherofChatModelStreamingEvents.default Flow.Publisher<String> Reactive convenience counterpart ofStreamingChatModel.chat(String, StreamingChatResponseHandler): returns a coldPublisherthat streams the model's textual response touserMessage, token by token.default Flow.Publisher<ChatModelStreamingEvent> StreamingChatModel.chat(List<ChatMessage> messages) Reactive convenience counterpart ofStreamingChatModel.chat(List, StreamingChatResponseHandler): returns a coldPublisherthat streams the response tomessages.default CompletableFuture<ChatResponse> ChatModel.chatAsync(ChatMessage... messages) Non-blocking convenience counterpart ofChatModel.chat(ChatMessage...).default CompletableFuture<ChatResponse> ChatModel.chatAsync(ChatRequest chatRequest) Non-blocking counterpart ofChatModel.chat(ChatRequest): sends a chat request and returns aCompletableFuturethat completes with theChatResponseonce the model responds.default CompletableFuture<ChatResponse> ChatModel.chatAsync(ChatRequest chatRequest, ChatRequestOptions options) Sends a non-blocking chat request with additional invocation options.default CompletableFuture<String> Non-blocking convenience counterpart ofChatModel.chat(String): completes with the text of the model's response.default CompletableFuture<ChatResponse> ChatModel.chatAsync(List<ChatMessage> messages) Non-blocking convenience counterpart ofChatModel.chat(List).default Flow.Publisher<ChatModelStreamingEvent> StreamingChatModel.doChat(ChatRequest chatRequest) Provider-specific implementation of the reactive stream returned byStreamingChatModel.chat(ChatRequest)(which wraps it withChatModelListenerinvocation).default CompletableFuture<ChatResponse> ChatModel.doChatAsync(ChatRequest chatRequest) SPI hook for a genuinely non-blocking chat implementation, invoked byChatModel.chatAsync(ChatRequest). -
Uses of Experimental in dev.langchain4j.model.chat.response
Classes in dev.langchain4j.model.chat.response with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceBase type for the events emitted by the reactive stream of aStreamingChatModel— theFlow.Publisher<ChatModelStreamingEvent>returned byStreamingChatModel.chat(dev.langchain4j.model.chat.request.ChatRequest).classThe terminalChatModelStreamingEventof a streaming chat: the complete, aggregatedChatResponse.classRepresents a complete tool call.classclassclassclassclassRepresents a partial tool call.classinterfaceA provider-specific streaming event that langchain4j's generic event model does not (yet) map to a dedicatedChatModelStreamingEventtype — for example a web-search, citation or reasoning-summary event.interfaceHandle that can be used to cancel the streaming done viaStreamingChatResponseHandler.Methods in dev.langchain4j.model.chat.response with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault voidStreamingChatResponseHandler.onCompleteToolCall(CompleteToolCall completeToolCall) Invoked when the model has finished streaming a single tool call.default voidStreamingChatResponseHandler.onPartialResponse(PartialResponse partialResponse, PartialResponseContext context) Invoked each time the model generates a partial textual response, usually a single token.default voidStreamingChatResponseHandler.onPartialThinking(PartialThinking partialThinking) Invoked each time the model generates a partial thinking/reasoning text, usually a single token.default voidStreamingChatResponseHandler.onPartialThinking(PartialThinking partialThinking, PartialThinkingContext context) Invoked each time the model generates a partial thinking/reasoning text, usually a single token.default voidStreamingChatResponseHandler.onPartialToolCall(PartialToolCall partialToolCall) This callback is invoked each time the model generates a partial tool call, which contains a single token of the tool's arguments.default voidStreamingChatResponseHandler.onPartialToolCall(PartialToolCall partialToolCall, PartialToolCallContext context) This callback is invoked each time the model generates a partial tool call, which contains a single token of the tool's arguments.default voidStreamingChatResponseHandler.onUnmappedRawEvent(Object rawEvent) Invoked when a provider emits a raw streaming event that is not already exposed through one of the typed callbacks (such asStreamingChatResponseHandler.onPartialResponse(PartialResponse, PartialResponseContext),StreamingChatResponseHandler.onPartialThinking(PartialThinking, PartialThinkingContext),StreamingChatResponseHandler.onPartialToolCall(PartialToolCall, PartialToolCallContext)orStreamingChatResponseHandler.onCompleteToolCall(CompleteToolCall)). -
Uses of Experimental in dev.langchain4j.model.embedding
Classes in dev.langchain4j.model.embedding with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceUsed for processing multiple embedding requests asynchronously in a batch.Methods in dev.langchain4j.model.embedding with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault EmbeddingModelEmbeddingModel.addListener(EmbeddingModelListener listener) Returns anEmbeddingModelthat wraps this one and notifies the given listener around each embedding call.default EmbeddingModelEmbeddingModel.addListeners(List<EmbeddingModelListener> listeners) Returns anEmbeddingModelthat wraps this one and notifies the given listeners (in iteration order) around each embedding call.default EmbeddingRequestParametersEmbeddingModel.defaultRequestParameters()The parameters applied to every request unless overridden by the request itself, typically derived from the model's builder-time configuration.default EmbeddingResponseEmbeddingModel.doEmbed(EmbeddingRequest request) Performs the embedding forEmbeddingModel.embed(EmbeddingRequest).default CompletableFuture<EmbeddingResponse> EmbeddingModel.doEmbedAsync(EmbeddingRequest request) Non-blocking counterpart ofEmbeddingModel.doEmbed(EmbeddingRequest), called byEmbeddingModel.embedAsync(EmbeddingRequest)after the request's parameters have been merged and validated.default EmbeddingResponseEmbeddingModel.embed(EmbeddingRequest request) Embeds the inputs of the givenEmbeddingRequestand returns the resulting embeddings.default CompletableFuture<EmbeddingResponse> EmbeddingModel.embedAsync(EmbeddingRequest request) Non-blocking counterpart ofEmbeddingModel.embed(EmbeddingRequest): embeds the request's inputs and completes the returned future with the embeddings, without blocking the calling thread.default List<EmbeddingModelListener> EmbeddingModel.listeners()TheEmbeddingModelListeners that are notified aroundEmbeddingModel.embed(EmbeddingRequest).default ModelProviderEmbeddingModel.provider()TheModelProviderof this embedding model (for exampleModelProvider.OPEN_AI).default Set<ContentType> EmbeddingModel.supportedContentTypes()The inputcontent typesthis model can embed.default Set<EmbeddingParameter<?>> EmbeddingModel.supportedParameters()The per-callparametersthis model honors. -
Uses of Experimental in dev.langchain4j.model.embedding.listener
Classes in dev.langchain4j.model.embedding.listener with annotations of type ExperimentalModifier and TypeClassDescriptionclassThe context passed toEmbeddingModelListener.onError(EmbeddingModelErrorContext)when an embedding call fails.static classBuilder forEmbeddingModelErrorContext.interfaceAnEmbeddingModellistener that listens for requests, responses and errors.classThe context passed toEmbeddingModelListener.onRequest(EmbeddingModelRequestContext)before an embedding call.static classBuilder forEmbeddingModelRequestContext.classThe context passed toEmbeddingModelListener.onResponse(EmbeddingModelResponseContext)after a successful embedding call.static classBuilder forEmbeddingModelResponseContext. -
Uses of Experimental in dev.langchain4j.model.embedding.request
Classes in dev.langchain4j.model.embedding.request with annotations of type ExperimentalModifier and TypeClassDescriptionclassThe default, map-backed implementation ofEmbeddingRequestParameters.classenumThe role a piece of text plays in a retrieval task, allowing a provider to encode it differently.final recordA typed, stable identifier for a singleEmbeddingRequestParametersvalue.classA request to anEmbeddingModel, containing a batch ofEmbeddingInputs to embed and the per-callparameters.interfaceThe per-call parameters of anEmbeddingRequest, such asEmbeddingRequestParameters.dimensions()orEmbeddingRequestParameters.inputType(). -
Uses of Experimental in dev.langchain4j.model.embedding.response
Classes in dev.langchain4j.model.embedding.response with annotations of type ExperimentalModifier and TypeClassDescriptionclassThe result of embedding anEmbeddingRequest: theEmbeddings produced for the request's inputs (in the same order) together with theEmbeddingResponseMetadatasuch as the model name and token usage.classMetadata returned alongside anEmbeddingResponse, describing the call that produced it: themodel nameand thetoken usage. -
Uses of Experimental in dev.langchain4j.model.google.genai
Classes in dev.langchain4j.model.google.genai with annotations of type ExperimentalModifier and TypeClassDescriptionfinal classProvides an interface for interacting with the Google GenAI Batch API for Chat models.final classProvides an interface for interacting with the Google GenAI Batch API for Embedding models.final classProvides an interface for interacting with the Google GenAI Batch API for Image generation models.classclassclassRepresents a Google GenAI model for image generation and editing using the official com.google.genai SDK.class -
Uses of Experimental in dev.langchain4j.model.googleai
Classes in dev.langchain4j.model.googleai with annotations of type ExperimentalModifier and TypeClassDescriptionfinal classProvides an interface for interacting with the Gemini Batch API, an asynchronous service designed for processing large volumes of requests at a reduced cost (50% of standard).final classBatch embedding model for Google AI Gemini.final classProvides an interface for batch image generation using the Gemini Batch API.classRepresents a Google AI Gemini model for image generation and editing. -
Uses of Experimental in dev.langchain4j.model.image
Classes in dev.langchain4j.model.image with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceA model interface for processing multiple image generation requests asynchronously in a batch. -
Uses of Experimental in dev.langchain4j.model.mistralai
Classes in dev.langchain4j.model.mistralai with annotations of type ExperimentalModifier and TypeClassDescriptionfinal classABatchChatModelfor the Mistral Batch API, which processes multiple chat requests asynchronously at 50% of the standard per-token price. -
Uses of Experimental in dev.langchain4j.model.ollama
Classes in dev.langchain4j.model.ollama with annotations of type ExperimentalModifier and TypeClassDescriptionclassExperimental Ollama image generation model. -
Uses of Experimental in dev.langchain4j.model.openai
Classes in dev.langchain4j.model.openai with annotations of type ExperimentalModifier and TypeClassDescriptionclassRepresents an OpenAI audio model with a transcription interface, only gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1 (which is powered by our open source Whisper V2 model), and gpt-4o-transcribe-diarize are supported.enumclassOpenAI-specificEmbeddingRequestParameters, adding the parameters supported by the OpenAI embeddings API on top of the commonmodelName/dimensions.classclassclassRepresents an OpenAI text-to-speech model with a speech generation interface.enumMethods in dev.langchain4j.model.openai with annotations of type ExperimentalModifier and TypeMethodDescriptionOpenAiResponsesChatModel.doChatAsync(ChatRequest chatRequest) OpenAiResponsesStreamingChatModel.Builder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer for the reactive streaming path.OpenAiStreamingChatModel.OpenAiStreamingChatModelBuilder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer for the reactive (Flow.Publisher) streaming path. -
Uses of Experimental in dev.langchain4j.model.openai.internal
Methods in dev.langchain4j.model.openai.internal with annotations of type ExperimentalModifier and TypeMethodDescriptionOpenAiClient.chatCompletionPublisher(ChatCompletionRequest request, ChatCompletionOptions options) SyncOrAsync.executeRawAsync()OpenAiClient.Builder.streamingBufferSize(Integer streamingBufferSize) Sets the size of the bounded back-pressure buffer used by the reactive streaming publisher (chatCompletionPublisher). -
Uses of Experimental in dev.langchain4j.model.openaiofficial
Classes in dev.langchain4j.model.openaiofficial with annotations of type ExperimentalModifier and TypeClassDescriptionfinal classSubmits chat requests to the OpenAI Batch API, which processes them asynchronously at a reduced cost compared to real-time requests.classclassclassChatModel implementation using the official OpenAI Java client for the Responses API.classclassclassStreamingChatModel implementation using the official OpenAI Java client for the Responses API. -
Uses of Experimental in dev.langchain4j.model.scoring
Methods in dev.langchain4j.model.scoring with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault ScoringRequestParametersScoringModel.defaultRequestParameters()The model's default per-call parameters, applied byScoringModel.scoreAsync(ScoringRequest)to every request and overridden by any parameters set on the request itself.default CompletableFuture<ScoringResponse> ScoringModel.doScoreAsync(ScoringRequest request) The provider hook behindScoringModel.scoreAsync(ScoringRequest).default CompletableFuture<ScoringResponse> ScoringModel.scoreAsync(ScoringRequest request) Scores thedocumentsof the given request against itsquerywithout blocking the calling thread — the asynchronous/reactive counterpart ofScoringModel.scoreAll(List, String), used by the non-blocking RAG flow (seeReRankingContentAggregator). -
Uses of Experimental in dev.langchain4j.model.scoring.request
Classes in dev.langchain4j.model.scoring.request with annotations of type ExperimentalModifier and TypeClassDescriptionclassThe default implementation ofScoringRequestParameters.classA request to score (re-rank) a list ofScoringRequest.documents()against aScoringRequest.query().interfaceThe per-call parameters of aScoringRequest, such as theScoringRequestParameters.modelName()to use. -
Uses of Experimental in dev.langchain4j.model.scoring.response
Classes in dev.langchain4j.model.scoring.response with annotations of type ExperimentalModifier and TypeClassDescriptionclassThe result of scoring aScoringRequest: one relevance score per request document, in the same order, together with theScoringResponseMetadata(model name, token/billing usage).classThe metadata of aScoringResponse: theScoringResponseMetadata.modelName()that produced the scores and theScoringResponseMetadata.tokenUsage()(or provider billing units) the call consumed. -
Uses of Experimental in dev.langchain4j.observability.api.event
Classes in dev.langchain4j.observability.api.event with annotations of type ExperimentalModifier and TypeClassDescriptionenumWhy a successfully-executed tool was compensated (rolled back).interfaceInvoked after a successfully-executed tool is compensated (rolled back) - for example when another tool in the same round failed, or when the invocation was cancelled.Methods in dev.langchain4j.observability.api.event with annotations of type ExperimentalModifier and TypeMethodDescriptionToolCompensatedEvent.resultContents()Returns the contents of the compensated tool's original (successful) result.ToolCompensatedEvent.ToolCompensatedEventBuilder.resultContents(List<Content> resultContents) Sets the compensated tool's result contents.ToolExecutedEvent.resultContents()Returns the contents of the tool execution result.ToolExecutedEvent.ToolExecutedEventBuilder.resultContents(List<Content> resultContents) Sets the tool execution result contents. -
Uses of Experimental in dev.langchain4j.observability.api.listener
Classes in dev.langchain4j.observability.api.listener with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceA listener forToolCompensatedEvent, which represents an event that occurs after a successfully-executed tool is compensated (rolled back) within an AI Service invocation. -
Uses of Experimental in dev.langchain4j.observability.event
Classes in dev.langchain4j.observability.event with annotations of type ExperimentalMethods in dev.langchain4j.observability.event with annotations of type ExperimentalModifier and TypeMethodDescriptionDefaultToolCompensatedEvent.resultContents()DefaultToolExecutedEvent.resultContents() -
Uses of Experimental in dev.langchain4j.observation.listener
Classes in dev.langchain4j.observation.listener with annotations of type ExperimentalModifier and TypeClassDescriptionclassWill use observations and micrometer metrics to generate telemetry based on theChatModelListenerlifecycle. -
Uses of Experimental in dev.langchain4j.rag
Methods in dev.langchain4j.rag with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<AugmentationResult> RetrievalAugmentor.augmentAsync(AugmentationRequest augmentationRequest) Non-blocking counterpart ofRetrievalAugmentor.augment(AugmentationRequest), invoked by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service modes so the RAG flow never blocks the calling thread.DefaultRetrievalAugmentor.DefaultRetrievalAugmentorBuilder.offloadBlocking(boolean offloadBlocking) Controls whatDefaultRetrievalAugmentor.augmentAsync(AugmentationRequest)does when a pipeline stage (query transformation, routing, retrieval or aggregation) is not genuinely asynchronous (its*Asyncmethod is not implemented).Constructors in dev.langchain4j.rag with annotations of type ExperimentalModifierConstructorDescriptionDefaultRetrievalAugmentor(QueryTransformer queryTransformer, QueryRouter queryRouter, ContentAggregator contentAggregator, ContentInjector contentInjector, Executor executor, boolean offloadBlocking) -
Uses of Experimental in dev.langchain4j.rag.content.aggregator
Methods in dev.langchain4j.rag.content.aggregator with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<List<Content>> ContentAggregator.aggregateAsync(Map<Query, Collection<List<Content>>> queryToContents) Non-blocking counterpart ofContentAggregator.aggregate(Map), invoked by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service modes when RAG is configured. -
Uses of Experimental in dev.langchain4j.rag.content.retriever
Methods in dev.langchain4j.rag.content.retriever with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault ContentRetrieverContentRetriever.addListener(ContentRetrieverListener listener) Wraps thisContentRetrieverwith a listening retriever that dispatches events to the provided listener.default ContentRetrieverContentRetriever.addListeners(Collection<ContentRetrieverListener> listeners) Wraps thisContentRetrieverwith a listening retriever that dispatches events to the provided listeners.EmbeddingStoreContentRetriever.EmbeddingStoreContentRetrieverBuilder.offloadBlocking(boolean offloadBlocking) Controls whatEmbeddingStoreContentRetriever.retrieveAsync(Query)does when theEmbeddingModelorEmbeddingStoreis not genuinely asynchronous (does not implementdoEmbedAsync/searchAsync).default CompletableFuture<List<Content>> ContentRetriever.retrieveAsync(Query query) Non-blocking counterpart ofContentRetriever.retrieve(Query), invoked by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service modes when RAG is configured. -
Uses of Experimental in dev.langchain4j.rag.content.retriever.hibernate
Classes in dev.langchain4j.rag.content.retriever.hibernate with annotations of type ExperimentalModifier and TypeClassDescriptionclassUsing theSessionFactoryand theChatModel, thisContentRetrieverattempts to generate and execute Hibernate queries for given natural language queries.Constructors in dev.langchain4j.rag.content.retriever.hibernate with annotations of type ExperimentalModifierConstructorDescriptionHibernateContentRetriever(org.hibernate.SessionFactory sessionFactory, ChatModel chatModel, String databaseStructure, PromptTemplate promptTemplate, Integer maxRetries) Creates an instance of aHibernateContentRetriever. -
Uses of Experimental in dev.langchain4j.rag.content.retriever.listener
Classes in dev.langchain4j.rag.content.retriever.listener with annotations of type ExperimentalModifier and TypeClassDescriptionclassThe content retriever error context.static classBuilder forContentRetrieverErrorContext.interfaceAContentRetrieverlistener that listens for requests, responses and errors.classThe content retriever request context.static classBuilder forContentRetrieverRequestContext.classThe content retriever response context.static classBuilder forContentRetrieverResponseContext. -
Uses of Experimental in dev.langchain4j.rag.query.router
Methods in dev.langchain4j.rag.query.router with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<Collection<ContentRetriever>> QueryRouter.routeAsync(Query query) Non-blocking counterpart ofQueryRouter.route(Query), invoked by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service modes when RAG is configured. -
Uses of Experimental in dev.langchain4j.rag.query.transformer
Methods in dev.langchain4j.rag.query.transformer with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<Collection<Query>> QueryTransformer.transformAsync(Query query) Non-blocking counterpart ofQueryTransformer.transform(Query), invoked by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service modes when RAG is configured. -
Uses of Experimental in dev.langchain4j.service
Classes in dev.langchain4j.service with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceAn event emitted by the reactive stream of a non-blocking streaming AI Service — that is, an AI Service method declared to return aFlow.PublisherofAiServiceStreamingEvent.Methods in dev.langchain4j.service with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault TokenStreamTokenStream.onPartialResponseWithContext(BiConsumer<PartialResponse, PartialResponseContext> handler) The provided consumer will be invoked every time a new partial textual response (usually a single token) from a language model is available.default TokenStreamTokenStream.onPartialThinking(Consumer<PartialThinking> partialThinkingHandler) The provided consumer will be invoked every time a new partial thinking/reasoning text (usually a single token) from a language model is available.default TokenStreamTokenStream.onPartialThinkingWithContext(BiConsumer<PartialThinking, PartialThinkingContext> handler) The provided consumer will be invoked every time a new partial thinking/reasoning text (usually a single token) from a language model is available.default TokenStreamTokenStream.onPartialToolCall(Consumer<PartialToolCall> partialToolCallHandler) The provided consumer will be invoked every time a new partial tool call (usually containing a single token of the tool's arguments) from a language model is available.default TokenStreamTokenStream.onPartialToolCallWithContext(BiConsumer<PartialToolCall, PartialToolCallContext> handler) The provided consumer will be invoked every time a new partial tool call (usually containing a single token of the tool's arguments) from a language model is available.default TokenStreamTokenStream.onUnmappedRawEvent(Consumer<Object> rawEventHandler) The provided consumer will be invoked when a provider emits a raw streaming event that is not already exposed through one of the typed callbacks (such asTokenStream.onPartialResponse(Consumer),TokenStream.onPartialThinking(Consumer)orTokenStream.onToolExecuted(Consumer)).AiServices.streamingBufferSize(int streamingBufferSize) Sets the size of the bounded back-pressure buffer used by the reactive (Flow.Publisher) streaming path. -
Uses of Experimental in dev.langchain4j.service.guardrail
Methods in dev.langchain4j.service.guardrail with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault <MethodKey>
CompletableFuture<UserMessage> GuardrailService.executeGuardrailsAsync(MethodKey method, InputGuardrailRequest request) Non-blocking counterpart ofGuardrailService.executeGuardrails(Object, InputGuardrailRequest): runs the input guardrails without blocking the calling thread and yields the (possibly rewritten)UserMessage.default <MethodKey, T>
CompletableFuture<T> GuardrailService.executeGuardrailsAsync(MethodKey method, OutputGuardrailRequest request) Non-blocking counterpart ofGuardrailService.executeGuardrails(Object, OutputGuardrailRequest)for the asynchronous (CompletableFuture) and reactive (Flow.Publisher) AI Service modes.default <MethodKey>
CompletableFuture<InputGuardrailResult> GuardrailService.executeInputGuardrailsAsync(MethodKey method, InputGuardrailRequest request) Non-blocking counterpart ofGuardrailService.executeInputGuardrails(Object, InputGuardrailRequest).default <MethodKey>
CompletableFuture<OutputGuardrailResult> GuardrailService.executeOutputGuardrailsAsync(MethodKey method, OutputGuardrailRequest request) Non-blocking counterpart ofGuardrailService.executeOutputGuardrails(Object, OutputGuardrailRequest). -
Uses of Experimental in dev.langchain4j.service.tool
Classes in dev.langchain4j.service.tool with annotations of type ExperimentalMethods in dev.langchain4j.service.tool with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<ToolExecutionResult> ToolExecutor.executeAsync(ToolExecutionRequest request, InvocationContext context) Non-blocking counterpart ofToolExecutor.executeWithContext(ToolExecutionRequest, InvocationContext), invoked by the asynchronous AI Service tool loop (AI Service methods returningCompletableFutureorCompletionStage), which composes the returned future instead of waiting on a thread.ToolExecution.resultContents()Returns the contents of the tool execution result.ToolExecutionResult.Builder.resultContents(List<Content> resultContents) Sets the contents of the tool execution result.ToolExecutionResult.resultContents()Returns the contents of the tool execution result that will be sent to the LLM. -
Uses of Experimental in dev.langchain4j.service.tool.search
Classes in dev.langchain4j.service.tool.search with annotations of type ExperimentalModifier and TypeClassDescriptionclassA request to search for tools.classThe result of a tool search.interfaceStrategy for discovering tools dynamically by an LLM during an AI Service invocation. -
Uses of Experimental in dev.langchain4j.service.tool.search.simple
Classes in dev.langchain4j.service.tool.search.simple with annotations of type ExperimentalModifier and TypeClassDescriptionclassAToolSearchStrategythat allows an LLM to search for available tools using simple case-insensitivecontainsmatching. -
Uses of Experimental in dev.langchain4j.service.tool.search.vector
Classes in dev.langchain4j.service.tool.search.vector with annotations of type ExperimentalModifier and TypeClassDescriptionclassAToolSearchStrategythat uses vector similarity search to find relevant tools based on the semantic meaning of their names and descriptions. -
Uses of Experimental in dev.langchain4j.skills
Classes in dev.langchain4j.skills with annotations of type ExperimentalModifier and TypeClassDescriptionclassclassclassLoads skills from the classpath (including cases when they are packaged inside a JAR file that is on the classpath).classclassclassinterfaceASkillbacked by the file system.classLoads skills from the file system.classinterfaceRepresents a skill that can be used by an LLM.interfaceAn additional resource associated with aSkill, such as a reference file, asset, or template that the LLM can read on demand.classConfigures and exposes a set ofSkills to an LLM. -
Uses of Experimental in dev.langchain4j.skills.shell
Classes in dev.langchain4j.skills.shell with annotations of type ExperimentalModifier and TypeClassDescriptionclassclassConfigures and exposes a set ofFileSystemSkills to an LLM using shell commands. -
Uses of Experimental in dev.langchain4j.spi
Classes in dev.langchain4j.spi with annotations of type ExperimentalModifier and TypeInterfaceDescriptioninterfaceSPI for supplying theExecutorthat LangChain4j uses to offload blocking work and run its asynchronous continuations — concurrent tool execution, blocking RAG / retrieval and embedding-store calls, moderation, in-process embedding models, retry backoff scheduling, and similar. -
Uses of Experimental in dev.langchain4j.store.embedding
Methods in dev.langchain4j.store.embedding with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault EmbeddingStore<Embedded> EmbeddingStore.addListener(EmbeddingStoreListener listener) Wraps thisEmbeddingStorewith a listening store that dispatches events to the provided listener.default EmbeddingStore<Embedded> EmbeddingStore.addListeners(List<EmbeddingStoreListener> listeners) Wraps thisEmbeddingStorewith a listening store that dispatches events to the provided listeners.default CompletableFuture<EmbeddingSearchResult<Embedded>> EmbeddingStore.searchAsync(EmbeddingSearchRequest request) Non-blocking counterpart ofEmbeddingStore.search(EmbeddingSearchRequest), used by the asynchronous and reactive RAG flow (seeEmbeddingStoreContentRetriever.retrieveAsync). -
Uses of Experimental in dev.langchain4j.store.embedding.filter.builder.sql
Classes in dev.langchain4j.store.embedding.filter.builder.sql with annotations of type ExperimentalModifier and TypeClassDescriptionclassclassclass -
Uses of Experimental in dev.langchain4j.store.embedding.filter.parser.sql
Classes in dev.langchain4j.store.embedding.filter.parser.sql with annotations of type ExperimentalModifier and TypeClassDescriptionclassParses an SQL "WHERE" clause into aFilterobject using JSqlParser. -
Uses of Experimental in dev.langchain4j.store.embedding.listener
Classes in dev.langchain4j.store.embedding.listener with annotations of type ExperimentalModifier and TypeClassDescriptionclassEmbeddingStoreErrorContext<Embedded>The embedding store error context.interfaceAEmbeddingStorelistener that listens for requests, responses and errors.classEmbeddingStoreRequestContext<Embedded>The embedding store request context.static final classEmbeddingStoreRequestContext.Add<Embedded>Theadd(...)request context.static final classEmbeddingStoreRequestContext.AddAll<Embedded>TheaddAll(...)request context.static final classEmbeddingStoreRequestContext.Remove<Embedded>Theremove(String)request context.static final classEmbeddingStoreRequestContext.RemoveAll<Embedded>TheremoveAll()request context.static final classTheremoveAll(Filter)request context.static final classTheremoveAll(ids)request context.static final classEmbeddingStoreRequestContext.Search<Embedded>Thesearch(...)request context.classEmbeddingStoreResponseContext<Embedded>The embedding store response context.static final classEmbeddingStoreResponseContext.Add<Embedded>Theadd(...)response context.static final classEmbeddingStoreResponseContext.AddAll<Embedded>TheaddAll(...)response context.static final classEmbeddingStoreResponseContext.Remove<Embedded>Theremove(String)response context.static final classEmbeddingStoreResponseContext.RemoveAll<Embedded>TheremoveAll()response context.static final classTheremoveAll(Filter)response context.static final classTheremoveAll(ids)response context.static final classEmbeddingStoreResponseContext.Search<Embedded>Thesearch(...)response context. -
Uses of Experimental in dev.langchain4j.store.memory.chat
Methods in dev.langchain4j.store.memory.chat with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<Void> ChatMemoryStore.deleteMessagesAsync(Object memoryId) Non-blocking counterpart ofChatMemoryStore.deleteMessages(Object), used by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service APIs.default CompletableFuture<List<ChatMessage>> ChatMemoryStore.getMessagesAsync(Object memoryId) Non-blocking counterpart ofChatMemoryStore.getMessages(Object), used by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service APIs.default CompletableFuture<Void> ChatMemoryStore.updateMessagesAsync(Object memoryId, List<ChatMessage> messages) Non-blocking counterpart ofChatMemoryStore.updateMessages(Object, List), used by the asynchronous (CompletableFuture/CompletionStage) and reactive (Flow.Publisher) AI Service APIs. -
Uses of Experimental in dev.langchain4j.web.search
Methods in dev.langchain4j.web.search with annotations of type ExperimentalModifier and TypeMethodDescriptiondefault CompletableFuture<WebSearchResults> WebSearchEngine.searchAsync(WebSearchRequest webSearchRequest) Non-blocking counterpart ofWebSearchEngine.search(WebSearchRequest), used by the asynchronous and reactive RAG flow (seeWebSearchContentRetriever).