Package com.hw.langchain.prompts.chat
Class BaseChatPromptTemplate
java.lang.Object
com.hw.langchain.prompts.base.BasePromptTemplate
com.hw.langchain.prompts.chat.BaseChatPromptTemplate
- Direct Known Subclasses:
ChatPromptTemplate
- Author:
- HamaWhite
-
Field Summary
Fields inherited from class com.hw.langchain.prompts.base.BasePromptTemplate
inputVariables, outputParser, partialVariables
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionFormat the prompt with the inputs.abstract List<BaseMessage>
formatMessages
(Map<String, Object> kwargs) Format kwargs into a list of messages.formatPrompt
(Map<String, Object> kwargs) Create Chat Messages.Methods inherited from class com.hw.langchain.prompts.base.BasePromptTemplate
mergePartialAndUserVariables
-
Constructor Details
-
BaseChatPromptTemplate
-
BaseChatPromptTemplate
-
-
Method Details
-
format
Description copied from class:BasePromptTemplate
Format the prompt with the inputs.- Specified by:
format
in classBasePromptTemplate
- Parameters:
kwargs
- Any arguments to be passed to the prompt template.- Returns:
- A formatted string.
-
formatPrompt
Description copied from class:BasePromptTemplate
Create Chat Messages.- Specified by:
formatPrompt
in classBasePromptTemplate
-
formatMessages
Format kwargs into a list of messages.
-