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

Function get_chat_predict_data_with_user

backend/apps/chat/curd/chat.py:278–287  ·  view source on GitHub ↗
(session: SessionDep, current_user: CurrentUser, chat_record_id: int)

Source from the content-addressed store, hash-verified

276
277
278def get_chat_predict_data_with_user(session: SessionDep, current_user: CurrentUser, chat_record_id: int):
279 stmt = select(ChatRecord.predict_data).where(
280 and_(ChatRecord.id == chat_record_id, ChatRecord.create_by == current_user.id))
281 res = session.execute(stmt)
282 for row in res:
283 try:
284 return orjson.loads(row.predict_data)
285 except Exception:
286 pass
287 return {}
288
289
290def get_chat_predict_data(session: SessionDep, chat_record_id: int):

Callers 1

innerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected