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
38 lines
709 B
JavaScript
import request from '@/request';
|
|
|
|
|
|
|
|
// 获取回复
|
|
export const getAIResponse = (data) => request({
|
|
method: 'POST',
|
|
url: '/api/chat',
|
|
data
|
|
});
|
|
|
|
|
|
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);
|
|
})
|
|
})
|
|
} |