|
|
|
@ -1364,14 +1364,16 @@
|
|
|
|
let that = this;
|
|
|
|
let that = this;
|
|
|
|
coziAjax.coziPost('/v1/conversation/create',{
|
|
|
|
coziAjax.coziPost('/v1/conversation/create',{
|
|
|
|
"bot_id": uni.getStorageSync('robot_id'),
|
|
|
|
"bot_id": uni.getStorageSync('robot_id'),
|
|
|
|
"agencyId":uni.getStorageSync("apply-agencyId"),
|
|
|
|
|
|
|
|
"messages": [
|
|
|
|
"messages": [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"content_type": "text",
|
|
|
|
"content_type": "text",
|
|
|
|
"role": "user",
|
|
|
|
"role": "user",
|
|
|
|
"type": "question"
|
|
|
|
"type": "question"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
"custom_variables":{
|
|
|
|
|
|
|
|
"agencyId":uni.getStorageSync("apply-agencyId"),
|
|
|
|
|
|
|
|
}
|
|
|
|
},(sdkRes) =>{
|
|
|
|
},(sdkRes) =>{
|
|
|
|
callback(sdkRes)
|
|
|
|
callback(sdkRes)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -1391,7 +1393,6 @@
|
|
|
|
method: "post",
|
|
|
|
method: "post",
|
|
|
|
body: {
|
|
|
|
body: {
|
|
|
|
"bot_id": uni.getStorageSync('robot_id'),
|
|
|
|
"bot_id": uni.getStorageSync('robot_id'),
|
|
|
|
"agencyId":uni.getStorageSync("apply-agencyId"),
|
|
|
|
|
|
|
|
"user_id": "user",
|
|
|
|
"user_id": "user",
|
|
|
|
"stream": true,
|
|
|
|
"stream": true,
|
|
|
|
"additional_messages": [
|
|
|
|
"additional_messages": [
|
|
|
|
@ -1401,7 +1402,10 @@
|
|
|
|
"role": "user",
|
|
|
|
"role": "user",
|
|
|
|
"type": "question"
|
|
|
|
"type": "question"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
|
|
|
|
|
|
|
"custom_variables":{
|
|
|
|
|
|
|
|
"agencyId":uni.getStorageSync("apply-agencyId"),
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
callback()
|
|
|
|
callback()
|
|
|
|
|