1
0

AbstractEmbeddingModel.java 425 B

12345678910111213141516171819202122232425
  1. package com.webchat.aigc.llm;
  2. import java.util.List;
  3. public abstract class AbstractEmbeddingModel {
  4. /**
  5. * 批量同步embedding
  6. *
  7. * @param text
  8. * @return
  9. */
  10. public abstract float[] embed(String text) throws Exception;
  11. /**
  12. * 批量同步embedding
  13. *
  14. * @param texts
  15. * @return
  16. */
  17. public abstract List<float[]> embed(List<String> texts) throws Exception;
  18. }