Skip to content

Commit

Permalink
fixes xtekky#143 missing cf_clearance raises error
Browse files Browse the repository at this point in the history
Phind Search.create now raises ValueError if missing cf_clearance.
  • Loading branch information
Johannes committed Apr 26, 2023
1 parent 7e858de commit 670b2b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phind/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def json(self) -> dict:

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:
Expand Down Expand Up @@ -281,4 +281,4 @@ def create(

@staticmethod
def handle_stream_response(response):
StreamingCompletion.message_queue.put(response)
StreamingCompletion.message_queue.put(response)

0 comments on commit 670b2b6

Please sign in to comment.