Skip to content

Commit ed8db00

Browse files
committed
feat: chat add ds_type
1 parent eeefe64 commit ed8db00

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

backend/apps/chat/curd/chat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def get_chat_with_records(session: SessionDep, chart_id: int, current_user: Curr
8585
else:
8686
chat_info.datasource_exists = True
8787
chat_info.datasource_name = ds.name
88+
chat_info.ds_type = ds.type
8889

8990
record_list = session.query(ChatRecord).options(
9091
load_only(ChatRecord.id, ChatRecord.chat_id, ChatRecord.create_time, ChatRecord.finish_time,

backend/apps/chat/models/chat_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ class ChatInfo(BaseModel):
8989
chat_type: str = "chat"
9090
datasource: Optional[int] = None
9191
engine_type: str = ''
92+
ds_type: str = ''
9293
datasource_name: str = ''
9394
datasource_exists: bool = True
9495
records: List[ChatRecord | dict] = []

0 commit comments

Comments
 (0)