def stream_complete(self, prompt: str, **kwargs: Any) -> CompletionResponseGen:
        """
        Send a streaming completion request to the Reka API.

        Args:
            prompt (str): The prompt for completion.
            **kwargs: Additional keyword arguments for the API call.

        Returns:
            CompletionResponseGen: A generator yielding completion responses.

        Raises:
            ValueError: If there's an error with the Reka API call.

        Example:
            >>> reka_llm = RekaLLM(api_key="your-api-key-here")
            >>> prompt = "Write a haiku about programming:"
            >>> for chunk in reka_llm.stream_complete(prompt):
            ...     print(chunk.delta, end="", flush=True)

        """
        all_kwargs = self._get_all_kwargs(**kwargs)
        try:
            stream = self._client.chat.create_stream(
                messages=[{"role": "user", "content": prompt}], **all_kwargs
            )
        except ApiError as e:
            raise ValueError(f"Reka API error: {e.status_code} - {e.body}")

        def gen() -> CompletionResponseGen:
            prev_text = ""
            for chunk in stream:
                text = chunk.responses[0].chunk.content
                text_delta = text[len(prev_text) :]
                prev_text = text
                yield CompletionResponse(
                    text=text,
                    delta=text_delta,
                    raw=chunk.__dict__,
                )

        return gen()

        Send a streaming completion request to the Reka API.

        Args:
            prompt (str): The prompt for completion.
            **kwargs: Additional keyword arguments for the API call.

        Returns:
            CompletionResponseGen: A generator yielding completion responses.

        Raises:
            ValueError: If there's an error with the Reka API call.

        Example:
            >>> reka_llm = RekaLLM(api_key="your-api-key-here")
            >>> prompt = "Write a haiku about programming:"
            >>> for chunk in reka_llm.stream_complete(prompt):
            ...     print(chunk.delta, end="", flush=True)

        
llama-index-integrations/llms/llama-index-llms-reka/llama_index/llms/reka/base.py