类名:LangChain4j
java.lang.Object
com.google.adk.models.BaseLlm
com.google.adk.models.langchain4j.LangChain4j
-
嵌套类概述
Nested Classes -
构造函数概述
ConstructorsConstructorDescriptionLangChain4j(dev.langchain4j.model.chat.ChatModel chatModel) LangChain4j(dev.langchain4j.model.chat.ChatModel chatModel, dev.langchain4j.model.chat.StreamingChatModel streamingChatModel, String modelName) LangChain4j(dev.langchain4j.model.chat.ChatModel chatModel, String modelName) LangChain4j(dev.langchain4j.model.chat.StreamingChatModel streamingChatModel) LangChain4j(dev.langchain4j.model.chat.StreamingChatModel streamingChatModel, String modelName) -
方法概述
Modifier and TypeMethodDescriptionstatic LangChain4j.Builderbuilder()abstract @Nullable dev.langchain4j.model.chat.ChatModelconnect(LlmRequest llmRequest) 创建与大型语言模型(LLM)的实时连接。io.reactivex.rxjava3.core.Flowable<LlmResponse> generateContent(LlmRequest llmRequest, boolean stream) 根据给定的大型语言模型(LLM)请求及相关工具,生成一条内容。model()返回大型语言模型(LLM)的名称。abstract @Nullable Stringabstract com.fasterxml.jackson.databind.ObjectMapperabstract @Nullable dev.langchain4j.model.chat.StreamingChatModelabstract @Nullable dev.langchain4j.model.TokenCountEstimatorMethods inherited from class BaseLlm
capabilities
-
构造函数详细信息
-
LangChain4j
public LangChain4j(dev.langchain4j.model.chat.ChatModel chatModel) -
LangChain4j
-
LangChain4j
public LangChain4j(dev.langchain4j.model.chat.StreamingChatModel streamingChatModel) -
LangChain4j
public LangChain4j(dev.langchain4j.model.chat.StreamingChatModel streamingChatModel, String modelName) -
LangChain4j
public LangChain4j(dev.langchain4j.model.chat.ChatModel chatModel, dev.langchain4j.model.chat.StreamingChatModel streamingChatModel, String modelName)
-
-
方法详细信息(Method Details)
-
chatModel
public abstract @Nullable dev.langchain4j.model.chat.ChatModel chatModel() -
streamingChatModel
public abstract @Nullable dev.langchain4j.model.chat.StreamingChatModel streamingChatModel() -
objectMapper
public abstract com.fasterxml.jackson.databind.ObjectMapper objectMapper() -
modelName
-
tokenCountEstimator
public abstract @Nullable dev.langchain4j.model.TokenCountEstimator tokenCountEstimator() -
model
-
builder
-
generateContent
public io.reactivex.rxjava3.core.Flowable<LlmResponse> generateContent(LlmRequest llmRequest, boolean stream) 描述内容复制自相关类:BaseLlm根据给定的大型语言模型(LLM)请求及相关工具,生成一条内容。- Specified by:
generateContentin classBaseLlm- Parameters:
llmRequest- The LLM request containing the input prompt and parameters.stream- A boolean flag indicating whether to stream the response.- Returns:
- A Flowable of LlmResponses. For non-streaming calls, it will only yield one LlmResponse. For streaming calls, it may yield more than one LlmResponse, but all yielded LlmResponses should be treated as one content by merging their parts.
-
connect
描述内容复制自相关类:BaseLlm创建与大型语言模型(LLM)的实时连接。
-