t.me/xtekky
commited on
Commit
·
77006dd
1
Parent(s):
4f94ba1
phind removed cloudflare
Browse files- phind/README.md +3 -3
- phind/__init__.py +1 -1
- {phind → testing}/phind_test.py +4 -4
phind/README.md
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
```python
|
4 |
import phind
|
5 |
|
6 |
-
# set cf_clearance cookie
|
7 |
-
phind.cf_clearance = 'xx.xx-1682166681-0-160'
|
8 |
-
phind.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' # same as the one from browser you got cf_clearance from
|
9 |
|
10 |
prompt = 'who won the quatar world cup'
|
11 |
|
|
|
3 |
```python
|
4 |
import phind
|
5 |
|
6 |
+
# set cf_clearance cookie (not needed anymore)
|
7 |
+
# phind.cf_clearance = 'xx.xx-1682166681-0-160'
|
8 |
+
# phind.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' # same as the one from browser you got cf_clearance from
|
9 |
|
10 |
prompt = 'who won the quatar world cup'
|
11 |
|
phind/__init__.py
CHANGED
@@ -8,7 +8,7 @@ from re import findall
|
|
8 |
from curl_cffi.requests import post
|
9 |
|
10 |
cf_clearance = ''
|
11 |
-
user_agent = ''
|
12 |
|
13 |
class PhindResponse:
|
14 |
|
|
|
8 |
from curl_cffi.requests import post
|
9 |
|
10 |
cf_clearance = ''
|
11 |
+
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36'
|
12 |
|
13 |
class PhindResponse:
|
14 |
|
{phind → testing}/phind_test.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
import phind
|
2 |
|
3 |
-
# set cf_clearance cookie
|
4 |
-
phind.cf_clearance = '
|
5 |
-
phind.user_agent
|
6 |
|
7 |
prompt = 'hello world'
|
8 |
|
@@ -22,7 +22,7 @@ prompt = 'who won the quatar world cup'
|
|
22 |
# help needed: not getting newlines from the stream, please submit a PR if you know how to fix this
|
23 |
# stream completion
|
24 |
for result in phind.StreamingCompletion.create(
|
25 |
-
model = 'gpt-
|
26 |
prompt = prompt,
|
27 |
results = phind.Search.create(prompt, actualSearch = True), # create search (set actualSearch to False to disable internet)
|
28 |
creative = False,
|
|
|
1 |
import phind
|
2 |
|
3 |
+
# set cf_clearance cookie ( not needed at the moment)
|
4 |
+
phind.cf_clearance = ''
|
5 |
+
phind.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36'
|
6 |
|
7 |
prompt = 'hello world'
|
8 |
|
|
|
22 |
# help needed: not getting newlines from the stream, please submit a PR if you know how to fix this
|
23 |
# stream completion
|
24 |
for result in phind.StreamingCompletion.create(
|
25 |
+
model = 'gpt-4',
|
26 |
prompt = prompt,
|
27 |
results = phind.Search.create(prompt, actualSearch = True), # create search (set actualSearch to False to disable internet)
|
28 |
creative = False,
|