binary-husky / gpt_academic

为GPT/GLM等LLM大语言模型提供实用化交互接口,特别优化论文阅读/润色/写作体验,模块化设计,支持自定义快捷按钮&函数插件,支持Python和C++等项目剖析&自译解功能,PDF/LaTex论文翻译&总结功能,支持并行问询多种LLM模型,支持chatglm3等本地模型。接入通义千问, deepseekcoder, 讯飞星火, 文心一言, llama2, rwkv, claude2, moss等。
https://github.com/binary-husky/gpt_academic/wiki/online
GNU General Public License v3.0
64.4k stars 7.97k forks source link

[Bug]: `Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.` occurs when using newbing #931

Open Sillyringo opened 1 year ago

Sillyringo commented 1 year ago

Installation Method | 安装方法与平台

Anaconda (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Mac

Describe the bug | 简述

After configuring gpt_academic on one of my mac devices and successfully using newbing, I tried to reproduce it on another mac device but encountered the Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue. bug. Both devices use the same config.py and the same proxy.

Screen Shot | 有帮助的截图

image

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

Traceback (most recent call last): File "./request_llm/bridge_newbingfree.py", line 152, in run asyncio.run(self.async_run()) File "/Users/huangyunlei/miniconda3/envs/gptac_venv/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/Users/huangyunlei/miniconda3/envs/gptac_venv/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/huangyunlei/miniconda3/envs/gptac_venv/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "./request_llm/bridge_newbingfree.py", line 98, in async_run async for final, response in self.newbing_model.ask_stream( File "./request_llm/edge_gpt_free.py", line 676, in ask_stream async for response in self.chat_hub.ask_stream( File "./request_llm/edge_gpt_free.py", line 567, in ask_stream raise Exception( Exception: CaptchaChallenge: User needs to solve CAPTCHA to continue.

binary-husky commented 1 year ago

https://github.com/acheong08/EdgeGPT/issues/586

Administor123 commented 1 year ago

acheong08/EdgeGPT#586

你好,请问这两段代码需要加在项目的哪个位置呢 `def getCookies(url): import browser_cookie3 browsers = [

browser_cookie3.chrome,

    # browser_cookie3.chromium,
    # browser_cookie3.opera,
    # browser_cookie3.opera_gx,
    # browser_cookie3.brave,
    browser_cookie3.edge,
    # browser_cookie3.vivaldi,
    # browser_cookie3.firefox,
    # browser_cookie3.librewolf,
    # browser_cookie3.safari,
]
for browser_fn in browsers:
    # if browser isn't installed browser_cookie3 raises exception
    # hence we need to ignore it and try to find the right one
    try:
        cookies = []
        cj = browser_fn(domain_name=url)
        for cookie in cj:
            cookies.append(cookie.__dict__)
        return cookies
    except:
        continue`

bot = EdgeGPT.Chatbot(cookies=getCookies('.bing.com'))

Administor123 commented 1 year ago

你好,请问你解决了吗

Sillyringo commented 1 year ago

你好,请问你解决了吗

没喔,感觉必应好不稳定,啥 bug 都有,我懒得折腾了