【代码评审】AI 大模型:知识库的逻辑

This commit is contained in:
YunaiV
2024-09-07 20:12:37 +08:00
parent 0b1d9ce251
commit 8e56b81a3a
14 changed files with 25 additions and 17 deletions

View File

@ -47,7 +47,7 @@
<!-- 向量化,基于 Redis 存储Tika 解析内容 -->
<!-- 暂不做经济型,先注释 -->
<!-- 暂不做经济型,先注释 TODO 经济型是啥呀? -->
<!-- <dependency>-->
<!-- <groupId>${spring-ai.groupId}</groupId>-->
<!-- <artifactId>spring-ai-transformers-spring-boot-starter</artifactId>-->

View File

@ -197,6 +197,7 @@ public class AiModelFactoryImpl implements AiModelFactory {
});
}
// TODO @新:貌似可以创建一个大的 VectorStore。然后搜的时候通过 Filter.Expression 过滤对应的数据。
@Override
public VectorStore getOrCreateVectorStore(EmbeddingModel embeddingModel, AiPlatformEnum platform, String apiKey, String url) {
String cacheKey = buildClientCacheKey(VectorStore.class, platform, apiKey, url);