MCPcopy Create free account
hub / github.com/Alibaba-NLP/VRAG / init_session_state

Function init_session_state

demo/vimrag_app.py:574–587  ·  view source on GitHub ↗

初始化 session state

()

Source from the content-addressed store, hash-verified

572
573# ==================== 辅助函数 ====================
574def init_session_state():
575 """初始化 session state"""
576 defaults = {
577 'vis_nodes': [],
578 'vis_edges': [],
579 'process_log': [],
580 'is_running': False,
581 'current_query': '',
582 'last_node_id': None,
583 'step_count': 0
584 }
585 for key, value in defaults.items():
586 if key not in st.session_state:
587 st.session_state[key] = value
588
589
590def reset_state():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected