提交 eb9236f0 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 6d452c53
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.9.0",
"axios": "^1.6.7", "axios": "^1.6.7",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"element-plus": "^2.6.0", "element-plus": "^2.6.1",
"vue": "^3.4.15" "vue": "^3.4.21"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.0.3", "@vitejs/plugin-vue": "^5.0.4",
"ali-oss": "^6.20.0", "ali-oss": "^6.20.0",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"eslint": "^8.49.0", "eslint": "^8.57.0",
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.23.0",
"unplugin-auto-import": "^0.17.5", "unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0", "unplugin-vue-components": "^0.26.0",
"vite": "^5.0.11", "vite": "^5.1.6",
"vite-plugin-css-injected-by-js": "^3.4.0" "vite-plugin-css-injected-by-js": "^3.4.0"
} }
}, },
...@@ -1547,9 +1547,9 @@ ...@@ -1547,9 +1547,9 @@
"dev": true "dev": true
}, },
"node_modules/element-plus": { "node_modules/element-plus": {
"version": "2.6.0", "version": "2.6.1",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.6.0.tgz", "resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.6.1.tgz",
"integrity": "sha512-MP+N48P+diyndR+GjY+0VOrUmFnajD4U0CkrXIMzmeRmq4+dwi0bdzVo587v4wDo9Hs+ggviyacqm3NS8JYVqw==", "integrity": "sha512-6VRpLjwtIVdtUuITJPPKtpOH1NM6nuAkRE3q5O4Lrx0N1bYMhTkiqb2Jy7zfQuDPbOIkkF2OABTzegpNnzgsnQ==",
"dependencies": { "dependencies": {
"@ctrl/tinycolor": "^3.4.1", "@ctrl/tinycolor": "^3.4.1",
"@element-plus/icons-vue": "^2.3.1", "@element-plus/icons-vue": "^2.3.1",
...@@ -1820,9 +1820,9 @@ ...@@ -1820,9 +1820,9 @@
} }
}, },
"node_modules/eslint-plugin-vue": { "node_modules/eslint-plugin-vue": {
"version": "9.22.0", "version": "9.23.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.22.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.23.0.tgz",
"integrity": "sha512-7wCXv5zuVnBtZE/74z4yZ0CM8AjH6bk4MQGm7hZjUC2DBppKU5ioeOk5LGSg/s9a1ZJnIsdPLJpXnu1Rc+cVHg==", "integrity": "sha512-Bqd/b7hGYGrlV+wP/g77tjyFmp81lh5TMw0be9093X02SyelxRRfCI6/IsGq/J7Um0YwB9s0Ry0wlFyjPdmtUw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.4.0", "@eslint-community/eslint-utils": "^4.4.0",
...@@ -3822,9 +3822,9 @@ ...@@ -3822,9 +3822,9 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.1.5", "version": "5.1.6",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.1.5.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.1.6.tgz",
"integrity": "sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==", "integrity": "sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"esbuild": "^0.19.3", "esbuild": "^0.19.3",
......
...@@ -17,18 +17,18 @@ ...@@ -17,18 +17,18 @@
"@vueuse/core": "^10.9.0", "@vueuse/core": "^10.9.0",
"axios": "^1.6.7", "axios": "^1.6.7",
"blueimp-md5": "^2.19.0", "blueimp-md5": "^2.19.0",
"element-plus": "^2.6.0", "element-plus": "^2.6.1",
"vue": "^3.4.15" "vue": "^3.4.21"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue": "^5.0.3", "@vitejs/plugin-vue": "^5.0.4",
"ali-oss": "^6.20.0", "ali-oss": "^6.20.0",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"eslint": "^8.49.0", "eslint": "^8.57.0",
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.23.0",
"unplugin-auto-import": "^0.17.5", "unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0", "unplugin-vue-components": "^0.26.0",
"vite": "^5.0.11", "vite": "^5.1.6",
"vite-plugin-css-injected-by-js": "^3.4.0" "vite-plugin-css-injected-by-js": "^3.4.0"
} }
} }
import httpRequest from '@/utils/axios' import httpRequest from '@/utils/axios'
export function fetchAgents() { export function fetchAgents() {
return httpRequest.get('/openapi/agents') return httpRequest.get('/api/ai/openapi/agents')
} }
...@@ -7,12 +7,12 @@ export function useChat() { ...@@ -7,12 +7,12 @@ export function useChat() {
const authSecret = 'HO4IyLEwEOHpeOXBxaLQUOqWslJRGs1M' const authSecret = 'HO4IyLEwEOHpeOXBxaLQUOqWslJRGs1M'
const messages = ref([]) const messages = ref([])
const chatId = ref('') const chatId = ref(null)
async function post(data) { async function post(data) {
const timestamp = Date.now() const timestamp = Date.now()
const sign = md5(`${authKey}${authSecret}${timestamp}`) const sign = md5(`${authKey}${authSecret}${timestamp}`)
await fetchEventSource('/openapi/agent/chat/stream/v1', { await fetchEventSource('/api/ai/openapi/agent/chat/stream/v1', {
method: 'POST', method: 'POST',
headers: { authKey, timestamp, sign, 'Content-Type': 'application/json' }, headers: { authKey, timestamp, sign, 'Content-Type': 'application/json' },
body: JSON.stringify({ ...data, chatId: chatId.value, agentId: 'f3846153ba784b6d86bdcd5533259c88' }), body: JSON.stringify({ ...data, chatId: chatId.value, agentId: 'f3846153ba784b6d86bdcd5533259c88' }),
......
...@@ -27,12 +27,7 @@ export default defineConfig({ ...@@ -27,12 +27,7 @@ export default defineConfig({
server: { server: {
open: true, open: true,
proxy: { proxy: {
// '/api/resource': { '/api/ai': 'https://saas-lab.ezijing.com'
// target: 'http://com-resource-admin-test.ezijing.com/',
// changeOrigin: true,
// rewrite: path => path.replace(/^\/api\/resource/, '')
// },
'/openapi': 'https://model-platform-skyagents.tiangong.cn'
} }
}, },
build: { build: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论