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
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionModelManagementOptions
(PullModelStrategy pullModelStrategy, List<String> additionalModels, Duration timeout, Integer maxRetries) Creates an instance of aModelManagementOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionalModels
record component.builder()
static ModelManagementOptions
defaults()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxRetries
record component.Returns the value of thepullModelStrategy
record component.timeout()
Returns the value of thetimeout
record component.final String
toString()
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 aModelManagementOptions
record class.- Parameters:
pullModelStrategy
- the value for thepullModelStrategy
record componentadditionalModels
- the value for theadditionalModels
record componenttimeout
- the value for thetimeout
record componentmaxRetries
- the value for themaxRetries
record 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 thepullModelStrategy
record component.- Returns:
- the value of the
pullModelStrategy
record component
-
additionalModels
Returns the value of theadditionalModels
record component.- Returns:
- the value of the
additionalModels
record component
-
timeout
Returns the value of thetimeout
record component.- Returns:
- the value of the
timeout
record component
-
maxRetries
Returns the value of themaxRetries
record component.- Returns:
- the value of the
maxRetries
record component
-