langchain_community.docstore.wikipedia.Wikipedia¶

class langchain_community.docstore.wikipedia.Wikipedia[source]¶

Wrapper around wikipedia API.

Check that wikipedia package is installed.

Methods

__init__()

Check that wikipedia package is installed.

delete(ids)

Deleting IDs from in memory dictionary.

search(search)

Try to search for wiki page.

__init__() None[source]¶

Check that wikipedia package is installed.

delete(ids: List) None¶

Deleting IDs from in memory dictionary.

search(search: str) Union[str, Document][source]¶

Try to search for wiki page.

If page exists, return the page summary, and a PageWithLookups object. If page does not exist, return similar entries.

Parameters

search – search string.

Returns: a Document object or error message.