类的使用
dev.langchain4j.model.output.Response
使用Response的程序包
程序包
说明
-
dev.langchain4j.model中Response的使用
参数类型为Response的dev.langchain4j.model中的方法修饰符和类型方法说明default voidStreamingResponseHandler.onComplete(Response<T> response) Invoked when the language model has finished streaming a response. -
dev.langchain4j.model.chat中Response的使用
修饰符和类型方法说明ChatLanguageModel.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) -
dev.langchain4j.model.embedding中Response的使用
修饰符和类型方法说明DisabledEmbeddingModel.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. -
dev.langchain4j.model.image中Response的使用
修饰符和类型方法说明Given 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. -
dev.langchain4j.model.language中Response的使用
修饰符和类型方法说明Generate a response to the given prompt.Generate a response to the given prompt. -
dev.langchain4j.model.moderation中Response的使用
修饰符和类型方法说明DisabledModerationModel.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. -
dev.langchain4j.model.output中Response的使用
修饰符和类型方法说明static <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. -
dev.langchain4j.model.scoring中Response的使用
修饰符和类型方法说明ScoringModel.score(TextSegment segment, String query) Scores a givenTextSegmentagainst a given query.Scores a given text against a given query.ScoringModel.scoreAll(List<TextSegment> segments, String query) Scores all providedTextSegments against a given query.