MCPcopy
hub / github.com/mindverse/Second-Me / analyze_documents

Function analyze_documents

lpm_kernel/api/domains/documents/routes.py:75–91  ·  view source on GitHub ↗

Analyze all unanalyzed documents

()

Source from the content-addressed store, hash-verified

73
74@document_bp.route("/documents/analyze", methods=["POST"])
75def analyze_documents():
76 """Analyze all unanalyzed documents"""
77 try:
78 analyzed_doc_dtos = document_service.analyze_all_documents()
79 return jsonify(
80 APIResponse.success(
81 data={
82 "total": len(analyzed_doc_dtos),
83 "documents": [doc.dict() for doc in analyzed_doc_dtos],
84 }
85 )
86 )
87 except Exception as e:
88 logger.error(f"Error analyzing documents: {str(e)}", exc_info=True)
89 return jsonify(
90 APIResponse.error(message=f"Error analyzing documents: {str(e)}")
91 )
92
93
94@document_bp.route("/documents/<int:document_id>/l0", methods=["GET"])

Callers

nothing calls this directly

Calls 4

analyze_all_documentsMethod · 0.80
successMethod · 0.80
errorMethod · 0.80
dictMethod · 0.45

Tested by

no test coverage detected