mirror of https://github.com/xtekky/gpt4free.git
fixes #143 missing cf_clearance raises error
Phind Search.create now raises ValueError if missing cf_clearance.
This commit is contained in:
parent
7e858de0d4
commit
670b2b664e
|
@ -53,7 +53,7 @@ class PhindResponse:
|
|||
|
||||
class Search:
|
||||
def create(prompt: str, actualSearch: bool = True, language: str = 'en') -> dict: # None = no search
|
||||
if user_agent == '':
|
||||
if user_agent == '' or cf_clearance == '':
|
||||
raise ValueError('user_agent must be set, refer to documentation')
|
||||
|
||||
if not actualSearch:
|
||||
|
@ -281,4 +281,4 @@ class StreamingCompletion:
|
|||
|
||||
@staticmethod
|
||||
def handle_stream_response(response):
|
||||
StreamingCompletion.message_queue.put(response)
|
||||
StreamingCompletion.message_queue.put(response)
|
||||
|
|
Loading…
Reference in New Issue