Class VectorServiceOptions
java.lang.Object
com.datastax.astra.client.core.vectorize.VectorServiceOptions
Configuration options for the Vector Service.
This class provides customizable options such as LLM provider, model name, authentication credentials, and free-form parameters to configure a vector service.
Example usage:
VectorServiceOptions options = new VectorServiceOptions()
.provider("OpenAI")
.modelName("gpt-4")
.addAuthentication("apiKey", "your-key")
.parameters(Map.of("temperature", 0.7));
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Represents a parameter definition for LLM services. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAuthentication
(String key, Object value) Adds a single authentication key-value pair to theauthentication
map.authentication
(Map<String, Object> auth) Sets the authentication map.Sets the LLM model name.parameters
(Map<String, Object> parameters) Sets the parameters map.Sets the LLM provider.
-
Constructor Details
-
VectorServiceOptions
public VectorServiceOptions()Default constructor for serialization purposes.
-
-
Method Details
-
addAuthentication
Adds a single authentication key-value pair to theauthentication
map.- Parameters:
key
- the key for the authentication entryvalue
- the value for the authentication entry- Returns:
- the current
VectorServiceOptions
instance for method chaining
-
authentication
Sets the authentication map.- Parameters:
auth
- the map containing authentication details- Returns:
- the current
VectorServiceOptions
instance for method chaining
-
modelName
Sets the LLM model name.- Parameters:
modelName
- the name of the model- Returns:
- the current
VectorServiceOptions
instance for method chaining
-
provider
Sets the LLM provider.- Parameters:
provider
- the name of the provider- Returns:
- the current
VectorServiceOptions
instance for method chaining
-
parameters
Sets the parameters map.- Parameters:
parameters
- a map of free-form parameters- Returns:
- the current
VectorServiceOptions
instance for method chaining
-