update ai README.md

This commit is contained in:
thinkgem
2025-06-20 19:16:21 +08:00
parent 2dea278a45
commit 3e16c27442
2 changed files with 16 additions and 6 deletions

View File

@@ -35,6 +35,11 @@
* 模型类型包括:聊天对话模型和嵌入式向量库模型,需注意 dimensions 维度参数,要和模型要求的匹配。
```yml
# 向量库类型openai、ollama
spring.ai.model.chat: openai
```
具体配置项详见 [jeesite-cms-ai.yml](https://gitee.com/thinkgem/jeesite5/blob/v5.springboot3/modules/cms-ai/src/main/resources/config/jeesite-cms-ai.yml) 文件,有注释。
## 向量数据库配置
@@ -47,6 +52,11 @@
* Milvus
* ...
```yml
# 向量库类型chroma、pgvector、elasticsearch、milvus、指定 none 表示不使用向量库
spring.ai.vectorstore.type: none
```
具体配置项详见 [jeesite-cms-ai.yml](https://gitee.com/thinkgem/jeesite5/blob/v5.springboot3/modules/cms-ai/src/main/resources/config/jeesite-cms-ai.yml) 文件,有注释。
### 安装 Chroma
@@ -119,7 +129,7 @@ CREATE INDEX ON vector_store_1024 USING HNSW (embedding vector_cosine_ops);
* 菜单名称AI 助手
* 菜单地址:/cms/chat/index
## 支持工具调用 Tool Calling
## 工具调用 Tool Calling
工具调用 Tool Calling也称 Function Calling是人工智能应用程序中的常见模式允许模型与一组 API 或工具交互,从而增强其功能。

View File

@@ -90,17 +90,17 @@ spring:
# 向量数据库配置
vectorstore:
# 向量库类型chroma、pgvector、elasticsearch、milvus
type: chroma
# 向量库类型chroma、pgvector、elasticsearch、milvus、指定 none 表示不使用向量库
type: none
# Chroma 向量数据库【请在 pom.xml 中打开 chroma 的注释,并注释上其它向量库】
chroma:
client:
host: http://testserver
host: http://127.0.0.1
port: 8000
initialize-schema: true
collection-name: vector_store
# collection-name: vector_store_1024
# collection-name: vector_store
collection-name: vector_store_1024
# Postgresql 向量数据库PG 连接配置,见下文,需要手动建表)【请在 pom.xml 中打开 pgvector 的注释,并注释上其它向量库】
pgvector: