async def achat(
        self,
        messages: Sequence[ChatMessage],
        **kwargs: Any,
    ) -> ChatResponse:
        """
        Asynchronous request for a chat.

        :param messages: The chat message list. The last message is the current request,
            and the previous messages are the historical chat information. The number of
            members must be odd, and the role value of the odd-numbered messages must be
            "user", while the role value of the even-numbered messages must be "assistant".
        :return: The ChatResponse object.
        """
        request = build_chat_request(stream=False, messages=messages, **kwargs)
        resp_dict = await self._client.apost(self.endpoint_url, json=request.dict())
        return parse_chat_response(resp_dict)

        Asynchronous request for a chat.

        :param messages: The chat message list. The last message is the current request,
            and the previous messages are the historical chat information. The number of
            members must be odd, and the role value of the odd-numbered messages must be
            "user", while the role value of the even-numbered messages must be "assistant".
        :return: The ChatResponse object.
        
llama-index-integrations/llms/llama-index-llms-qianfan/llama_index/llms/qianfan/base.py