AI 增加 Chroma 向量库
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
特别适合处理复杂的企业知识库。
|
||||
|
||||
此外该模块,支持云上大模型和本地部署的大模型,如:DeepSeek、通义千问,理论上支持所有 OpenAPI 标准接口的 AI 提供商。
|
||||
并能无缝集成多种嵌入式 AI 模型的向量数据库,如 PGVector、Elasticsearch、Milvus 等,实现高效的数据存储、检索及分析。
|
||||
并能无缝集成多种嵌入式 AI 模型的向量数据库,如 Chroma、PGVector、Elasticsearch、Milvus 等,实现高效的数据存储、检索及分析。
|
||||
无论是大规模数据集还是高度专业化的领域知识,JeeSite CMS + RAG + AI 都能提供定制化解决方案,满足企业多样化的业务需求和技术要求。
|
||||
企业可以轻松管理和访问复杂的信息资源,促进内部知识共享和创新,从而在竞争激烈的市场环境中保持领先地位。
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
|
||||
支持的向量库列表:<https://docs.spring.io/spring-ai/reference/1.0/api/vectordbs.html>
|
||||
|
||||
* Chroma
|
||||
* PGVector
|
||||
* Elasticsearch
|
||||
* Milvus
|
||||
|
||||
@@ -49,11 +49,17 @@
|
||||
<artifactId>spring-ai-ollama-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- PG 向量数据库 -->
|
||||
<!-- Chroma 向量数据库 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.ai</groupId>
|
||||
<artifactId>spring-ai-chroma-store-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- PG 向量数据库
|
||||
<dependency>
|
||||
<groupId>org.springframework.ai</groupId>
|
||||
<artifactId>spring-ai-pgvector-store-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
</dependency> -->
|
||||
|
||||
<!-- ES 向量数据库
|
||||
<dependency>
|
||||
|
||||
@@ -54,37 +54,45 @@ spring:
|
||||
# 向量数据库配置
|
||||
vectorstore:
|
||||
|
||||
# Postgresql 向量数据库(PG 连接配置,见下文,需要手动建表)
|
||||
pgvector:
|
||||
initialize-schema: false
|
||||
id-type: TEXT
|
||||
index-type: HNSW
|
||||
distance-type: COSINE_DISTANCE
|
||||
#table-name: vector_store_384
|
||||
#dimensions: 384
|
||||
#table-name: vector_store_786
|
||||
#dimensions: 768
|
||||
table-name: vector_store_1024
|
||||
dimensions: 1024
|
||||
batching-strategy: TOKEN_COUNT
|
||||
max-document-batch-size: 10000
|
||||
# Chroma 向量数据库
|
||||
chroma:
|
||||
client:
|
||||
host: http://localhost
|
||||
port: 8000
|
||||
initialize-schema: true
|
||||
collection-name: vector_store
|
||||
|
||||
# # Postgresql 向量数据库(PG 连接配置,见下文,需要手动建表)
|
||||
# pgvector:
|
||||
# id-type: TEXT
|
||||
# index-type: HNSW
|
||||
# distance-type: COSINE_DISTANCE
|
||||
# initialize-schema: false
|
||||
# #table-name: vector_store_384
|
||||
# #dimensions: 384
|
||||
# #table-name: vector_store_786
|
||||
# #dimensions: 768
|
||||
# table-name: vector_store_1024
|
||||
# dimensions: 1024
|
||||
# batching-strategy: TOKEN_COUNT
|
||||
# max-document-batch-size: 10000
|
||||
|
||||
# # ES 向量数据库(ES 连接配置,见下文)
|
||||
# elasticsearch:
|
||||
# initialize-schema: true
|
||||
# index-name: vector-index
|
||||
# initialize-schema: true
|
||||
# dimensions: 1024
|
||||
# similarity: cosine
|
||||
# batching-strategy: TOKEN_COUNT
|
||||
|
||||
# # Milvus 向量数据库(字符串长度不超过65535)
|
||||
# milvus:
|
||||
# initialize-schema: true
|
||||
# client:
|
||||
# host: "localhost"
|
||||
# port: 19530
|
||||
# username: "root"
|
||||
# password: "milvus"
|
||||
# initialize-schema: true
|
||||
# database-name: "default2"
|
||||
# collection-name: "vector_store2"
|
||||
# embedding-dimension: 384
|
||||
@@ -93,24 +101,24 @@ spring:
|
||||
|
||||
# ========= Postgresql 向量数据库数据源 =========
|
||||
|
||||
jdbc:
|
||||
ds_pgvector:
|
||||
type: postgresql
|
||||
driver: org.postgresql.Driver
|
||||
url: jdbc:postgresql://127.0.0.1:5433/jeesite-ai
|
||||
username: postgres
|
||||
password: postgres
|
||||
testSql: SELECT 1
|
||||
#jdbc:
|
||||
# ds_pgvector:
|
||||
# type: postgresql
|
||||
# driver: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://127.0.0.1:5433/jeesite-ai
|
||||
# username: postgres
|
||||
# password: postgres
|
||||
# testSql: SELECT 1
|
||||
|
||||
# ========= ES 向量数据库连接配置 =========
|
||||
|
||||
spring.elasticsearch:
|
||||
enabled: true
|
||||
socket-timeout: 120s
|
||||
connection-timeout: 120s
|
||||
uris: http://127.0.0.1:9200
|
||||
username: elastic
|
||||
password: elastic
|
||||
#spring.elasticsearch:
|
||||
# enabled: true
|
||||
# socket-timeout: 120s
|
||||
# connection-timeout: 120s
|
||||
# uris: http://127.0.0.1:9200
|
||||
# username: elastic
|
||||
# password: elastic
|
||||
|
||||
# 对话消息存缓存,可自定义存数据库
|
||||
j2cache:
|
||||
|
||||
Reference in New Issue
Block a user