MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / fetch_all_for_session

Function fetch_all_for_session

app/api/agentops/exporter/processor.py:182–190  ·  view source on GitHub ↗

Fetch all records for a session from a given table

(model_class: BaseModel, session_id)

Source from the content-addressed store, hash-verified

180
181
182async def fetch_all_for_session(model_class: BaseModel, session_id) -> AsyncGenerator[BaseModel, None]:
183 """Fetch all records for a session from a given table"""
184 query = """
185 SELECT * FROM {table_name}
186 WHERE session_id = '{session_id}'
187 """
188 exporter = supabase[model_class]
189 async for result in exporter.fetchall(query, session_id=session_id):
190 yield result
191
192
193async def get_session_as_trace(session: Session) -> Trace:

Callers 1

get_session_as_traceFunction · 0.85

Calls 1

fetchallMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…