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

Function save_analysis_answer

backend/apps/chat/curd/chat.py:903–917  ·  view source on GitHub ↗
(session: SessionDep, record_id: int, answer: str = '')

Source from the content-addressed store, hash-verified

901
902
903def save_analysis_answer(session: SessionDep, record_id: int, answer: str = '') -> ChatRecord:
904 if not record_id:
905 raise Exception("Record id cannot be None")
906
907 stmt = update(ChatRecord).where(and_(ChatRecord.id == record_id)).values(
908 analysis=answer,
909 )
910
911 session.execute(stmt)
912
913 session.commit()
914
915 record = get_chat_record_by_id(session, record_id)
916
917 return record
918
919
920def save_predict_answer(session: SessionDep, record_id: int, answer: str) -> ChatRecord:

Callers 1

generate_analysisMethod · 0.90

Calls 3

get_chat_record_by_idFunction · 0.85
updateFunction · 0.50
valuesMethod · 0.45

Tested by

no test coverage detected