Uses of Interface
com.hw.langchain.base.language.BaseLanguageModel
Package
Description
-
Uses of BaseLanguageModel in com.hw.langchain.agents.agent
Modifier and TypeMethodDescriptionstatic BaseSingleActionAgent
Agent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) static BaseSingleActionAgent
BaseSingleActionAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) -
Uses of BaseLanguageModel in com.hw.langchain.agents.chat.base
Modifier and TypeMethodDescriptionstatic Agent
ChatAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, AgentOutputParser outputParser, String systemMessagePrefix, String systemMessageSuffix, String humanMessage, String formatInstructions, List<String> inputVariables, Map<String, Object> kwargs) Construct an agent from an LLM and tools.static Agent
ChatAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) Construct an agent from an LLM and tools. -
Uses of BaseLanguageModel in com.hw.langchain.agents.initialize
Modifier and TypeMethodDescriptionstatic AgentExecutor
Initialize.initializeAgent
(List<BaseTool> tools, BaseLanguageModel llm, AgentType agent) static AgentExecutor
Initialize.initializeAgent
(List<BaseTool> tools, BaseLanguageModel llm, AgentType agent, String agentPath, Map<String, Object> agentKwargs, Map<String, Object> kwargs) Load an agent executor given tools and LLM. -
Uses of BaseLanguageModel in com.hw.langchain.agents.load.tools
Modifier and TypeMethodDescriptionstatic BaseTool
LoadTools.getLLMMath
(BaseLanguageModel llm) LoadTools.loadTools
(List<String> toolNames, BaseLanguageModel llm) Load tools based on their name. -
Uses of BaseLanguageModel in com.hw.langchain.agents.mrkl.base
Modifier and TypeMethodDescriptionstatic Agent
ZeroShotAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, AgentOutputParser outputParser, String prefix, String suffix, String formatInstructions, List<String> inputVariables, Map<String, Object> kwargs) Construct an agent from an LLM and tools.static Agent
ZeroShotAgent.fromLLMAndTools
(BaseLanguageModel llm, List<BaseTool> tools, Map<String, Object> kwargs) Construct an agent from an LLM and tools. -
Uses of BaseLanguageModel in com.hw.langchain.chains.api.base
Modifier and TypeMethodDescriptionstatic ApiChain
ApiChain.fromLlmAndApiDocs
(BaseLanguageModel llm, String apiDocs) static ApiChain
ApiChain.fromLlmAndApiDocs
(BaseLanguageModel llm, String apiDocs, Map<String, String> headers, BasePromptTemplate apiUrlPrompt, BasePromptTemplate apiResponsePrompt) -
Uses of BaseLanguageModel in com.hw.langchain.chains.conversation.base
ModifierConstructorDescriptionConversationChain
(BaseLanguageModel llm, BasePromptTemplate prompt, BaseMemory memory) -
Uses of BaseLanguageModel in com.hw.langchain.chains.llm
ModifierConstructorDescriptionLLMChain
(BaseLanguageModel llm, BasePromptTemplate prompt) LLMChain
(BaseLanguageModel llm, BasePromptTemplate prompt, String outputKey) -
Uses of BaseLanguageModel in com.hw.langchain.chains.llm.math.base
Modifier and TypeMethodDescriptionstatic LLMMathChain
LLMMathChain.fromLLM
(BaseLanguageModel llm) static LLMMathChain
LLMMathChain.fromLLM
(BaseLanguageModel llm, BasePromptTemplate prompt) -
Uses of BaseLanguageModel in com.hw.langchain.chains.prompt.selector
Modifier and TypeMethodDescriptionabstract BasePromptTemplate
BasePromptSelector.getPrompt
(BaseLanguageModel llm) Get default prompt for a language model.ConditionalPromptSelector.getPrompt
(BaseLanguageModel llm) static boolean
PromptSelectorUtils.isChatModel
(BaseLanguageModel llm) Check if the language model is a chat model.static boolean
PromptSelectorUtils.isLLM
(BaseLanguageModel llm) Check if the language model is a LLM.ModifierConstructorDescriptionConditionalPromptSelector
(BasePromptTemplate defaultPrompt, List<org.apache.commons.lang3.tuple.Pair<Predicate<BaseLanguageModel>, BasePromptTemplate>> conditionals) -
Uses of BaseLanguageModel in com.hw.langchain.chains.query.constructor.base
Modifier and TypeMethodDescriptionstatic LLMChain
BaseUtils.loadQueryConstructorChain
(BaseLanguageModel llm, String documentContents, List<AttributeInfo> attributeInfo, List<Map<String, Object>> examples, List<Comparator> allowedComparators, List<Operator> allowedOperators, boolean enableLimit) Load a query constructor chain. -
Uses of BaseLanguageModel in com.hw.langchain.chains.question.answering
Modifier and TypeMethodDescriptionstatic BaseCombineDocumentsChain
Init.loadQaChain
(BaseLanguageModel llm) static BaseCombineDocumentsChain
Init.loadQaChain
(BaseLanguageModel llm, ChainType chainType) static StuffDocumentsChain
Init.loadStuffChain
(BaseLanguageModel llm) static StuffDocumentsChain
Init.loadStuffChain
(BaseLanguageModel llm, BasePromptTemplate prompt, String documentVariableName) -
Uses of BaseLanguageModel in com.hw.langchain.chains.retrieval.qa.base
Modifier and TypeMethodDescriptionstatic BaseRetrievalQA
RetrievalQa.fromChainType
(BaseLanguageModel llm, ChainType chainType, BaseRetriever retriever) Load chain from chain type.static BaseRetrievalQA
RetrievalQa.fromChainType
(BaseLanguageModel llm, BaseRetriever retriever) Load chain from chain type. -
Uses of BaseLanguageModel in com.hw.langchain.chains.sql.database.base
Modifier and TypeMethodDescriptionstatic SQLDatabaseChain
SQLDatabaseChain.fromLLM
(BaseLanguageModel llm, SQLDatabase database) static SQLDatabaseChain
SQLDatabaseChain.fromLLM
(BaseLanguageModel llm, SQLDatabase database, BasePromptTemplate prompt) static SQLDatabaseSequentialChain
SQLDatabaseSequentialChain.fromLLM
(BaseLanguageModel llm, SQLDatabase database) static SQLDatabaseSequentialChain
SQLDatabaseSequentialChain.fromLLM
(BaseLanguageModel llm, SQLDatabase database, BasePromptTemplate queryPrompt, BasePromptTemplate deciderPrompt) Load the necessary chains. -
Uses of BaseLanguageModel in com.hw.langchain.chains.summarize
Modifier and TypeMethodDescriptionstatic StuffDocumentsChain
SummarizeUtils.loadStuffChain
(BaseLanguageModel llm) static StuffDocumentsChain
SummarizeUtils.loadStuffChain
(BaseLanguageModel llm, BasePromptTemplate prompt, String documentVariableName, String documentSeparator) -
Uses of BaseLanguageModel in com.hw.langchain.chat.models.base
-
Uses of BaseLanguageModel in com.hw.langchain.chat.models.openai
Modifier and TypeClassDescriptionclass
Wrapper around OpenAI Chat large language models. -
Uses of BaseLanguageModel in com.hw.langchain.llms.base
Modifier and TypeClassDescriptionclass
LLM wrapper should take in a prompt and return a string. -
Uses of BaseLanguageModel in com.hw.langchain.llms.chatglm
-
Uses of BaseLanguageModel in com.hw.langchain.llms.ollama
-
Uses of BaseLanguageModel in com.hw.langchain.llms.openai
Modifier and TypeClassDescriptionclass
Wrapper around OpenAI large language models.class
OpenAIclass
Wrapper around OpenAI Chat large language models. -
Uses of BaseLanguageModel in com.hw.langchain.retrievers.self.query.base
Modifier and TypeMethodDescriptionstatic SelfQueryRetriever
SelfQueryRetriever.fromLLM
(BaseLanguageModel llm, VectorStore vectorStore, String documentContents, List<AttributeInfo> metadataFieldInfo) static SelfQueryRetriever
SelfQueryRetriever.fromLLM
(BaseLanguageModel llm, VectorStore vectorStore, String documentContents, List<AttributeInfo> metadataFieldInfo, Visitor structuredQueryTranslator, boolean enableLimit, boolean useOriginalQuery)