GithubHelp home page GithubHelp logo

gpt4wechat's Introduction

GPT4wechat

将new bing的gpt-4和微信结合形成私人助理

步骤: 首先你需要登录有new bing资格的账号,使用cookie editor导出cookies.json保存到项目目录; 然后运行pip install -r requirements.txt安装所需要的库,最后运行gpt4wechat.py即可。 注意:如果微信提示新设备登录倒数5秒,需要在GPT4wechat/venv/lib/python3.9/site packages/itchat/components/login.py找到『'please press confirm on your phone.'』,加入一行『time.sleep(10)』再重新运行即可。

gpt4wechat's People

Contributors

etrobot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gpt4wechat's Issues

扫码确认后报错

这是什么原因呀 @etrobot

Please scan the QR code to log in.
Please press confirm on your phone.
Traceback (most recent call last):
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 597, in urlopen
    httplib_response = self._make_request(conn, method, url,
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 386, in _make_request
    six.raise_from(e, None)
  File "<string>", line 2, in raise_from
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 382, in _make_request
    httplib_response = conn.getresponse()
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 1344, in getresponse
    response.begin()
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\http\client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 429, in send
    resp = conn.urlopen(
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 648, in urlopen
    retries = retries.increment(method, url, error=e, _pool=self,
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\packages\urllib3\util\retry.py", line 388, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.weixin.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/login?loginicon=true&uuid=Qd89p5fmdQ==&tip=1&r=-1070630&_=1690525245 (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "gpt4wechat.py", line 73, in <module>
    wechat.startup()
  File "gpt4wechat.py", line 25, in startup
    itchat.auto_login(hotReload=True)
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\itchat\components\register.py", line 31, in auto_login
    self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\itchat\components\login.py", line 60, in login
    status = self.check_login()
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\itchat\components\login.py", line 148, in check_login
    r = self.s.get(url, params=params, headers=headers)
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 535, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 522, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\sessions.py", line 642, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\site-packages\requests\adapters.py", line 501, in send
    raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='login.weixin.qq.com', port=443): Max retries exceeded with url: /cgi-bin/mmwebwx-bin/login?loginicon=true&uuid=Qd89p5fmdQ==&tip=1&r=-1070630&_=1690525245 (Caused by ProxyError('Cannot connect to proxy.', RemoteDisconnected('Remote end closed connection without response')))

关于微信长期停驻

首先感谢作者,非常好用。然后想问一下,想在Railway部署的话,该如何设置?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.