feat: enhance multimodal image processing and session management
- Updated configuration to support three tasks in the assistant's prompt: rewriting questions, classifying intent for knowledge base retrieval, and analyzing attached images. - Implemented backend functionality to update image descriptions in user messages, ensuring that image context is preserved across conversation history. - Modified session handling to return complete session data after updates, improving the accuracy of session information provided to users. - Enhanced the chat pipeline to include detailed image descriptions and manage image captions effectively, enriching user interactions with visual content. These improvements significantly enhance the application's multimodal capabilities, providing a more robust and user-friendly experience when handling image-based queries.
This commit is contained in:
@@ -237,6 +237,11 @@ func (s *messageService) UpdateMessage(ctx context.Context, message *types.Messa
|
||||
return nil
|
||||
}
|
||||
|
||||
// UpdateMessageImages updates only the images JSONB column for a message.
|
||||
func (s *messageService) UpdateMessageImages(ctx context.Context, sessionID, messageID string, images types.MessageImages) error {
|
||||
return s.messageRepo.UpdateMessageImages(ctx, sessionID, messageID, images)
|
||||
}
|
||||
|
||||
// DeleteMessage removes a message from a session, also cleaning up its Knowledge entry in the chat history KB.
|
||||
func (s *messageService) DeleteMessage(ctx context.Context, sessionID string, messageID string) error {
|
||||
logger.Info(ctx, "Start deleting message")
|
||||
|
||||
Reference in New Issue
Block a user