ai config update

This commit is contained in:
robin
2023-07-29 19:27:12 +08:00
parent 6c196acfe9
commit b37c3eb753
2 changed files with 6 additions and 6 deletions

View File

@ -367,7 +367,12 @@ public class ChatController {
if (CollectionUtils.isEmpty(tableNames)) {
return Maps.newHashMap();
}
List<TableColumn> tableColumns = tableService.queryColumns(tableQueryParam);
List<TableColumn> tableColumns = Lists.newArrayList();
try {
tableColumns = tableService.queryColumns(tableQueryParam);
} catch (Exception exception) {
log.error("query table error, do nothing");
}
if (CollectionUtils.isEmpty(tableColumns)) {
return Maps.newHashMap();
}

View File

@ -110,11 +110,6 @@ public class AzureOpenAIEventSourceListener extends EventSourceListener {
try {
if (Objects.isNull(response)) {
String message = t.getMessage();
if ("No route to host".equals(message)) {
message = "网络连接超时,请检查网络连通性,参考文章<https://github.com/chat2db/Chat2DB/blob/main/CHAT2DB_AI_SQL.md>";
} else {
message = "Azure AI无法正常访问请参考文章<https://github.com/chat2db/Chat2DB/blob/main/CHAT2DB_AI_SQL.md>进行配置";
}
Message sseMessage = new Message();
sseMessage.setContent(message);
sseEmitter.send(SseEmitter.event()