From 6b02ddbb233572d08c7fb8e1d29f4a41e88f0a5a Mon Sep 17 00:00:00 2001 From: Freddie Date: Mon, 9 Oct 2023 18:35:53 -0700 Subject: [PATCH] Change user agent to comply with Wikimedia policy https://meta.wikimedia.org/wiki/User-Agent_policy --- src/autogpt_plugins/wikipedia_search/wikipedia_search.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/autogpt_plugins/wikipedia_search/wikipedia_search.py b/src/autogpt_plugins/wikipedia_search/wikipedia_search.py index 6a9683e0..d97a47f5 100644 --- a/src/autogpt_plugins/wikipedia_search/wikipedia_search.py +++ b/src/autogpt_plugins/wikipedia_search/wikipedia_search.py @@ -30,10 +30,7 @@ def _wikipedia_search(query: str, num_results: int = 5) -> str | list[str]: session.headers.update( { "User-Agent": ( - "Mozilla/5.0 (Windows NT 10.0; " - "Win64; x64) AppleWebKit/537.36 " - "(KHTML, like Gecko) Chrome/" - "112.0.5615.49 Safari/537.36" + "AutoGPT wikipedia_search plugin (https://news.agpt.co/contact/) Requests" ) } )