def parse_stream_chat_response(
    resp_dict_iter: Iterable[Dict],
) -> Iterable[ChatResponse]:
    """
    Parse streaming chat response.

    :param resp_dict_iter: Iterator of the response body in dict form.
    :return: Iterator of the ChatResponse object.
    """
    content = ""
    for resp_dict in resp_dict_iter:
        resp = ChatResp(**resp_dict)
        content += resp.result
        yield ChatResponse(
            message=ChatMessage(role=MessageRole.ASSISTANT, content=content),
            delta=resp.result,
        )

    Parse streaming chat response.

    :param resp_dict_iter: Iterator of the response body in dict form.
    :return: Iterator of the ChatResponse object.
    
llama-index-integrations/llms/llama-index-llms-qianfan/llama_index/llms/qianfan/base.py