Package dev.langchain4j.model.chat
Interface ChatModel
- All Known Implementing Classes:
DisabledChatModel
public interface ChatModel
Represents a language model that has a chat API.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault ChatResponse
chat
(ChatMessage... messages) default ChatResponse
chat
(ChatRequest chatRequest) This is the main API to interact with the chat model.default String
default ChatResponse
chat
(List<ChatMessage> messages) default ChatRequestParameters
default ChatResponse
doChat
(ChatRequest chatRequest) default List
<ChatModelListener> default ModelProvider
provider()
default Set
<Capability>
-
Method Details
-
chat
This is the main API to interact with the chat model.- Parameters:
chatRequest
- aChatRequest
, containing all the inputs to the LLM- Returns:
- a
ChatResponse
, containing all the outputs from the LLM
-
doChat
-
defaultRequestParameters
-
listeners
-
provider
-
chat
-
chat
-
chat
-
supportedCapabilities
-