code: def test_chat_request():
      chat.RequestPayload(
          **{
              "messages": [{"role": "user", "content": "content"}],
          }
      )
      chat.RequestPayload(
          **{
              "messages": [{"role": "user", "content": "content"}],
              "n": 1000,
              "extra": "extra",
              "temperature": 2.0,
          }
      )
  
      with pytest.raises(
          pydantic.ValidationError, match="less than or equal to 2"
      ):
          chat.RequestPayload(
              **{
                  "messages": [{"role": "user", "content": "content"}],
                  "temperature": 3.0,
              }
          )
  
      with pytest.raises(
          pydantic.ValidationError, match="at least 1 item"
      ):
          chat.RequestPayload(
              **{
                  "messages": [{"role": "user", "content": "content"}],
                  "stop": [],
              }
          )
  
      with pytest.raises(
          pydantic.ValidationError, match="at least 1 item"
      ):
          chat.RequestPayload(**{"messages": []})
  
      with pytest.raises(
          pydantic.ValidationError, match=r"(?i)field required"
      ):
          chat.RequestPayload(**{})
  
imports: import pydantic
  import pytest
  from mlflow.gateway.schemas import chat
label_desc: Use image node_id 1 for calling a global function with example usage: test_chat_request() without return types