Package dev.langchain4j.model.chat
Interface ChatLanguageModel
- All Known Implementing Classes:
AbstractBedrockChatModel
,AnthropicChatModel
,AzureOpenAiChatModel
,BedrockAI21LabsChatModel
,BedrockAnthropicCompletionChatModel
,BedrockAnthropicMessageChatModel
,BedrockChatModel
,BedrockCohereChatModel
,BedrockLlamaChatModel
,BedrockMistralAiChatModel
,BedrockStabilityAIChatModel
,BedrockTitanChatModel
,DisabledChatLanguageModel
,GitHubModelsChatModel
,GoogleAiGeminiChatModel
,HuggingFaceChatModel
,JlamaChatModel
,LocalAiChatModel
,MistralAiChatModel
,OllamaChatModel
,OpenAiChatModel
,OpenAiOfficialChatModel
,VertexAiChatModel
,VertexAiGeminiChatModel
,WorkersAiChatModel
public interface ChatLanguageModel
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. A temporary default implementation of this method is necessary until allChatLanguageModel
implementations 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
-