async def test_generate_request(self):
        """Ensures that generate method calls _request when stream=False."""
        response_json = {
            "object": "list",
            "data": [
                {
                    "object": "embedding",
                    "index": 0,
                    "embedding": [
                        -0.025584878,
                        0.023328023,
                        -0.03014998,
                    ],
                },
                {
                    "object": "embedding",
                    "index": 1,
                    "embedding": [
                        -0.025584878,
                        0.023328023,
                        -0.03014998,
                    ],
                },
            ],
        }
        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.embeddings(
            input=["Hello", "World"], payload={"param1": "value1"}
        )

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