zhishiku_remote.py 572 B

1234567891011121314151617181920
  1. from plugins.common import settings
  2. import requests
  3. import json
  4. session = requests.Session()
  5. cunnrent_setting=settings.librarys.remote
  6. headers = {
  7. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36 Edg/94.0.992.31'}
  8. proxies = {"http": None,"https": None,}
  9. def find(search_query,step = 0):
  10. url = cunnrent_setting.host
  11. res = session.post(url, headers=headers, proxies=proxies,json={
  12. "prompt": search_query,
  13. "step": step
  14. })
  15. r = res.text
  16. return json.loads(r)
粤ICP备19079148号