Uses of Class
dev.langchain4j.model.output.Response
Packages that use Response
Package
Description
-
Uses of Response in dev.langchain4j.model
Methods in dev.langchain4j.model with parameters of type ResponseModifier and TypeMethodDescriptiondefault void
StreamingResponseHandler.onComplete
(Response<T> response) Invoked when the language model has finished streaming a response. -
Uses of Response in dev.langchain4j.model.anthropic
Methods in dev.langchain4j.model.anthropic that return ResponseModifier and TypeMethodDescriptionAnthropicChatModel.generate
(List<ChatMessage> messages) AnthropicChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.azure
Methods in dev.langchain4j.model.azure that return ResponseModifier and TypeMethodDescriptionAzureOpenAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) Embeds the provided text segments, processing a maximum of 16 segments at a time.AzureOpenAiChatModel.generate
(List<ChatMessage> messages) AzureOpenAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) AzureOpenAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.bedrock
Methods in dev.langchain4j.model.bedrock that return ResponseModifier and TypeMethodDescriptionBedrockCohereEmbeddingModel.embedAll
(List<TextSegment> textSegments) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) BedrockChatModel.generate
(List<ChatMessage> messages) BedrockChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) BedrockChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) BedrockMistralAiChatModel.generate
(List<ChatMessage> messages) -
Uses of Response in dev.langchain4j.model.bedrock.internal
Methods in dev.langchain4j.model.bedrock.internal that return ResponseModifier and TypeMethodDescriptionAbstractBedrockEmbeddingModel.embedAll
(List<TextSegment> textSegments) AbstractBedrockChatModel.generate
(List<ChatMessage> messages) AbstractBedrockChatModel.toAiMessage
(T result) Methods in dev.langchain4j.model.bedrock.internal with parameters of type ResponseModifier and TypeMethodDescriptionprotected ChatModelResponse
AbstractSharedBedrockChatModel.createModelListenerResponse
(String responseId, String responseModel, Response<AiMessage> response) -
Uses of Response in dev.langchain4j.model.chat
Methods in dev.langchain4j.model.chat that return ResponseModifier and TypeMethodDescriptionChatLanguageModel.generate
(ChatMessage... messages) Deprecated, for removal: This API element is subject to removal in a future version.ChatLanguageModel.generate
(List<ChatMessage> messages) Deprecated, for removal: This API element is subject to removal in a future version.please useChatLanguageModel.chat(List)
insteadChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Deprecated, for removal: This API element is subject to removal in a future version.please useChatLanguageModel.chat(ChatRequest)
instead.ChatLanguageModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Deprecated, for removal: This API element is subject to removal in a future version.please useChatLanguageModel.chat(ChatRequest)
instead.DisabledChatLanguageModel.generate
(ChatMessage... messages) DisabledChatLanguageModel.generate
(List<ChatMessage> messages) DisabledChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) DisabledChatLanguageModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.cohere
Methods in dev.langchain4j.model.cohere that return Response -
Uses of Response in dev.langchain4j.model.embedding
Methods in dev.langchain4j.model.embedding that return ResponseModifier and TypeMethodDescriptionDisabledEmbeddingModel.embed
(TextSegment textSegment) EmbeddingModel.embed
(TextSegment textSegment) Embed the text content of a TextSegment.Embed a text.DisabledEmbeddingModel.embedAll
(List<TextSegment> textSegments) EmbeddingModel.embedAll
(List<TextSegment> textSegments) Embeds the text content of a list of TextSegments. -
Uses of Response in dev.langchain4j.model.github
Methods in dev.langchain4j.model.github that return ResponseModifier and TypeMethodDescriptionGitHubModelsEmbeddingModel.embedAll
(List<TextSegment> textSegments) Embeds the provided text segments, processing a maximum of 16 segments at a time.GitHubModelsChatModel.generate
(List<ChatMessage> messages) GitHubModelsChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) GitHubModelsChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.googleai
Methods in dev.langchain4j.model.googleai that return ResponseModifier and TypeMethodDescriptionGoogleAiEmbeddingModel.embed
(TextSegment textSegment) GoogleAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) GoogleAiGeminiChatModel.generate
(List<ChatMessage> messages) GoogleAiGeminiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) GoogleAiGeminiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.huggingface
Methods in dev.langchain4j.model.huggingface that return Response -
Uses of Response in dev.langchain4j.model.image
Methods in dev.langchain4j.model.image that return ResponseModifier and TypeMethodDescriptionGiven an existing image, edit this image following the given prompt and apply the changes only to the part of the image specified by the given mask.Given an existing image, edit this image following the given prompt.Given a prompt, generate an image.Given a prompt, generate n images. -
Uses of Response in dev.langchain4j.model.jina
Methods in dev.langchain4j.model.jina that return Response -
Uses of Response in dev.langchain4j.model.jlama
Methods in dev.langchain4j.model.jlama that return ResponseModifier and TypeMethodDescriptionJlamaEmbeddingModel.embedAll
(List<TextSegment> textSegments) JlamaChatModel.generate
(List<ChatMessage> messages) JlamaChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.language
Methods in dev.langchain4j.model.language that return ResponseModifier and TypeMethodDescriptionGenerate a response to the given prompt.Generate a response to the given prompt. -
Uses of Response in dev.langchain4j.model.localai
Methods in dev.langchain4j.model.localai that return ResponseModifier and TypeMethodDescriptionLocalAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) LocalAiChatModel.generate
(List<ChatMessage> messages) LocalAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) LocalAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.mistralai
Methods in dev.langchain4j.model.mistralai that return ResponseModifier and TypeMethodDescriptionMistralAiModels.availableModels()
Retrieves the list of all available models.MistralAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) Embeds a list of text segments using the Mistral AI embedding model.MistralAiChatModel.generate
(List<ChatMessage> messages) Generates chat response based on the given list of messages.MistralAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates an AI message response based on the given list of chat messages and a tool specification.MistralAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Generates an AI message response based on the given list of chat messages and tool specifications.MistralAiModerationModel.moderate
(List<ChatMessage> messages) -
Uses of Response in dev.langchain4j.model.moderation
Methods in dev.langchain4j.model.moderation that return ResponseModifier and TypeMethodDescriptionDisabledModerationModel.moderate
(ChatMessage message) DisabledModerationModel.moderate
(TextSegment textSegment) DisabledModerationModel.moderate
(List<ChatMessage> messages) default Response
<Moderation> ModerationModel.moderate
(ChatMessage message) Moderates the given chat message.default Response
<Moderation> ModerationModel.moderate
(TextSegment textSegment) Moderates the given text segment.default Response
<Moderation> Moderates the given prompt.Moderates the given text.ModerationModel.moderate
(List<ChatMessage> messages) Moderates the given list of chat messages. -
Uses of Response in dev.langchain4j.model.nomic
Methods in dev.langchain4j.model.nomic that return Response -
Uses of Response in dev.langchain4j.model.ollama
Methods in dev.langchain4j.model.ollama that return ResponseModifier and TypeMethodDescriptionOllamaModels.availableModels()
OllamaEmbeddingModel.embedAll
(List<TextSegment> textSegments) OllamaChatModel.generate
(List<ChatMessage> messages) OllamaChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) OllamaModels.modelCard
(OllamaModel ollamaModel) OllamaModels.runningModels()
-
Uses of Response in dev.langchain4j.model.openai
Methods in dev.langchain4j.model.openai that return ResponseModifier and TypeMethodDescriptionInternalOpenAiHelper.convertResponse
(ChatResponse chatResponse) OpenAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) OpenAiChatModel.generate
(List<ChatMessage> messages) OpenAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) OpenAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) OpenAiModerationModel.moderate
(List<ChatMessage> messages) -
Uses of Response in dev.langchain4j.model.output
Methods in dev.langchain4j.model.output that return ResponseModifier and TypeMethodDescriptionstatic <T> @NonNull Response
<T> Response.from
(@NonNull T content) Create a new Response.static <T> @NonNull Response
<T> Response.from
(@NonNull T content, TokenUsage tokenUsage) Create a new Response.static <T> @NonNull Response
<T> Response.from
(@NonNull T content, TokenUsage tokenUsage, FinishReason finishReason) Create a new Response.static <T> @NonNull Response
<T> Response.from
(@NonNull T content, TokenUsage tokenUsage, FinishReason finishReason, @Nullable Map<String, Object> metadata) Create a new Response. -
Uses of Response in dev.langchain4j.model.ovhai
Methods in dev.langchain4j.model.ovhai that return Response -
Uses of Response in dev.langchain4j.model.scoring
Methods in dev.langchain4j.model.scoring that return ResponseModifier and TypeMethodDescriptionScoringModel.score
(TextSegment segment, String query) Scores a givenTextSegment
against a given query.Scores a given text against a given query.ScoringModel.scoreAll
(List<TextSegment> segments, String query) Scores all providedTextSegment
s against a given query. -
Uses of Response in dev.langchain4j.model.vertexai
Methods in dev.langchain4j.model.vertexai that return ResponseModifier and TypeMethodDescriptionVertexAiEmbeddingModel.embedAll
(List<TextSegment> segments) VertexAiChatModel.generate
(List<ChatMessage> messages) VertexAiGeminiChatModel.generate
(List<ChatMessage> messages) VertexAiGeminiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) VertexAiGeminiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) VertexAiScoringModel.scoreAll
(List<TextSegment> segments, String query) Scores all providedTextSegment
s against a given query. -
Uses of Response in dev.langchain4j.model.voyageai
Methods in dev.langchain4j.model.voyageai that return Response -
Uses of Response in dev.langchain4j.model.workersai
Methods in dev.langchain4j.model.workersai that return ResponseModifier and TypeMethodDescriptionGiven an existing image, edit this image following the given prompt and apply the changes only to the part of the image specified by the given mask.Given an existing image, edit this image following the given prompt.WorkersAiEmbeddingModel.embed
(TextSegment textSegment) Embed the text content of a TextSegment.Embed a text.WorkersAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) Embeds the text content of a list of TextSegments.WorkersAiChatModel.generate
(@NonNull ChatMessage... messages) Generates a response from the model based on a sequence of messages.WorkersAiChatModel.generate
(List<ChatMessage> messages) Generates a response from the model based on a sequence of messages.WorkersAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates a response from the model based on a list of messages and a single tool specification.WorkersAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) Generates a response from the model based on a list of messages and a list of tool specifications.Given a prompt, generate an image.Generate image and save to file.Generate a response to the given prompt.Generate a response to the given prompt. -
Uses of Response in dev.langchain4j.service
Method parameters in dev.langchain4j.service with type arguments of type ResponseModifier and TypeMethodDescriptionAiServiceTokenStream.onComplete
(Consumer<Response<AiMessage>> completionHandler) TokenStream.onComplete
(Consumer<Response<AiMessage>> completionHandler) Deprecated, for removal: This API element is subject to removal in a future version.please useTokenStream.onCompleteResponse(Consumer)
instead -
Uses of Response in dev.langchain4j.service.output
Methods in dev.langchain4j.service.output with parameters of type Response
ChatLanguageModel.chat(ChatMessage...)
instead