跳到主要内容

AI对话助手

JeecgBoot 从3.6.3+版本起,默认提供了AI助手对话功能。目前适配了两个AI模型:ChatGPT DeepSeek私有部署AI模型,推荐使用 DeepSeek 速度更快、质量更高.

AI助手效果图

进入JeecgBoot后台首页,点击首页右上角“AI助手”,弹出AI助手对话界面。

AI大模型配置

JeecgBoot 支持三种方式配置AI大模型,最新版默认使用DeepSeek,同时还支持ChatGPT 和Ollama私有部署AI大模型。

具体配置如下: 修改application-dev.yml配置文件,先把jeecg.enabled开关打开。

方式一:对接DeepSeek

jeecg:
ai-chat:
enabled: true
apiKey: ??
model: deepseek-chat
apiHost: https://api.deepseek.com
timeout: 60

方式二:对接ChatGPT

jeecg:
ai-chat:
enabled: true
apiKey: ???
apiHost: https://api.openai.com
# 超时时间(s)
timeout: 60

方式三:对接Ollama本地搭建AI大模型

具体文档见 私有大模型DeepSeek-R1本地搭建

jeecg:
ai-chat:
enabled: true
model: deepseek-r1:14b
apiKey: ollama
apiHost: http://localhost:11434
timeout: 60