Skip to content

Commit 8f7f67d

Browse files
perf: Assistant ds
1 parent a404cd8 commit 8f7f67d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

backend/apps/chat/task/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def select_datasource(self):
365365
datasource_msg: List[Union[BaseMessage, dict[str, Any]]] = []
366366
datasource_msg.append(SystemMessage(self.chat_question.datasource_sys_question()))
367367
if self.current_assistant:
368-
_ds_list = get_assistant_ds(llm_service=self)
368+
_ds_list = get_assistant_ds(session=self.session, llm_service=self)
369369
else:
370370
oid: str = self.current_user.oid
371371
stmt = select(CoreDatasource.id, CoreDatasource.name, CoreDatasource.description).where(

backend/apps/system/crud/assistant.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ def get_assistant_user(*, id: int):
2929
3030

3131

32-
def get_assistant_ds(llm_service) -> list[dict]:
32+
def get_assistant_ds(session: Session, llm_service) -> list[dict]:
3333
assistant: AssistantHeader = llm_service.current_assistant
34-
session: Session = llm_service.session
3534
type = assistant.type
3635
if type == 0:
3736
configuration = assistant.configuration

0 commit comments

Comments
 (0)