gpt_academic/request_llms
binary-husky 5fcd02506c
version 3.75 (#1702)
* Update version to 3.74

* Add support for Yi Model API (#1635)

* 更新以支持零一万物模型

* 删除newbing

* 修改config

---------

Co-authored-by: binary-husky <qingxu.fu@outlook.com>

* Refactor function signatures in bridge files

* fix qwen api change

* rename and ref functions

* rename and move some cookie functions

* 增加haiku模型,新增endpoint配置说明 (#1626)

* haiku added

* 新增haiku,新增endpoint配置说明

* Haiku added

* 将说明同步至最新Endpoint

---------

Co-authored-by: binary-husky <qingxu.fu@outlook.com>

* private_upload目录下进行文件鉴权 (#1596)

* private_upload目录下进行文件鉴权

* minor fastapi adjustment

* Add logging functionality to enable saving
conversation records

* waiting to fix username retrieve

* support 2rd web path

* allow accessing default user dir

---------

Co-authored-by: binary-husky <qingxu.fu@outlook.com>

* remove yaml deps

* fix favicon

* fix abs path auth problem

* forget to write a return

* add `dashscope` to deps

* fix GHSA-v9q9-xj86-953p

* 用户名重叠越权访问patch (#1681)

* add cohere model api access

* cohere + can_multi_thread

* fix block user access(fail)

* fix fastapi bug

* change cohere api endpoint

* explain version

* # fix com_zhipuglm.py illegal temperature problem (#1687)

* Update com_zhipuglm.py

# fix 用户在使用 zhipuai 界面时遇到了关于温度参数的非法参数错误

* allow store lm model dropdown

* add a btn to reverse previous reset

* remove extra fns

* Add support for glm-4v model (#1700)

* 修改chatglm3量化加载方式 (#1688)

Co-authored-by: zym9804 <ren990603@gmail.com>

* save chat stage 1

* consider null cookie situation

* 在点击复制按钮时激活语音

* miss some parts

* move all to js

* done first stage

* add edge tts

* bug fix

* bug fix

* remove console log

* bug fix

* bug fix

* bug fix

* audio switch

* update tts readme

* remove tempfile when done

* disable auto audio follow

* avoid play queue update after shut up

* feat: minimizing common.js

* improve tts functionality

* deterine whether the cached model is in choices

* Add support for Ollama (#1740)

* print err when doc2x not successful

* add icon

* adjust url for doc2x key version

* prepare merge

---------

Co-authored-by: Menghuan1918 <menghuan2003@outlook.com>
Co-authored-by: Skyzayre <120616113+Skyzayre@users.noreply.github.com>
Co-authored-by: XIao <46100050+Kilig947@users.noreply.github.com>
Co-authored-by: Yuki <903728862@qq.com>
Co-authored-by: zyren123 <91042213+zyren123@users.noreply.github.com>
Co-authored-by: zym9804 <ren990603@gmail.com>
2024-04-30 20:37:41 +08:00
..
README.md re-format code to with pre-commit 2023-12-31 19:30:32 +08:00
bridge_all.py version 3.75 (#1702) 2024-04-30 20:37:41 +08:00
bridge_chatglm.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_chatglm3.py version 3.75 (#1702) 2024-04-30 20:37:41 +08:00
bridge_chatglmft.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_chatglmonnx.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_chatgpt.py access vllm 2024-04-11 22:00:07 +08:00
bridge_chatgpt_vision.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_chatgpt_website.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_claude.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_cohere.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_deepseekcoder.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_google_gemini.py fix the issue of when using google Gemini pro, don't have chat histor… (#1743) 2024-04-25 22:26:32 +08:00
bridge_internlm.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_jittorllms_llama.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_jittorllms_pangualpha.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_jittorllms_rwkv.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_llama2.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_moonshot.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_moss.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_newbingfree.py format source code 2024-01-13 18:04:09 +08:00
bridge_ollama.py version 3.75 (#1702) 2024-04-30 20:37:41 +08:00
bridge_qianfan.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_qwen.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_qwen_local.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_skylark2.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_spark.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
bridge_stackclaude.py format source code 2024-01-13 18:04:09 +08:00
bridge_tgui.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
bridge_yimodel.py Update Claude3 api request and fix some bugs (#1641) 2024-03-20 17:22:23 +08:00
bridge_zhipu.py version 3.75 (#1702) 2024-04-30 20:37:41 +08:00
chatglmoonx.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
com_google.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
com_qwenapi.py fix qwen api change 2024-04-03 12:17:41 +08:00
com_skylark2api.py 注入火山引擎大模型的接口代码 2024-01-13 22:33:08 +08:00
com_sparkapi.py update spark v3.5, fix glm parallel problem 2024-02-18 14:08:35 +08:00
com_zhipuglm.py version 3.75 (#1702) 2024-04-30 20:37:41 +08:00
edge_gpt_free.py format source code 2024-01-13 18:04:09 +08:00
key_manager.py merge frontier branch (#1620) 2024-03-11 17:26:09 +08:00
local_llm_class.py Version 3.74: Merge latest updates on dev branch (frontier) (#1621) 2024-04-08 11:49:30 +08:00
queued_pipe.py 解除本地模型的若干并发问题 2023-10-31 20:37:07 +08:00
requirements_chatglm.txt re-format code to with pre-commit 2023-12-31 19:30:32 +08:00
requirements_chatglm_onnx.txt 修复protobuf版本错误 2023-12-14 11:00:55 +08:00
requirements_jittorllms.txt re-format code to with pre-commit 2023-12-31 19:30:32 +08:00
requirements_moss.txt re-format code to with pre-commit 2023-12-31 19:30:32 +08:00
requirements_newbing.txt rename folder 2023-10-28 17:44:17 +08:00
requirements_qwen.txt re-format code to with pre-commit 2023-12-31 19:30:32 +08:00
requirements_qwen_local.txt re-format code to with pre-commit 2023-12-31 19:30:32 +08:00
requirements_slackclaude.txt re-format code to with pre-commit 2023-12-31 19:30:32 +08:00

README.md

P.S. 如果您按照以下步骤成功接入了新的大模型欢迎发Pull Requests如果您在自己接入新模型的过程中遇到困难欢迎加README底部QQ群联系群主

如何接入其他本地大语言模型

  1. 复制request_llms/bridge_llama2.py,重命名为你喜欢的名字

  2. 修改load_model_and_tokenizer方法加载你的模型和分词器去该模型官网找demo复制粘贴即可

  3. 修改llm_stream_generator方法定义推理模型去该模型官网找demo复制粘贴即可

  4. 命令行测试

    • 修改tests/test_llms.py(聪慧如您,只需要看一眼该文件就明白怎么修改了)
    • 运行python tests/test_llms.py
  5. 测试通过后,在request_llms/bridge_all.py中做最后的修改,把你的模型完全接入到框架中(聪慧如您,只需要看一眼该文件就明白怎么修改了)

  6. 修改LLM_MODEL配置,然后运行python main.py,测试最后的效果

如何接入其他在线大语言模型

  1. 复制request_llms/bridge_zhipu.py,重命名为你喜欢的名字

  2. 修改predict_no_ui_long_connection

  3. 修改predict

  4. 命令行测试

    • 修改tests/test_llms.py(聪慧如您,只需要看一眼该文件就明白怎么修改了)
    • 运行python tests/test_llms.py
  5. 测试通过后,在request_llms/bridge_all.py中做最后的修改,把你的模型完全接入到框架中(聪慧如您,只需要看一眼该文件就明白怎么修改了)

  6. 修改LLM_MODEL配置,然后运行python main.py,测试最后的效果