Class HuggingFaceChatModel
java.lang.Object
dev.langchain4j.model.huggingface.HuggingFaceChatModel
- All Implemented Interfaces:
ChatLanguageModel
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHuggingFaceChatModel
(String baseUrl, String accessToken, String modelId, Duration timeout, Double temperature, Integer maxNewTokens, Boolean returnFullText, Boolean waitForModel) HuggingFaceChatModel
(String accessToken, String modelId, Duration timeout, Double temperature, Integer maxNewTokens, Boolean returnFullText, Boolean waitForModel) -
Method Summary
Modifier and TypeMethodDescriptionstatic HuggingFaceChatModel.Builder
builder()
chat
(ChatRequest chatRequest) This is the main API to interact with the chat model.static HuggingFaceChatModel
withAccessToken
(String accessToken) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.chat.ChatLanguageModel
chat, chat, chat, defaultRequestParameters, doChat, listeners, provider, supportedCapabilities
-
Constructor Details
-
HuggingFaceChatModel
-
HuggingFaceChatModel
-
HuggingFaceChatModel
-
-
Method Details
-
chat
Description copied from interface:ChatLanguageModel
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.- Specified by:
chat
in interfaceChatLanguageModel
- Parameters:
chatRequest
- aChatRequest
, containing all the inputs to the LLM- Returns:
- a
ChatResponse
, containing all the outputs from the LLM
-
builder
-
withAccessToken
-