Class BaseChatModel
java.lang.Object
com.hw.langchain.chat.models.base.BaseChatModel
- All Implemented Interfaces:
BaseLanguageModel
- Direct Known Subclasses:
ChatOpenAI
- Author:
- HamaWhite
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncall
(List<BaseMessage> messages) call
(List<BaseMessage> messages, List<String> stop) combineLlmOutputs
(List<Map<String, Object>> llmOutputs) generate
(List<List<BaseMessage>> messages) Top Level callgeneratePrompt
(List<PromptValue> prompts, List<String> stop) Take in a list of prompt values and return an LLMResult.abstract ChatResult
innerGenerate
(List<BaseMessage> messages, List<String> stop) Top Level callabstract String
llmType()
Return type of chat model.Predict text from text.predictMessages
(List<BaseMessage> messages, List<String> stop) Predict message from messages.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.hw.langchain.base.language.BaseLanguageModel
asyncGeneratePrompt, asyncGeneratePrompt, asyncPredict, asyncPredict, asyncPredictMessages, predict, predictMessages
-
Constructor Details
-
BaseChatModel
public BaseChatModel()
-
-
Method Details
-
combineLlmOutputs
-
generate
-
generate
Top Level call -
generatePrompt
Description copied from interface:BaseLanguageModel
Take in a list of prompt values and return an LLMResult.- Specified by:
generatePrompt
in interfaceBaseLanguageModel
-
innerGenerate
Top Level call -
call
-
call
-
predict
Description copied from interface:BaseLanguageModel
Predict text from text.- Specified by:
predict
in interfaceBaseLanguageModel
-
predictMessages
Description copied from interface:BaseLanguageModel
Predict message from messages.- Specified by:
predictMessages
in interfaceBaseLanguageModel
-
llmType
Return type of chat model.
-