def _rebuild_url(
    url: str, params: QueryParamTypes = None
) -> Tuple[str, str, QueryParamTypes]:
    """
    Rebuild url and return the full URL, the URL without the query, and the query parameters.
    """
    parsed_url = urllib.parse.urlparse(url)
    query_items = urllib.parse.parse_qsl(parsed_url.query)

    query = httpx.QueryParams(query_items)
    if params:
        query = query.merge(params)

    full_url = urllib.parse.ParseResult(
        parsed_url.scheme,
        parsed_url.netloc,
        parsed_url.path,
        params="",
        query=str(query),
        fragment=parsed_url.fragment,
    )
    url_without_query = urllib.parse.ParseResult(
        parsed_url.scheme,
        parsed_url.netloc,
        parsed_url.path,
        params="",
        query="",
        fragment=parsed_url.fragment,
    )
    return full_url.geturl(), url_without_query.geturl(), query.multi_items()

    Rebuild url and return the full URL, the URL without the query, and the query parameters.
    
llama-index-utils/llama-index-utils-qianfan/llama_index/utils/qianfan/client.py