Class SolrTextToVectorModel
- java.lang.Object
-
- org.apache.solr.llm.texttovector.model.SolrTextToVectorModel
-
- All Implemented Interfaces:
org.apache.lucene.util.Accountable
public class SolrTextToVectorModel extends Object implements org.apache.lucene.util.Accountable
This object wraps aEmbeddingModel
to encode text to vector. It's meant to be used as a managed resource with theManagedTextToVectorModelStore
-
-
Constructor Summary
Constructors Constructor Description SolrTextToVectorModel(String name, dev.langchain4j.model.embedding.EmbeddingModel textToVector, Map<String,Object> params)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getEmbeddingModelClassName()
static SolrTextToVectorModel
getInstance(SolrResourceLoader solrResourceLoader, String className, String name, Map<String,Object> params)
String
getName()
Map<String,Object>
getParams()
int
hashCode()
long
ramBytesUsed()
String
toString()
float[]
vectorise(String text)
-
-
-
Method Detail
-
getInstance
public static SolrTextToVectorModel getInstance(SolrResourceLoader solrResourceLoader, String className, String name, Map<String,Object> params) throws TextToVectorModelException
- Throws:
TextToVectorModelException
-
vectorise
public float[] vectorise(String text)
-
ramBytesUsed
public long ramBytesUsed()
- Specified by:
ramBytesUsed
in interfaceorg.apache.lucene.util.Accountable
-
getName
public String getName()
-
getEmbeddingModelClassName
public String getEmbeddingModelClassName()
-
-