import streamlit as st import graphrag import inspect st.title("GraphRAG Module Explorer") # Display all attributes and functions in the graphrag module st.header("GraphRAG Module Contents") graphrag_contents = dir(graphrag) for item in graphrag_contents: attr = getattr(graphrag, item) st.subheader(f"{item}") st.write(f"Type: {type(attr)}") if inspect.isclass(attr): st.write("Class Methods:") for name, method in inspect.getmembers(attr, predicate=inspect.isfunction): st.write(f"- {name}") st.write(f" Signature: {inspect.signature(method)}") st.write(f" Docstring: {method.__doc__}") elif inspect.isfunction(attr): st.write("Function:") st.write(f"Signature: {inspect.signature(attr)}") st.write(f"Docstring: {attr.__doc__}") elif isinstance(attr, (int, float, str, bool)): st.write(f"Value: {attr}") st.write("---") # Display the module's docstring if available if graphrag.__doc__: st.header("GraphRAG Module Documentation") st.write(graphrag.__doc__) st.header("Next Steps") st.write(""" Based on the information above, we need to determine: 1. How to create a graph representation of text using graphrag. 2. How to process this graph representation for analysis. 3. Whether graphrag provides any built-in analysis tools or if we need to integrate it with other libraries. Please review the module contents and let me know which components seem most relevant for our text analysis task. """)