summaryrefslogtreecommitdiffstats
path: root/gpt4free/you/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gpt4free/you/__init__.py')
-rw-r--r--gpt4free/you/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/gpt4free/you/__init__.py b/gpt4free/you/__init__.py
index 97b48464..d084a842 100644
--- a/gpt4free/you/__init__.py
+++ b/gpt4free/you/__init__.py
@@ -30,12 +30,16 @@ class Completion:
include_links: bool = False,
detailed: bool = False,
debug: bool = False,
+ proxy: Optional[str] = None
) -> PoeResponse:
if chat is None:
chat = []
+ proxies = { 'http': 'http://' + proxy, 'https': 'http://' + proxy } if proxy else {}
+
client = Session(client_identifier='chrome_108')
client.headers = Completion.__get_headers()
+ client.proxies = proxies
response = client.get(
f'https://you.com/api/streamingSearch',