code: def test_request_validation():
      Request(inputs="test")
  
      with pytest.raises(ValidationError):
          Request(inputs="")
  
      Request(inputs="test", stream=True)
      Request(
          inputs="test",
          parameters=Parameters(best_of=2, do_sample=True),
      )
  
      with pytest.raises(ValidationError):
          Request(
              inputs="test",
              parameters=Parameters(best_of=2, do_sample=True),
              stream=True,
          )
  
imports: import pytest
  from text_generation.types import Parameters, Request
  from text_generation.errors import ValidationError
label_desc: Use image node_id 2 for calling a global function with example usage: test_request_validation() without return types