You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
709 B
JavaScript

4 months ago
import request from '@/request';
// 获取回复
4 months ago
export const getAIResponse = (data) => request({
method: 'POST',
4 months ago
url: '/api/chat',
4 months ago
data
4 months ago
});
4 months ago
export const getTextToAudio = (tex) => {
return new Promise(resolve => {
uni.request({
url: `https://tsn.baidu.com/text2audio`,
method: 'POST',
data : {
tex,
tok : '24.1c8cc30b5f7be445723b6d4b19a36152.2592000.1765094496.282335-120706844',
cuid : '17619124287472660978',
ctp : '1',
lan : 'zh',
spd : 5,
pit : 5,
vol : 5,
per : 0,
aue : 3
},
'headers': {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
}).then(res => {
console.log('res getBaiduToken ',res);
})
})
}