def stream_complete(
        self, prompt: str, formatted: bool = False, **kwargs: Any
    ) -> CompletionResponseGen:
        """
        Stream the 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.

        Yields:
            CompletionResponse: The streamed response from the LLM.

        """
        logger.debug(f"Starting stream_complete with prompt: {prompt}")
        text = ""
        for response in self.client.generate(
            prompt=prompt,
            payload=self._model_kwargs(**kwargs),
            headers=self._prepare_headers(kwargs.pop("headers", {})),
            stream=True,
        ):
            logger.debug(f"Received chunk: {response}")
            if len(response.get("choices", [])) > 0:
                delta = response["choices"][0].get("text")
                if delta is None:
                    delta = ""
            else:
                delta = ""
            text += delta

            yield CompletionResponse(
                delta=delta,
                text=text,
                raw=response,
                additional_kwargs=_get_response_token_counts(response),
            )

        Stream the 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.

        Yields:
            CompletionResponse: The streamed response from the LLM.

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