MCPcopy Index your code
hub / github.com/dataease/SQLBot / get_chat_chart_config

Function get_chat_chart_config

backend/apps/chat/curd/chat.py:220–228  ·  view source on GitHub ↗
(session: SessionDep, chat_record_id: int)

Source from the content-addressed store, hash-verified

218
219
220def get_chat_chart_config(session: SessionDep, chat_record_id: int):
221 stmt = select(ChatRecord.chart).where(and_(ChatRecord.id == chat_record_id))
222 res = session.execute(stmt)
223 for row in res:
224 try:
225 return orjson.loads(row.chart)
226 except Exception:
227 pass
228 return {}
229
230
231def get_chart_data_with_user(session: SessionDep, current_user: CurrentUser, chat_record_id: int):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected