Commit 0fa8de52 by panjiangyi

getChatModelInfo支持detail_name

parent 4d41bad9
...@@ -214,7 +214,8 @@ export default class ChatList extends Vue { ...@@ -214,7 +214,8 @@ export default class ChatList extends Vue {
} }
const info = await getChatModelInfo( const info = await getChatModelInfo(
wantedChatRoom.business_data.model_name, wantedChatRoom.business_data.model_name,
wantedChatRoom.business_data.obj_id wantedChatRoom.business_data.obj_id,
wantedChatRoom.business_data.detail_name
); );
await this.saveChatId({ await this.saveChatId({
chatId: wantedChatRoom.chat_id, chatId: wantedChatRoom.chat_id,
......
...@@ -7,7 +7,7 @@ const chatInfo: ChatInfo = {}; ...@@ -7,7 +7,7 @@ const chatInfo: ChatInfo = {};
export const getChatModel = () => chatInfo; export const getChatModel = () => chatInfo;
export async function getChatModelInfo(modelName: string, id: string) { export async function getChatModelInfo(modelName: string, id: string, detailname?: string) {
if (chatInfo[id] != null) { if (chatInfo[id] != null) {
return { return {
uniplatId: chatInfo[id].row.UniplatChatId.value, uniplatId: chatInfo[id].row.UniplatChatId.value,
...@@ -15,7 +15,7 @@ export async function getChatModelInfo(modelName: string, id: string) { ...@@ -15,7 +15,7 @@ export async function getChatModelInfo(modelName: string, id: string) {
uniplat_version: 0, uniplat_version: 0,
}; };
} }
const info = await Chat.getSdk().model(modelName).detail(id).query(); const info = await Chat.getSdk().model(modelName).detail(id, detailname).query();
const data = info; const data = info;
chatInfo[id] = data; chatInfo[id] = data;
return { return {
......
...@@ -23,6 +23,7 @@ export interface Chat { ...@@ -23,6 +23,7 @@ export interface Chat {
business_data: { business_data: {
model_name: string; model_name: string;
obj_id: string; obj_id: string;
detail_name: string;
}; };
is_finish: boolean; is_finish: boolean;
is_deleted: boolean; is_deleted: boolean;
......
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