SessionsResource
Session API methods.
Functions
func__init__(self, client) -> NoneInitialize the resource.
paramselfparamclientKitaruAPIClientAPI client used to send requests.
Returns
Nonefunccreate(self, request, idempotency_key=None) -> SessionResponseCreate a session.
paramselfparamrequestSessionCreateRequestSession create request.
paramidempotency_keystr | None= NoneIdempotency key overriding the transport's random default.
Returns
kitaru.api_models.v1.session.SessionResponseCreated session.
funcget(self, session_id) -> SessionDetailResponseGet a session by id.
paramselfparamsession_iduuid.UUIDId of the session.
Returns
kitaru.api_models.v1.session.SessionDetailResponseStored session.
funcget_with_nodes(self, session_id) -> SessionWithNodesResponseGet a session together with every one of its nodes.
The node list is not paginated, so one call carries a whole session.
paramselfparamsession_iduuid.UUIDId of the session.
Returns
kitaru.api_models.v1.session_node.SessionWithNodesResponseSession with every node, ordered by index.
funcingest_nodes(self, session_id, batch) -> list[SessionNodeResponse]Ingest a batch of session nodes.
An index already stored is replaced whole.
paramselfparamsession_iduuid.UUIDId of the session to ingest into.
parambatchSessionNodeBatchRequestSession node batch request.
Returns
listStored nodes in batch order.
funccreate_evaluations(self, session_id, request) -> list[EvaluationResponse]Create manual evaluations on a session.
paramselfparamsession_iduuid.UUIDId of the session to create evaluations on.
paramrequestSessionEvaluationsRequestSession evaluations request.
Returns
listStored evaluations in request order.
funclist(self, params=None) -> Page[SessionResponse] | Page[SessionDetailResponse]List sessions.
paramselfparamparamsSessionListParams | None= NoneSession list params.
Returns
Page[SessionResponse] | Page[SessionDetailResponse]Page of sessions, with payloads when include_payloads is set.
funciter(self, params=None) -> AsyncIterator[SessionResponse]Iterate over all sessions.
paramselfparamparamsSessionListParams | None= NoneSession list params.
Returns
collections.abc.AsyncIteratorAsync iterator over every session.
funcupdate(self, session_id, request) -> SessionResponseUpdate a session.
paramselfparamsession_iduuid.UUIDId of the session.
paramrequestSessionUpdateRequestSession update request, unset fields stay unchanged.
Returns
kitaru.api_models.v1.session.SessionResponseUpdated session.
funcdelete(self, session_id) -> NoneDelete a session.
paramselfparamsession_iduuid.UUIDId of the session.
Returns
Nonefunclist_nodes(self, session_id, params=None) -> Page[SessionNodeResponse]List the nodes of a session, ordered by index ascending.
paramselfparamsession_iduuid.UUIDId of the session.
paramparamsSessionNodeListParams | None= NoneSession node list params.
Returns
kitaru.api_models.v1.base.PagePage of session nodes, ordered by index.
funciter_nodes(self, session_id, params=None) -> AsyncIterator[SessionNodeResponse]Iterate over every node of a session, ordered by index ascending.
paramselfparamsession_iduuid.UUIDId of the session.
paramparamsSessionNodeListParams | None= NoneSession node list params.
Returns
collections.abc.AsyncIteratorAsync iterator over every node of the session.