async def request_async(
        self,
        endpoint: str,
        stream: bool,
        messages: Dict[str, Any],
        extra_headers: Dict[str, Any],
        **kwargs: Any,
    ) -> Dict[str, Any]:
        """
        Perform an asynchronous request to the NVIDIA API.

        Args:
            endpoint (str): The API endpoint to send the request to.
            messages (Dict[str, Any]): The request payload.

        Returns:
            Dict[str, Any]: The API response.

        """
        async with aiohttp.ClientSession() as session:
            async with session.post(
                endpoint,
                json={"messages": messages, "stream": stream, **kwargs},
                headers={**self._get_headers(stream=stream), **extra_headers},
            ) as response:
                response.raise_for_status()
                return await response.json()

        Perform an asynchronous request to the NVIDIA API.

        Args:
            endpoint (str): The API endpoint to send the request to.
            messages (Dict[str, Any]): The request payload.

        Returns:
            Dict[str, Any]: The API response.

        
llama-index-integrations/multi_modal_llms/llama-index-multi-modal-llms-nvidia/llama_index/multi_modal_llms/nvidia/base.py