Package ai.chalk.client
Class BuilderImpl
java.lang.Object
ai.chalk.client.BuilderImpl
- All Implemented Interfaces:
ChalkClient.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()@Nullable String@Nullable String@Nullable String@Nullable String@Nullable String@Nullable String@Nullable HttpClient@Nullable String@Nullable Path@Nullable DurationbooleanwithApiServer(String apiServer) Sets the API server URL.withBranch(String branch) Sets the branch name.withClientId(String clientId) Sets the client ID.withClientSecret(String clientSecret) Sets the client secret.withDeploymentTag(String deploymentTag) Sets the deployment Tag.withEnvironmentId(String environmentId) Sets the environment ID.withGrpc()withHttpClient(HttpClient httpClient) Sets the HTTP client.withQueryServer(String queryServer) Chalk routes performance sensitive requests like online query directly to the query server that runs the engine.withRootCa(Path rootCa) Sets the root CA certificate file.withTimeout(Duration timeout) Sets the timeout for all requests.
-
Constructor Details
-
BuilderImpl
public BuilderImpl()
-
-
Method Details
-
withClientId
Description copied from interface:ChalkClient.BuilderSets the client ID. Used for authentication.- Specified by:
withClientIdin interfaceChalkClient.Builder
-
withClientSecret
Description copied from interface:ChalkClient.BuilderSets the client secret. Used for authentication.- Specified by:
withClientSecretin interfaceChalkClient.Builder
-
withApiServer
Description copied from interface:ChalkClient.BuilderSets the API server URL. Defaults to "https://api.chalk.ai".- Specified by:
withApiServerin interfaceChalkClient.Builder
-
withQueryServer
Description copied from interface:ChalkClient.BuilderChalk routes performance sensitive requests like online query directly to the query server that runs the engine. Populate this field if you would like to route these requests to a different query server than the one automatically resolved by Chalk.- Specified by:
withQueryServerin interfaceChalkClient.Builder
-
withEnvironmentId
Description copied from interface:ChalkClient.BuilderSets the environment ID. This is the identifier that distinguishes between different environments in your Chalk project.- Specified by:
withEnvironmentIdin interfaceChalkClient.Builder
-
withBranch
Description copied from interface:ChalkClient.BuilderSets the branch name. This is the identifier that distinguishes between different branches of a particular environment.- Specified by:
withBranchin interfaceChalkClient.Builder
-
withDeploymentTag
Description copied from interface:ChalkClient.BuilderSets the deployment Tag. This is the identifier that distinguishes between different tagged deployments in a particular environment.- Specified by:
withDeploymentTagin interfaceChalkClient.Builder
-
withHttpClient
Description copied from interface:ChalkClient.BuilderSets the HTTP client. This is useful for setting custom timeouts, etc.- Specified by:
withHttpClientin interfaceChalkClient.Builder
-
withGrpc
- Specified by:
withGrpcin interfaceChalkClient.Builder
-
withTimeout
Description copied from interface:ChalkClient.BuilderSets the timeout for all requests. Defaults to no timeout. Timeout of 0 means the query times out immediately. Request level timeouts takes precedence over this timeout.- Specified by:
withTimeoutin interfaceChalkClient.Builder- Parameters:
timeout- The timeout duration
-
withRootCa
Description copied from interface:ChalkClient.BuilderSets the root CA certificate file.- Specified by:
withRootCain interfaceChalkClient.Builder- Parameters:
rootCa- The path to the root CA
-
build
- Specified by:
buildin interfaceChalkClient.Builder- Throws:
ChalkException
-
getClientId
- Specified by:
getClientIdin interfaceChalkClient.Builder
-
getClientSecret
- Specified by:
getClientSecretin interfaceChalkClient.Builder
-
getApiServer
- Specified by:
getApiServerin interfaceChalkClient.Builder
-
getQueryServerOverride
-
getEnvironmentId
- Specified by:
getEnvironmentIdin interfaceChalkClient.Builder
-
getBranch
- Specified by:
getBranchin interfaceChalkClient.Builder
-
getHttpClient
- Specified by:
getHttpClientin interfaceChalkClient.Builder
-
isUseGrpc
public boolean isUseGrpc() -
getDeploymentTag
- Specified by:
getDeploymentTagin interfaceChalkClient.Builder
-
getRootCa
- Specified by:
getRootCain interfaceChalkClient.Builder
-
getTimeout
- Specified by:
getTimeoutin interfaceChalkClient.Builder
-