minor fix

huangjinysf 4 months ago
parent b454801f9d
commit fcf352d25a

@ -222,7 +222,9 @@
const uploadRes = await new Promise((resolve, reject) => {
uni.uploadFile({
// url: 'http://192.168.133.83:8000/recognize_speech',
url: 'http://192.168.10.44:8000/recognize_speech',
// url: 'http://192.168.10.44:8000/recognize_speech',
// url: 'http://192.168.1.18:8000/recognize_speech',
url: 'http://106.227.91.181:8000/recognize_speech',
filePath: tempFilePath,
name: 'speech', // UploadFile
formData: {
@ -356,8 +358,8 @@
async getAIResponse(message){
try {
// const url = 'http://192.168.133.83:9020/api/chat'
const url = 'http://192.168.10.44:9020/api/chat'
// const url = 'http://106.227.91.181:9020/api/chat' // 线
// const url = 'http://192.168.10.44:9020/api/chat'
const url = 'http://106.227.91.181:9020/api/chat' // 线
const headers = { 'Content-Type': 'application/json' }
const data = { message }
@ -637,16 +639,19 @@
this.typewriterTimers[messageId] = timer
},
scrollToBottom() {
let self = this;
this.$nextTick(() => {
uni.createSelectorQuery().select('.content').boundingClientRect((rect) => {
if(self.height !== rect.height){
self.height = rect.height;
uni.pageScrollTo({
scrollTop: rect.height,
duration: 300,
class: '.content'
});
}
}).exec();
})
},
mockReply(text) {
const candidates = [

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save