Usage Pattern
All repository classes follow the same pattern:- Call
initialization()
with required parameters - Invoke the respective
_fetch_...
method
Repository Classes
CompanyRepository
_fetch_company_data
Retrieves company metadata from MongoDB using _id
.
Parameters:
company_id: str
collection_name: str
ChatSessionRepository
_fetch_chat_session_model_data
Retrieves chat session data from MongoDB using _id
.
Parameters:
company_id: str
collection_name: str
LLMModelRepository
_fetch_company_model_data
Retrieves LLM configuration data using API key identifier.
Parameters:
api_key_id: str
collection_name: str
EmbeddingModelRepository
_fetch_company_model_data
Fetches embedding model configurations and vector settings.
Parameters:
api_key_id: str
collection_name: str
FileRepository
_fetch_file_model_data
Retrieves file metadata for user or system files.
Parameters:
file_id: str
collection_name: str
ChatMemberRepository
_fetch_chat_member_model_data
Fetches chat participant data for session management.
Parameters:
chat_session_id: str
collection_name: str
Implementation Notes
- Always call
initialization()
before using_fetch_...
methods - Methods return native Python dictionaries from MongoDB
- Error handling should be implemented in calling code
- These are low-level data access methods for internal use
For higher-level APIs, refer to the API reference.