Skip to content

Service

AbstractReadOnlyUnitOfWork

Bases: AbstractDatabaseUnitOfWork, ABC

repository instance-attribute

commit()

flush()

SessionDatabaseReadOnlyUnitOfWork

Bases: SessionDatabaseUnitOfWork, AbstractReadOnlyUnitOfWork

repository_class = DatabaseReadOnlyRepository class-attribute

get_assistant_max_steps(uow, assistant_id) async

Load the max steps from an assistant config.

get_code_chunks_by_pk_ids(uow, chunk_ids) async

Load code chunks from the database by their ids.

Note: Any missing chunks will be returned as None.

get_config(uow, config_id, expected_type=None) async

Load a config schema from the database.

get_configs(uow, config_ids, expected_type, fully_loaded=True) async

Load a list of config schemas from the database.

get_conversation(uow, conv_id, fully_loaded=True) async

get_conversation_messages(uow, conv_id) async

get_conversation_sub_assistant_run_info(uow, parent_conv_id) async

Load sub-assistant run info from the database.

get_langgraph_settings_from_assistant_id(uow, assistant_id) async

Load langgraph settings from an assistant config.

get_messages_by_ids(uow, message_ids) async

Load messages from the database by their ids.

get_user_by_pk_id(uow, pk_id) async

get_user_conversation_stats(uow, user_id) async

Load conversation stats for a user.

get_user_conversations(uow, user_id, with_messages=False) async

get_user_specific_github_api_key(uow, pk_id) async

Get the user specific github api key from the users pk_id.