Commit 613baad6 by Sixong.Zhu

u

parent 1bd43eff
Showing with 10 additions and 3 deletions
......@@ -16,23 +16,30 @@ export async function getChatModelInfo(
) {
const key = `${modelName}-${id}`
if (chatInfo[key] && !forceReload) {
const d = chatInfo[key];
if (d.row && d.row.UniplatChatId) {
return Promise.resolve({
uniplatId: chatInfo[key].row.UniplatChatId.value,
chat_id: +chatInfo[key].row.UniplatImChatId.value,
uniplatId: d.row.UniplatChatId.value,
chat_id: +d.row.UniplatImChatId.value,
uniplat_version: 0,
data: chatInfo[key],
data: d,
});
}
return Promise.resolve({ uniplatId: 0, chat_id: 0, uniplat_version: 0, data: d });
}
const info = await Chat.getSdk()
.model(modelName)
.detail(id + "", detailname)
.query();
const data = info;
chatInfo[key] = data;
if (info.row && info.row.UniplatChatId) {
return {
uniplatId: info.row.UniplatChatId.value,
chat_id: Number(info.row.UniplatImChatId.value),
uniplat_version: 0,
data,
};
}
return { uniplatId: 0, chat_id: 0, uniplat_version: 0, data, };
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment