api配置更改
This commit is contained in:
@@ -5,4 +5,32 @@ 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/, ''),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user