Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions backend/apps/chat/task/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,19 @@ class LLMService:
record: ChatRecord
config: LLMConfig
llm: BaseChatModel
sql_message: List[Union[BaseMessage, dict[str, Any]]] = []
chart_message: List[Union[BaseMessage, dict[str, Any]]] = []
sql_message: List[Union[BaseMessage, dict[str, Any]]]
chart_message: List[Union[BaseMessage, dict[str, Any]]]

# session: Session = db_session
current_user: CurrentUser
current_assistant: Optional[CurrentAssistant] = None
out_ds_instance: Optional[AssistantOutDs] = None
change_title: bool = False

generate_sql_logs: List[ChatLog] = []
generate_chart_logs: List[ChatLog] = []

current_logs: dict[OperationEnum, ChatLog] = {}

chunk_list: List[str] = []
generate_sql_logs: List[ChatLog]
generate_chart_logs: List[ChatLog]
current_logs: dict[OperationEnum, ChatLog]
chunk_list: List[str]
future: Future

trans: I18nHelper = None
Expand All @@ -98,6 +96,11 @@ class LLMService:
def __init__(self, session: Session, current_user: CurrentUser, chat_question: ChatQuestion,
current_assistant: Optional[CurrentAssistant] = None, no_reasoning: bool = False,
embedding: bool = False, config: LLMConfig = None):
self.sql_message = []
self.chart_message = []
self.generate_sql_logs = []
self.generate_chart_logs = []
self.current_logs = {}
self.chunk_list = []
self.current_user = current_user
self.current_assistant = current_assistant
Expand Down