Package dev.langchain4j.model.chat
Interface ChatLanguageModel
- All Known Implementing Classes:
DisabledChatLanguageModel
public interface ChatLanguageModel
Represents a language model that has a chat API.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ChatResponsechat(ChatMessage... messages) default ChatResponsechat(ChatRequest chatRequest) This is the main API to interact with the chat model.default Stringdefault ChatResponsechat(List<ChatMessage> messages) default ChatRequestParametersdefault ChatResponsedoChat(ChatRequest chatRequest) default List<ChatModelListener> default ModelProviderprovider()default Set<Capability>
-
Method Details
-
chat
This is the main API to interact with the chat model. A temporary default implementation of this method is necessary until allChatLanguageModelimplementations adopt it. It should be removed once that occurs.- Parameters:
chatRequest- aChatRequest, containing all the inputs to the LLM- Returns:
- a
ChatResponse, containing all the outputs from the LLM
-
defaultRequestParameters
-
listeners
-
provider
-
doChat
-
chat
-
chat
-
chat
-
supportedCapabilities
-