返回提交历史
Modified
phind/__init__.py
+2
-2
XFEstudio/gpt4free
fixes #143 missing cf_clearance raises error
Phind Search.create now raises ValueError if missing cf_clearance.
670b2b66
代码差异
1 个文件
+2
-2
@@ -53,7 +53,7 @@ class PhindResponse:
53
53
54
54
class Search:
55
55
def create(prompt: str, actualSearch: bool = True, language: str = 'en') -> dict: # None = no search
56
if user_agent == '':
56
if user_agent == '' or cf_clearance == '':
57
57
raise ValueError('user_agent must be set, refer to documentation')
58
58
59
59
if not actualSearch:
@@ -281,4 +281,4 @@ class StreamingCompletion:
281
281
282
282
@staticmethod
283
283
def handle_stream_response(response):
284
StreamingCompletion.message_queue.put(response)
284
StreamingCompletion.message_queue.put(response)