trinity.buffer.viewer module#
- class trinity.buffer.viewer.SQLExperienceViewer(config: StorageConfig)[源代码]#
基类:
object- __init__(config: StorageConfig) None[源代码]#
- get_experiences(offset: int, limit: int = 10, filters: Dict | None = None) List[Experience][源代码]#
- static run_viewer(model_path: str, db_url: str, table_name: str, schema_type: str, port: int) None[源代码]#
Start the Streamlit viewer.
- 参数:
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[源代码]#
Render a single experience in Streamlit.
- trinity.buffer.viewer.get_viewer(db_url: str, table_name: str, schema_type: str) SQLExperienceViewer[源代码]#