Function
get_chat_predict_data_with_user
(session: SessionDep, current_user: CurrentUser, chat_record_id: int)
Source from the content-addressed store, hash-verified
| 276 | |
| 277 | |
| 278 | def 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 | |
| 290 | def get_chat_predict_data(session: SessionDep, chat_record_id: int): |
Tested by
no test coverage detected