Class BaseVectorStoreService

java.lang.Object
com.alibaba.cloud.ai.service.base.BaseVectorStoreService
Direct Known Subclasses:
AnalyticVectorStoreService, SimpleVectorStoreService

public abstract class BaseVectorStoreService extends Object
  • Constructor Details

    • BaseVectorStoreService

      public BaseVectorStoreService()
  • Method Details

    • getEmbeddingModel

      protected abstract org.springframework.ai.embedding.EmbeddingModel getEmbeddingModel()
      获取嵌入模型
    • embedDouble

      public List<Double> embedDouble(String text)
      将文本转换为 Double 类型的向量
    • schema

      public Boolean schema(SchemaInitRequest schemaInitRequest) throws Exception
      Throws:
      Exception
    • embedFloat

      public List<Float> embedFloat(String text)
      将文本转换为 Float 类型的向量
    • getDocuments

      public List<org.springframework.ai.document.Document> getDocuments(String query, String vectorType)
      获取向量库中的文档
    • getDocumentsForAgent

      public List<org.springframework.ai.document.Document> getDocumentsForAgent(String agentId, String query, String vectorType)
      为指定智能体获取向量库中的文档
    • searchWithVectorType

      public abstract List<org.springframework.ai.document.Document> searchWithVectorType(SearchRequest searchRequestDTO)
      默认 filter 的搜索接口
    • searchWithFilter

      public abstract List<org.springframework.ai.document.Document> searchWithFilter(SearchRequest searchRequestDTO)
      自定义 filter 的搜索接口
    • searchTableByNameAndVectorType

      public List<org.springframework.ai.document.Document> searchTableByNameAndVectorType(SearchRequest searchRequestDTO)
      获取表的文档
    • convertToDoubleList

      protected List<Double> convertToDoubleList(float[] array)
      将 float[] 转换为 Double List
    • convertToFloatList

      protected List<Float> convertToFloatList(float[] array)
      将 float[] 转换为 Float List