Class WorkersAiChatModel.Builder
java.lang.Object
dev.langchain4j.model.workersai.WorkersAiChatModel.Builder
- Enclosing class:
WorkersAiChatModel
Internal Builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionAccount identifier, provided by the WorkerAI platform.ModelName, preferred as enum for extensibility.The HTTP client builder used to create the underlying HTTP client.ModelName, preferred as enum for extensibility. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSimple constructor.Sets the apiToken for the Worker AI model builder.build()Builds a new instance of Worker AI Chat Model.httpClientBuilder(HttpClientBuilder httpClientBuilder) Sets theHttpClientBuilderused to create the underlying HTTP client.Sets the model name for the Worker AI model builder.
-
Field Details
-
accountId
Account identifier, provided by the WorkerAI platform. -
apiToken
ModelName, preferred as enum for extensibility. -
modelName
ModelName, preferred as enum for extensibility. -
httpClientBuilder
The HTTP client builder used to create the underlying HTTP client.
-
-
Constructor Details
-
Builder
public Builder()Simple constructor.
-
-
Method Details
-
accountId
Simple constructor.- Parameters:
accountId- account identifier.- Returns:
- self reference
-
apiToken
Sets the apiToken for the Worker AI model builder.- Parameters:
apiToken- The apiToken to set.- Returns:
- The current instance of
WorkersAiChatModel.Builder.
-
modelName
Sets the model name for the Worker AI model builder.- Parameters:
modelName- The name of the model to set.- Returns:
- The current instance of
WorkersAiChatModel.Builder.
-
httpClientBuilder
Sets theHttpClientBuilderused to create the underlying HTTP client.- Parameters:
httpClientBuilder- The HTTP client builder to set.- Returns:
- The current instance of
WorkersAiChatModel.Builder.
-
build
Builds a new instance of Worker AI Chat Model.- Returns:
- A new instance of
WorkersAiChatModel.
-