trinity.buffer.viewer module#
- class trinity.buffer.viewer.SQLExperienceViewer(config: StorageConfig)[source]#
Bases:
object- __init__(config: StorageConfig) None[source]#
- get_experiences(offset: int, limit: int = 10, filters: Dict | None = None) List[Experience][source]#
- static run_viewer(model_path: str, db_url: str, table_name: str, schema_type: str, port: int) None[source]#
Start the Streamlit viewer.
- Parameters:
model_path (str) β Path to the tokenizer/model directory.
db_url (str) β Database URL for the experience database.
table_name (str) β Name of the experience table in the database.
schema_type (str) β Schema type of the experience table.
port (int) β Port number to run the Streamlit app on.
- trinity.buffer.viewer.render_experience(exp: Experience, tokenizer: Any) None[source]#
Render a single experience in Streamlit.
- trinity.buffer.viewer.get_viewer(db_url: str, table_name: str, schema_type: str) SQLExperienceViewer[source]#