Uses of Class
dev.langchain4j.model.output.Response
Package
Description
-
Uses of Response in dev.langchain4j.model
Modifier 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
Modifier and TypeMethodDescriptionAnthropicChatModel.generate
(List<ChatMessage> messages) AnthropicChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.azure
Modifier 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
Modifier and TypeMethodDescriptionBedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) BedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) BedrockMistralAiChatModel.generate
(List<ChatMessage> messages) -
Uses of Response in dev.langchain4j.model.bedrock.internal
Modifier and TypeMethodDescriptionAbstractBedrockEmbeddingModel.embedAll
(List<TextSegment> textSegments) AbstractBedrockChatModel.generate
(List<ChatMessage> messages) AbstractBedrockChatModel.toAiMessage
(T result) Modifier and TypeMethodDescriptionprotected ChatModelResponse
AbstractSharedBedrockChatModel.createModelListenerResponse
(String responseId, String responseModel, Response<AiMessage> response) -
Uses of Response in dev.langchain4j.model.chat
Modifier and TypeMethodDescriptionChatLanguageModel.generate
(ChatMessage... messages) Generates a response from the model based on a sequence of messages.ChatLanguageModel.generate
(List<ChatMessage> messages) Generates a response from the model based on a sequence of messages.ChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates a response from the model based on a list of messages and a single tool specification.ChatLanguageModel.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.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.chatglm
-
Uses of Response in dev.langchain4j.model.cohere
-
Uses of Response in dev.langchain4j.model.dashscope
Modifier and TypeMethodDescriptionQwenStreamingResponseBuilder.build()
QwenEmbeddingModel.embedAll
(List<TextSegment> textSegments) QwenChatModel.generate
(List<ChatMessage> messages) QwenChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) QwenChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.embedding
Modifier 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
Modifier 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
Modifier 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
-
Uses of Response in dev.langchain4j.model.image
Modifier 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
-
Uses of Response in dev.langchain4j.model.jlama
Modifier and TypeMethodDescriptionJlamaEmbeddingModel.embedAll
(List<TextSegment> textSegments) JlamaChatModel.generate
(List<ChatMessage> messages) JlamaChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) JlamaChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.language
Modifier and TypeMethodDescriptionGenerate a response to the given prompt.Generate a response to the given prompt. -
Uses of Response in dev.langchain4j.model.localai
Modifier 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
Modifier 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
Modifier 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
-
Uses of Response in dev.langchain4j.model.ollama
Modifier 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
Modifier and TypeMethodDescriptionOpenAiStreamingResponseBuilder.build()
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
Modifier and TypeMethodDescriptionstatic <T> Response
<T> Response.from
(T content) Create a new Response.static <T> Response
<T> Response.from
(T content, TokenUsage tokenUsage) Create a new Response.static <T> Response
<T> Response.from
(T content, TokenUsage tokenUsage, FinishReason finishReason) Create a new Response.static <T> Response
<T> Response.from
(T content, TokenUsage tokenUsage, FinishReason finishReason, Map<String, Object> metadata) Create a new Response. -
Uses of Response in dev.langchain4j.model.ovhai
-
Uses of Response in dev.langchain4j.model.qianfan
Modifier and TypeMethodDescriptionQianfanEmbeddingModel.embedAll
(List<TextSegment> textSegments) QianfanChatModel.generate
(List<ChatMessage> messages) QianfanChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) QianfanChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.model.qianfan.client
-
Uses of Response in dev.langchain4j.model.scoring
Modifier 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
Modifier 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
-
Uses of Response in dev.langchain4j.model.workersai
Modifier 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.model.zhipu
Modifier and TypeMethodDescriptionZhipuAiEmbeddingModel.embedAll
(List<TextSegment> textSegments) ZhipuAiChatModel.generate
(List<ChatMessage> messages) ZhipuAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) ZhipuAiChatModel.generate
(List<ChatMessage> messages, List<ToolSpecification> toolSpecifications) -
Uses of Response in dev.langchain4j.service
Modifier and TypeMethodDescriptionAiServiceTokenStream.onComplete
(Consumer<Response<AiMessage>> completionHandler) TokenStream.onComplete
(Consumer<Response<AiMessage>> completionHandler) The provided consumer will be invoked when a language model finishes streaming a response. -
Uses of Response in dev.langchain4j.service.output