37 lines
981 B
JavaScript
37 lines
981 B
JavaScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
plugins: [vue()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
},
|
|
},
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
open: true,
|
|
cors:true,
|
|
proxy:{
|
|
'/create-api':{
|
|
// target:'https://api.agora.io/cn/api/conversational-ai-agent/v2',
|
|
target: 'https://api.sd-rtn.com/cn/api/conversational-ai-agent/v2',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/create-api/, ''),
|
|
headers: {
|
|
'Authorization': 'Basic OGRkM2EzOGUxNTJjNGU1NDlmNWMwOTg0YmRhYzc1ZTE6ZWY1MTI2ZTRmMWFlNGE5MWE0MzVhN2Q0ZDc0YzNlYjg=',
|
|
}
|
|
},
|
|
// '/llm-api':{
|
|
// target:'https://vip.apiyi.com/v1/chat/completions',
|
|
// changeOrigin: true,
|
|
// rewrite: (path) => path.replace(/^\/llm-api/, ''),
|
|
// }
|
|
}
|
|
}
|
|
|
|
})
|