Package dev.langchain4j.model.chat
Interface ChatLanguageModel
-
- All Implemented Interfaces:
public interface ChatLanguageModelRepresents a language model that has a chat API.
-
-
Method Summary
Modifier and Type Method Description ChatResponsechat(ChatRequest chatRequest)This is the main API to interact with the chat model. ChatRequestParametersdefaultRequestParameters()List<ChatModelListener>listeners()ModelProviderprovider()ChatResponsedoChat(ChatRequest chatRequest)Stringchat(String userMessage)ChatResponsechat(Array<ChatMessage> messages)ChatResponsechat(List<ChatMessage> messages)Set<Capability>supportedCapabilities()-
-
Method Detail
-
chat
ChatResponse chat(ChatRequest chatRequest)
This is the main API to interact with the chat model. A temporary default implementation of this method is necessary until all ChatLanguageModel implementations adopt it. It should be removed once that occurs.
- Parameters:
chatRequest- a ChatRequest, containing all the inputs to the LLM- Returns:
a ChatResponse, containing all the outputs from the LLM
-
defaultRequestParameters
ChatRequestParameters defaultRequestParameters()
-
listeners
List<ChatModelListener> listeners()
-
provider
ModelProvider provider()
-
doChat
ChatResponse doChat(ChatRequest chatRequest)
-
chat
ChatResponse chat(Array<ChatMessage> messages)
-
chat
ChatResponse chat(List<ChatMessage> messages)
-
supportedCapabilities
Set<Capability> supportedCapabilities()
-
-
-
-