Conversation Service¶
Overview¶
The ConversationService manages chat conversations between users and the AI system. It handles the storage, retrieval, and processing of conversation histories in Azure Blob Storage.
Key Methods¶
initializeNewConversation¶
Initializes a new conversation: - Creates a new conversation with empty chat history - Sets up initial metadata with user ID and timestamp - Stores the conversation data in Azure Blob Storage
getConversationHistoryAndStatus¶
async getConversationHistoryAndStatus(conversationUUID: string): Promise<{
chatHistory: any[];
metadata: any;
}>
Retrieves conversation history and metadata: - Fetches conversation data from Azure Blob Storage - Returns chat history and metadata - Handles errors gracefully
updateConversationHistory¶
Updates conversation history with a new message: - Retrieves existing conversation data - Adds the new message to chat history - Stores the updated data back to Azure Blob Storage
updateConversationMetadata¶
Updates conversation metadata: - Retrieves existing conversation data - Updates the metadata with provided values - Stores the updated data back to Azure Blob Storage
Dependencies¶
- BlobService: For storing and retrieving conversation data in Azure Blob Storage