Package dev.langchain4j.model.chat
Interface StreamingChatLanguageModel
- All Known Implementing Classes:
DisabledStreamingChatLanguageModel
public interface StreamingChatLanguageModel
Represents a language model that has a chat API and can stream a response one token at a time.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidchat(ChatRequest chatRequest, StreamingChatResponseHandler handler) This is the main API to interact with the chat model.default voidchat(String userMessage, StreamingChatResponseHandler handler) default voidchat(List<ChatMessage> messages, StreamingChatResponseHandler handler) default ChatRequestParametersdefault voiddoChat(ChatRequest chatRequest, StreamingChatResponseHandler handler) 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 all
StreamingChatLanguageModelimplementations adopt it. It should be removed once that occurs.- Parameters:
chatRequest- aChatRequest, containing all the inputs to the LLMhandler- aStreamingChatResponseHandlerthat will handle streaming response from the LLM
-
defaultRequestParameters
-
listeners
-
provider
-
doChat
-
chat
-
chat
-
supportedCapabilities
-