Record Class ModelManagementOptions
java.lang.Object
java.lang.Record
org.springframework.ai.ollama.management.ModelManagementOptions
- Record Components:
pullModelStrategy- the strategy to pull modelsadditionalModels- additional models to managetimeout- the timeout for managing modelsmaxRetries- the maximum number of retries
public record ModelManagementOptions(PullModelStrategy pullModelStrategy, List<String> additionalModels, Duration timeout, Integer maxRetries)
extends Record
Options for managing models in Ollama.
- Since:
- 1.0.0
- Author:
- Thomas Vitale, Ilayaperumal Gopinathan
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionModelManagementOptions(PullModelStrategy pullModelStrategy, List<String> additionalModels, Duration timeout, Integer maxRetries) Creates an instance of aModelManagementOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalModelsrecord component.builder()static ModelManagementOptionsdefaults()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxRetriesrecord component.Returns the value of thepullModelStrategyrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelManagementOptions
public ModelManagementOptions(PullModelStrategy pullModelStrategy, List<String> additionalModels, Duration timeout, Integer maxRetries) Creates an instance of aModelManagementOptionsrecord class.- Parameters:
pullModelStrategy- the value for thepullModelStrategyrecord componentadditionalModels- the value for theadditionalModelsrecord componenttimeout- the value for thetimeoutrecord componentmaxRetries- the value for themaxRetriesrecord component
-
-
Method Details
-
defaults
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
pullModelStrategy
Returns the value of thepullModelStrategyrecord component.- Returns:
- the value of the
pullModelStrategyrecord component
-
additionalModels
Returns the value of theadditionalModelsrecord component.- Returns:
- the value of the
additionalModelsrecord component
-
timeout
Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
maxRetries
Returns the value of themaxRetriesrecord component.- Returns:
- the value of the
maxRetriesrecord component
-