diff --git a/backend/apps/chat/curd/chat.py b/backend/apps/chat/curd/chat.py index dd22de57..8338cf2b 100644 --- a/backend/apps/chat/curd/chat.py +++ b/backend/apps/chat/curd/chat.py @@ -85,6 +85,7 @@ def get_chat_with_records(session: SessionDep, chart_id: int, current_user: Curr else: chat_info.datasource_exists = True chat_info.datasource_name = ds.name + chat_info.ds_type = ds.type record_list = session.query(ChatRecord).options( load_only(ChatRecord.id, ChatRecord.chat_id, ChatRecord.create_time, ChatRecord.finish_time, diff --git a/backend/apps/chat/models/chat_model.py b/backend/apps/chat/models/chat_model.py index 60fb777d..f095a65d 100644 --- a/backend/apps/chat/models/chat_model.py +++ b/backend/apps/chat/models/chat_model.py @@ -89,6 +89,7 @@ class ChatInfo(BaseModel): chat_type: str = "chat" datasource: Optional[int] = None engine_type: str = '' + ds_type: str = '' datasource_name: str = '' datasource_exists: bool = True records: List[ChatRecord | dict] = []