Record Class InfinispanStoreConfiguration
java.lang.Object
java.lang.Record
dev.langchain4j.store.embedding.infinispan.InfinispanStoreConfiguration
public record InfinispanStoreConfiguration(String cacheName, Integer dimension, Integer distance, String similarity, String cacheConfig, String packageItem, String fileName, String langchainItemName, String metadataItemName, boolean createCache, boolean registerSchema)
extends Record
Holds configuration for the store
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault Cache Configstatic final intThe default distance to for the searchstatic final StringDefault package of the schemastatic final StringDefault name of the protobuf langchain item.static final StringDefault name of the protobuf metadata item.static final StringDefault vector similarity -
Constructor Summary
ConstructorsConstructorDescriptionInfinispanStoreConfiguration(String cacheName, Integer dimension, Integer distance, String similarity, String cacheConfig, String packageItem, String fileName, String langchainItemName, String metadataItemName, boolean createCache, boolean registerSchema) Creates the configuration and sets default values -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheConfigrecord component.Returns the value of thecacheNamerecord component.booleanReturns the value of thecreateCacherecord component.Returns the value of thedimensionrecord component.distance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.final inthashCode()Returns a hash code value for this object.Get the full name of the langchainItem protobuf typeReturns the value of thelangchainItemNamerecord component.Get the full name of the metadata protobuf typeReturns the value of themetadataItemNamerecord component.Returns the value of thepackageItemrecord component.booleanReturns the value of theregisterSchemarecord component.Returns the value of thesimilarityrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_CACHE_CONFIG
-
DEFAULT_ITEM_PACKAGE
-
DEFAULT_LANGCHAIN_ITEM
Default name of the protobuf langchain item. Size will be added- See Also:
-
DEFAULT_METADATA_ITEM
Default name of the protobuf metadata item. Size will be added- See Also:
-
DEFAULT_DISTANCE
public static final int DEFAULT_DISTANCEThe default distance to for the search- See Also:
-
DEFAULT_SIMILARITY
-
-
Constructor Details
-
InfinispanStoreConfiguration
public InfinispanStoreConfiguration(String cacheName, Integer dimension, Integer distance, String similarity, String cacheConfig, String packageItem, String fileName, String langchainItemName, String metadataItemName, boolean createCache, boolean registerSchema) Creates the configuration and sets default values- Parameters:
cacheName- , mandatorydimension- , mandatorydistance- , defaults to 3similarity- , defaults COUSINEcacheConfig- , the full cache configurationpackageItem- , optional the package itemfileName- , optional file namelangchainItemName- , optional item namemetadataItemName- , optional metadata item namecreateCache- , defaults to true. Disables creating the cache on startupregisterSchema- , defaults to true. Disables registering the schema in the server
-
-
Method Details
-
langchainItemFullType
Get the full name of the langchainItem protobuf type- Returns:
- langchainItemFullType
-
metadataFullType
Get the full name of the metadata protobuf type- Returns:
- metadataFullType
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
cacheName
Returns the value of thecacheNamerecord component.- Returns:
- the value of the
cacheNamerecord component
-
dimension
Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
distance
Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
similarity
Returns the value of thesimilarityrecord component.- Returns:
- the value of the
similarityrecord component
-
cacheConfig
Returns the value of thecacheConfigrecord component.- Returns:
- the value of the
cacheConfigrecord component
-
packageItem
Returns the value of thepackageItemrecord component.- Returns:
- the value of the
packageItemrecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
langchainItemName
Returns the value of thelangchainItemNamerecord component.- Returns:
- the value of the
langchainItemNamerecord component
-
metadataItemName
Returns the value of themetadataItemNamerecord component.- Returns:
- the value of the
metadataItemNamerecord component
-
createCache
public boolean createCache()Returns the value of thecreateCacherecord component.- Returns:
- the value of the
createCacherecord component
-
registerSchema
public boolean registerSchema()Returns the value of theregisterSchemarecord component.- Returns:
- the value of the
registerSchemarecord component
-