diff --git a/.gitignore b/.gitignore index b10f4a9c..ed9cb7c7 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ pnpm-debug.log* lerna-debug.log* node_modules -src/dist +web/dist dist-ssr *.local diff --git a/api/go/README.md b/api/go/README.md new file mode 100644 index 00000000..083fe566 --- /dev/null +++ b/api/go/README.md @@ -0,0 +1,5 @@ +# chatgpt-plus-go + +chatgpt-plus 后端 API Go 语言实现。技术选型采用 Gin + Mysql 架构,依赖注入使用的是 fx 框架,ORM 采用的是 GORM 框架。 + + diff --git a/api/java/README.md b/api/java/README.md new file mode 100644 index 00000000..49be68cb --- /dev/null +++ b/api/java/README.md @@ -0,0 +1,5 @@ +# chatgpt-plus-java + +chatgpt-plus 后端 API Java 语言实现,待开发。 + + diff --git a/api/php/README.md b/api/php/README.md new file mode 100644 index 00000000..6d2f9ec0 --- /dev/null +++ b/api/php/README.md @@ -0,0 +1,5 @@ +# chatgpt-plus-php + +chatgpt-plus 后端 API PHP 语言实现,待开发。 + + diff --git a/api/python/README.md b/api/python/README.md new file mode 100644 index 00000000..c682e1c6 --- /dev/null +++ b/api/python/README.md @@ -0,0 +1,5 @@ +# chatgpt-plus-python + +chatgpt-plus 后端 API Python 语言实现,待开发。 + + diff --git a/web/README.md b/web/README.md new file mode 100644 index 00000000..ab4ff6e8 --- /dev/null +++ b/web/README.md @@ -0,0 +1,5 @@ +# chatgpt-plus-web + +chatgpt-plus 项目前端实现,采用 Vue3 + element-plus 架构。 + + diff --git a/web/src/main.js b/web/src/main.js index af0a053f..9914562d 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -29,7 +29,7 @@ const routes = [ }, { name: 'plus', path: '/chat', component: ChatPlus, meta: { - title: 'ChatGPT-Plus for PC' + title: 'ChatGPT-智能助手V3' } }, { diff --git a/web/src/views/ChatPlus.vue b/web/src/views/ChatPlus.vue index 5569f1a2..4e80d636 100644 --- a/web/src/views/ChatPlus.vue +++ b/web/src/views/ChatPlus.vue @@ -419,7 +419,15 @@ const connect = function (chat_id, role_id) { const _role = getRoleById(role_id); // 初始化 WebSocket 对象 const _sessionId = getSessionId(); - const _socket = new WebSocket(process.env.VUE_APP_WS_HOST + `/api/chat/new?sessionId=${_sessionId}&roleId=${role_id}&chatId=${chat_id}&model=${model.value}`); + let host = process.env.VUE_APP_WS_HOST + if (host === '') { + if (location.protocol === 'https') { + host = 'wss://'+location.host; + } else { + host = 'ws://'+location.host; + } + } + const _socket = new WebSocket(host + `/api/chat/new?sessionId=${_sessionId}&roleId=${role_id}&chatId=${chat_id}&model=${model.value}`); _socket.addEventListener('open', () => { chatData.value = []; // 初始化聊天数据 previousText.value = '';