返回提交历史
Modified
phind/README.md
+3
-3
Modified
phind/__init__.py
+1
-1
Renamed
testing/phind_test.py
+4
-4
XFEstudio/gpt4free
phind removed cloudflare
77006dd9
代码差异
3 个文件
+8
-8
@@ -3,9 +3,9 @@
3
3
```python
4
4
import phind
5
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
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
9
10
10
prompt = 'who won the quatar world cup'
11
11
@@ -8,7 +8,7 @@ from re import findall
8
8
from curl_cffi.requests import post
9
9
10
10
cf_clearance = ''
11
user_agent = ''
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
12
13
13
class PhindResponse:
14
14
@@ -1,8 +1,8 @@
1
1
import phind
2
2
3
# set cf_clearance cookie
4
phind.cf_clearance = 'heguhSRBB9d0sjLvGbQECS8b80m2BQ31xEmk9ChshKI-1682268995-0-160'
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'
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
6
7
7
prompt = 'hello world'
8
8
@@ -22,7 +22,7 @@ prompt = 'who won the quatar world cup'
22
22
# help needed: not getting newlines from the stream, please submit a PR if you know how to fix this
23
23
# stream completion
24
24
for result in phind.StreamingCompletion.create(
25
model = 'gpt-3.5',
25
model = 'gpt-4',
26
26
prompt = prompt,
27
27
results = phind.Search.create(prompt, actualSearch = True), # create search (set actualSearch to False to disable internet)
28
28
creative = False,