async def test_chat_request(self):
        """Ensures that chat method calls _request when stream=False."""
        messages = [{"role": "user", "content": "Hello"}]
        response_json = {"choices": [{"message": {"content": "Hi"}}]}
        response_mock = AsyncMock()
        response_mock.status_code = 200
        response_mock.json = AsyncMock(return_value=response_json)
        response_mock.raise_for_status = Mock()

        self.client._client.post.return_value = response_mock

        result = await self.client.chat(messages=messages, stream=False)

        assert await result == response_json
Ensures that chat method calls _request when stream=False.
llama-index-integrations/llms/llama-index-llms-oci-data-science/tests/test_oci_data_science_client.py