From 9ab880a82640b7bf30883237591cb6c670526b2c Mon Sep 17 00:00:00 2001 From: Bagus Indrayana Date: Thu, 17 Aug 2023 21:18:15 +0800 Subject: add proxy and remove stream --- g4f/Provider/Providers/V50.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'g4f/Provider') diff --git a/g4f/Provider/Providers/V50.py b/g4f/Provider/Providers/V50.py index 17b26be9..52a42d78 100644 --- a/g4f/Provider/Providers/V50.py +++ b/g4f/Provider/Providers/V50.py @@ -36,7 +36,7 @@ def _create_completion(model: str, messages: list, stream: bool, temperature: fl 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' } response = requests.post("https://p5.v50.ltd/api/chat-process", - json=payload, headers=headers, stream=True) + json=payload, headers=headers, proxies=kwargs['proxy'] if 'proxy' in kwargs else {}) yield response.text params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \ -- cgit v1.2.3