def test_custom_device_and_use_inference_cache(self):
        """Test setting custom values for optional fields."""
        request = InferenceRequest(
            modality=Modality.AUDIO,
            contents=["audio1.mp3"],
            device="cuda",
            use_inference_cache=True,
            model_config=self.model_config,
            preprocessing_config=AudioPreprocessingConfig(),
            return_individual_error=False,
        )
        self.assertEqual(request.device, "cuda")
        self.assertTrue(request.use_inference_cache)
        self.assertFalse(request.return_individual_error)
Test setting custom values for optional fields.
tests/unit_tests/marqo/core/inference/api/test_inference_model_classes.py