部分逻辑修正
This commit is contained in:
@@ -94,3 +94,52 @@ export const waitMakeEvaluateApi = (data) => {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// /trastudy/intgask/askAbout
|
||||
// 流式获取文本
|
||||
export const getAskAboutRawApi = (data) => {
|
||||
// return request({
|
||||
// baseUrl:'http://25.18.122.76:3030',
|
||||
// url: '/api/v1/prediction/a402cf58-9f64-479b-a9f8-c527300a7905',
|
||||
// isStream: true,
|
||||
// header: {
|
||||
// 'Accept':'text/event-stream',
|
||||
// 'content-type': 'application/json; charset=UTF-8',
|
||||
// 'Authorization': 'Bearer PjadGPFSHDg6F8ZRekROe-QxS2fPXlWRsmvP5Mp0vxA'
|
||||
// },
|
||||
// method: 'post',
|
||||
// toastErrors: false,
|
||||
// data
|
||||
// });
|
||||
return new Promise((resolve, reject) => {
|
||||
request({
|
||||
url: base_url + '/intgask/askAbout',
|
||||
header: {
|
||||
'Accept':'text/event-stream',
|
||||
'content-type': 'application/json; charset=UTF-8',
|
||||
},
|
||||
method: 'get',
|
||||
isStream: true,
|
||||
timeout: 30000,
|
||||
toastErrors: false,
|
||||
data
|
||||
}).then(res=>{
|
||||
console.log(res.data)
|
||||
let _str = `[${ res.data.split('}{').join('},{')}]`
|
||||
console.log(JSON.parse(_str))
|
||||
|
||||
})
|
||||
});
|
||||
// return request({
|
||||
// url: base_url + '/intgask/askAbout',
|
||||
// header: {
|
||||
// 'Accept':'text/event-stream',
|
||||
// 'content-type': 'application/json; charset=UTF-8',
|
||||
// },
|
||||
// method: 'get',
|
||||
// isStream: true,
|
||||
// timeout: 30000,
|
||||
// toastErrors: false,
|
||||
// data
|
||||
// });
|
||||
};
|
||||
Reference in New Issue
Block a user