Class SolrTextToVectorModel
java.lang.Object
org.apache.solr.languagemodels.model.SolrLanguageModel
org.apache.solr.languagemodels.model.SolrTextToVectorModel
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
public class SolrTextToVectorModel
extends SolrLanguageModel
implements org.apache.lucene.util.Accountable
This object wraps a
EmbeddingModel to encode text to vector. It's meant to be used as a
managed resource with the TextToVectorModelStore-
Field Summary
Fields inherited from class org.apache.solr.languagemodels.model.SolrLanguageModel
MAX_RETRIES_PARAM, name, params, TIMEOUT_PARAMFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionSolrTextToVectorModel(String name, dev.langchain4j.model.embedding.EmbeddingModel textToVector, Map<String, Object> params) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SolrTextToVectorModelgetInstance(SolrResourceLoader solrResourceLoader, String className, String name, Map<String, Object> params) Returns the class name of the underlying langchain4j model instance.inthashCode()longtoString()float[]Methods inherited from class org.apache.solr.languagemodels.model.SolrLanguageModel
getName, getParamsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Constructor Details
-
SolrTextToVectorModel
-
-
Method Details
-
getInstance
public static SolrTextToVectorModel getInstance(SolrResourceLoader solrResourceLoader, String className, String name, Map<String, Object> params) throws LanguageModelException- Throws:
LanguageModelException
-
vectorise
-
toString
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
hashCode
public int hashCode() -
equals
-
getModelClassName
Description copied from class:SolrLanguageModelReturns the class name of the underlying langchain4j model instance.- Specified by:
getModelClassNamein classSolrLanguageModel
-