QQisQQ 0c8c539e9b
解决new bing 报错200 (fix new bing error code 200 )
modify from 16e00af9d5

works for my issue:
```
Traceback (most recent call last):
  File "./request_llm/bridge_newbingfree.py", line 152, in run
    asyncio.run(self.async_run())
  File "/root/miniconda3/envs/py311/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/py311/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/py311/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 456, in ask_stream
    self.wss = await self.session.ws_connect(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/miniconda3/envs/py311/lib/python3.11/site-packages/aiohttp/client.py", line 795, in _ws_connect
    raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 200, message='Invalid response status', url=URL('wss://sydney.bing.com/sydney/ChatHub')
```
2023-07-19 04:39:15 +08:00
..
2023-07-16 15:03:05 +08:00
2023-06-30 12:06:28 +08:00
2023-07-09 00:20:58 +08:00
2023-07-16 15:03:05 +08:00
2023-05-06 23:39:57 +08:00
2023-05-06 23:39:57 +08:00
2023-05-20 12:23:46 +08:00
2023-04-15 15:24:18 +08:00
2023-04-15 15:24:18 +08:00
2023-07-16 15:03:05 +08:00

如何使用其他大语言模型

ChatGLM

  • 安装依赖 pip install -r request_llm/requirements_chatglm.txt
  • 修改配置在config.py中将LLM_MODEL的值改为"chatglm"
LLM_MODEL = "chatglm"
  • 运行!
`python main.py`

Claude-Stack

Newbing

  • 使用cookie editor获取cookiejson
  • 把cookiejson加入config.py NEWBING_COOKIES

Moss

  • 使用docker-compose

RWKV

  • 使用docker-compose

LLAMA

  • 使用docker-compose

盘古

  • 使用docker-compose

Text-Generation-UI (TGUI调试中暂不可用)

1. 部署TGUI

# 1 下载模型
git clone https://github.com/oobabooga/text-generation-webui.git
# 2 这个仓库的最新代码有问题,回滚到几周之前
git reset --hard fcda3f87767e642d1c0411776e549e1d3894843d
# 3 切换路径
cd text-generation-webui
# 4 安装text-generation的额外依赖
pip install accelerate bitsandbytes flexgen gradio llamacpp markdown numpy peft requests rwkv safetensors sentencepiece tqdm datasets git+https://github.com/huggingface/transformers
# 5 下载模型
python download-model.py facebook/galactica-1.3b
# 其他可选如 facebook/opt-1.3b
#           facebook/galactica-1.3b
#           facebook/galactica-6.7b
#           facebook/galactica-120b
#           facebook/pygmalion-1.3b 等
# 详情见 https://github.com/oobabooga/text-generation-webui

# 6 启动text-generation
python server.py --cpu --listen --listen-port 7865 --model facebook_galactica-1.3b

2. 修改config.py

# LLM_MODEL格式:   tgui:[模型]@[ws地址]:[ws端口] ,   端口要和上面给定的端口一致
LLM_MODEL = "tgui:galactica-1.3b@localhost:7860"

3. 运行!

cd chatgpt-academic
python main.py