async def convert(self, file_path: str, **kwargs: Any) -> Union[None, DocumentConverterResult]:
        """Convert a file to markdown using the appropriate converter.

        Args:
            file_path: Path to the file to convert
            **kwargs: Additional arguments to pass to the converter

        Returns:
            DocumentConverterResult or None if conversion fails

        Raises:
            ValueError: If file type is not supported or file doesn't exist
        """
        if not os.path.exists(file_path):
            raise ValueError(f"File not found: {file_path}")

        # Get file extension
        _, extension = os.path.splitext(file_path)
        if not extension:
            raise ValueError("File must have an extension")

        extension = extension.lower()
        if extension not in self.SUPPORTED_EXTENSIONS:
            raise ValueError(f"Unsupported file type: {extension}")

        # Get the appropriate converter
        converter = self.get_converter(file_path)
        if not converter:
            raise ValueError(f"No converter found for file type: {extension}")

        # Add default kwargs
        if "file_extension" not in kwargs:
            kwargs["file_extension"] = extension
        if "llm_client" not in kwargs and self._llm_client:
            kwargs["llm_client"] = self._llm_client
        if "llm_model" not in kwargs and self._llm_model:
            kwargs["llm_model"] = self._llm_model

        try:
            result = await converter.convert(file_path, **kwargs)
            return result
        except Exception as e:
            logger.error(f"Error converting file {file_path}: {str(e)}")
            return None
Convert a file to markdown using the appropriate converter.

        Args:
            file_path: Path to the file to convert
            **kwargs: Additional arguments to pass to the converter

        Returns:
            DocumentConverterResult or None if conversion fails

        Raises:
            ValueError: If file type is not supported or file doesn't exist
        
backend/airweave/platform/file_handling/conversion/factory.py