类名:LangChain4j

java.lang.Object
com.google.adk.models.BaseLlm
com.google.adk.models.langchain4j.LangChain4j

public abstract class LangChain4j extends BaseLlm
  • 构造函数详细信息

    • LangChain4j

      public LangChain4j(dev.langchain4j.model.chat.ChatModel chatModel)
    • LangChain4j

      public LangChain4j(dev.langchain4j.model.chat.ChatModel chatModel, String modelName)
    • 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

      public abstract @Nullable String modelName()
    • tokenCountEstimator

      public abstract @Nullable dev.langchain4j.model.TokenCountEstimator tokenCountEstimator()
    • model

      public String model()
      描述内容复制自相关类: BaseLlm
      返回大型语言模型(LLM)的名称。
      Overrides:
      model in class BaseLlm
      Returns:
      The name of the LLM model.
    • builder

      public static LangChain4j.Builder builder()
    • generateContent

      public io.reactivex.rxjava3.core.Flowable<LlmResponse> generateContent(LlmRequest llmRequest, boolean stream)
      描述内容复制自相关类: BaseLlm
      根据给定的大型语言模型(LLM)请求及相关工具,生成一条内容。
      Specified by:
      generateContent in class BaseLlm
      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

      public BaseLlmConnection connect(LlmRequest llmRequest)
      描述内容复制自相关类: BaseLlm
      创建与大型语言模型(LLM)的实时连接。
      Specified by:
      connect in class BaseLlm