Package dev.langchain4j.model.workersai
Class WorkersAiChatModel
java.lang.Object
dev.langchain4j.model.workersai.client.AbstractWorkersAIModel
dev.langchain4j.model.workersai.WorkersAiChatModel
- All Implemented Interfaces:
ChatLanguageModel
WorkerAI Chat model.
...
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class dev.langchain4j.model.workersai.client.AbstractWorkersAIModel
accountId, modelName, workerAiClient
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor with Builder.WorkersAiChatModel
(String accountId, String modelName, String apiToken) Constructor with Builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkersAiChatModel.Builder
builder()
Builder access.chat
(ChatRequest chatRequest) This is the main API to interact with the chat model.Methods inherited from class dev.langchain4j.model.workersai.client.AbstractWorkersAIModel
processErrors
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
-
WorkersAiChatModel
Constructor with Builder.- Parameters:
builder
- builder.
-
WorkersAiChatModel
Constructor with Builder.- Parameters:
accountId
- account identifiermodelName
- model nameapiToken
- api token
-
-
Method Details
-
builder
Builder access.- Returns:
- builder instance
-
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
-