async def acomplete(
        self, prompt: str, formatted: bool = False, **kwargs: Any
    ) -> CompletionResponse:
        """
        Asynchronously generate a completion for the given prompt.

        Args:
            prompt (str): The prompt to generate a completion for.
            formatted (bool): Whether the prompt is formatted.
            **kwargs: Additional keyword arguments.

        Returns:
            CompletionResponse: The response from the LLM.

        """
        logger.debug(f"Calling acomplete with prompt: {prompt}")
        response = await self.async_client.generate(
            prompt=prompt,
            payload=self._model_kwargs(**kwargs),
            headers=self._prepare_headers(kwargs.pop("headers", {})),
            stream=False,
        )

        logger.debug(f"Received async response: {response}")
        try:
            choice = response["choices"][0]
            text = choice.get("text", "")
            logprobs = _from_completion_logprobs_dict(choice.get("logprobs", {}) or {})

            return CompletionResponse(
                text=text,
                raw=response,
                logprobs=logprobs,
                additional_kwargs=_get_response_token_counts(response),
            )
        except (IndexError, KeyError, TypeError) as e:
            raise ValueError(f"Failed to parse response: {e!s}") from e

        Asynchronously generate a completion for the given prompt.

        Args:
            prompt (str): The prompt to generate a completion for.
            formatted (bool): Whether the prompt is formatted.
            **kwargs: Additional keyword arguments.

        Returns:
            CompletionResponse: The response from the LLM.

        
llama-index-integrations/llms/llama-index-llms-oci-data-science/llama_index/llms/oci_data_science/base.py