Merge pull request #897 from chat2db/dev

Dev
This commit is contained in:
贺喜
2023-11-29 16:02:01 +08:00
committed by GitHub
4 changed files with 11 additions and 5 deletions

View File

@ -104,8 +104,7 @@ Redis and MongoDB are partially supported , Hbase、Elasticsearch、openGauss、
### CONFIGURE CUSTOM AI
* [Refer here to deploy your ChatGLM-6B model](https://github.com/chat2db/chat2db-chatglm-6b-deploy)
* [Refer here to deploy your sqlcoder model](https://github.com/chat2db/chat2db-sqlcoder-deploy)
* The rest api format for Custom AI is same as ChatGPT.
## 📦 Docker installation

View File

@ -100,8 +100,7 @@ Redis和MongoDB得到部分支持Hbase、Elasticsearch、openGauss、TiDB、I
### 使用Chat2DB AI 上手即用
### 使用自定义大模型
- [参考这里部署本地ChatGLM-6B模型](https://github.com/chat2db/chat2db-chatglm-6b-deploy/blob/main/README_CN.md)
- [参考这里部署本地sqlcoder模型](https://github.com/chat2db/chat2db-sqlcoder-deploy/blob/main/README_CN.md)
- 使用自定义大模型接口格式需要和open ai的接口格式保持一致
## 📦 Docker 部署

View File

@ -95,7 +95,7 @@ public class DataSourceServiceImpl implements DataSourceService {
dataSourceDO.setGmtCreate(DateUtil.date());
dataSourceDO.setGmtModified(DateUtil.date());
dataSourceDO.setUserId(ContextUtils.getUserId());
dataSourceDO.setExtendInfo(null);
//dataSourceDO.setExtendInfo(null);
dataSourceMapper.insert(dataSourceDO);
preWarmingData(dataSourceDO.getId());

View File

@ -167,7 +167,15 @@ public class ConnectInfo {
public LinkedHashMap<String,Object> getExtendMap() {
if (ObjectUtils.isEmpty(extendInfo)) {
if(driverConfig!= null) {
extendInfo = driverConfig.getExtendInfo();
}else {
return new LinkedHashMap<>();
}
}
if(ObjectUtils.isEmpty(extendInfo)){
return new LinkedHashMap<>();
}
LinkedHashMap<String,Object> map = new LinkedHashMap<>();