async def achat(
        self, messages: Sequence[ChatMessage], **kwargs: Any
    ) -> ChatResponse:
        """
        Send an asynchronous chat request to the Reka API.

        Args:
            messages (Sequence[ChatMessage]): A sequence of chat messages.
            **kwargs: Additional keyword arguments for the API call.

        Returns:
            ChatResponse: The response from the Reka API.

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

        Example:
            >>> import asyncio
            >>> from llama_index.llms.reka import RekaLLM
            >>> from llama_index.core.base.llms.types import ChatMessage, MessageRole
            >>>
            >>> async def main():
            ...     reka_llm = RekaLLM(api_key="your-api-key-here")
            ...     messages = [
            ...         ChatMessage(role=MessageRole.SYSTEM, content="You are a helpful assistant."),
            ...         ChatMessage(role=MessageRole.USER, content="What's the meaning of life?")
            ...     ]
            ...     response = await reka_llm.achat(messages)
            ...     print(response.message.content)
            >>>
            >>> asyncio.run(main())

        """
        all_kwargs = self._get_all_kwargs(**kwargs)
        reka_messages = process_messages_for_reka(messages)

        try:
            response = await self._aclient.chat.create(
                messages=reka_messages, **all_kwargs
            )
            return ChatResponse(
                message=ChatMessage(
                    role=MessageRole.ASSISTANT,
                    content=response.responses[0].message.content,
                ),
                raw=response.__dict__,
            )
        except ApiError as e:
            raise ValueError(f"Reka API error: {e.status_code} - {e.body}")

        Send an asynchronous chat request to the Reka API.

        Args:
            messages (Sequence[ChatMessage]): A sequence of chat messages.
            **kwargs: Additional keyword arguments for the API call.

        Returns:
            ChatResponse: The response from the Reka API.

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

        Example:
            >>> import asyncio
            >>> from llama_index.llms.reka import RekaLLM
            >>> from llama_index.core.base.llms.types import ChatMessage, MessageRole
            >>>
            >>> async def main():
            ...     reka_llm = RekaLLM(api_key="your-api-key-here")
            ...     messages = [
            ...         ChatMessage(role=MessageRole.SYSTEM, content="You are a helpful assistant."),
            ...         ChatMessage(role=MessageRole.USER, content="What's the meaning of life?")
            ...     ]
            ...     response = await reka_llm.achat(messages)
            ...     print(response.message.content)
            >>>
            >>> asyncio.run(main())

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