

@cache
def summary(title, sentences=0, chars=0, auto_suggest=True, redirect=True):
    '\n  Plain text summary of the page.\n\n  .. note:: This is a convenience wrapper - auto_suggest and redirect are enabled by default\n\n  Keyword arguments:\n\n  * sentences - if set, return the first `sentences` sentences (can be no greater than 10).\n  * chars - if set, return only the first `chars` characters (actual text returned may be slightly longer).\n  * auto_suggest - let Wikipedia find a valid page title for the query\n  * redirect - allow redirection without raising RedirectError\n  '
    page_info = page(title, auto_suggest=auto_suggest, redirect=redirect)
    title = page_info.title
    pageid = page_info.pageid
    query_params = {
        'prop': 'extracts',
        'explaintext': '',
        'titles': title,
    }
    if sentences:
        query_params['exsentences'] = sentences
    elif chars:
        page_info['exchars'] = chars
    else:
        query_params['exintro'] = ''
    request = _wiki_request(query_params)
    summary = request['query']['pages'][pageid]['extract']
    return summary

dataset/ETHPy150Open goldsmith/Wikipedia/wikipedia/wikipedia.py summary/VarMisuse@97/332 `query_params`->`page_info`