feat: chat add ds_type

This commit is contained in:
ulleo
2025-07-25 11:12:55 +08:00
parent eeefe64b3a
commit ed8db00ce2
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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,
+1
View File
@@ -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] = []