You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WikipediaSearchTool searches Wikipedia and returns a summary or full text of the given topic, along with the page URL.
267
+
268
+
Attributes:
269
+
user_agent (str): A custom user-agent string to identify the project. This is required as per Wikipedia API policies, read more here: http://github.com/martin-majlis/Wikipedia-API/blob/master/README.rst
270
+
language (str): The language in which to retrieve Wikipedia articles.
271
+
http://meta.wikimedia.org/wiki/List_of_Wikipedias
272
+
content_type (str): Defines the content to fetch. Can be "summary" for a short summary or "text" for the full article.
273
+
extract_format (str): Defines the output format. Can be `"WIKI"` or `"HTML"`.
274
+
275
+
Example:
276
+
>>> from smolagents import CodeAgent, HfApiModel, WikipediaSearchTool
0 commit comments