镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 06:26:47 +00:00
* typo: Fix typos and rename functions across multiple files This commit addresses several minor issues: - Corrected spelling of function names (e.g., `update_ui_lastest_msg` to `update_ui_latest_msg`) - Fixed typos in comments and variable names - Corrected capitalization in some strings (e.g., "ArXiv" instead of "Arixv") - Renamed some variables for consistency - Corrected some console-related parameter names (e.g., `console_slience` to `console_silence`) The changes span multiple files across the project, including request LLM bridges, crazy functions, and utility modules. * fix: f-string expression part cannot include a backslash (#2139) * raise error when the uploaded tar contain hard/soft link (#2136) * minor bug fix * fine tune reasoning css * upgrade internet gpt plugin * Update README.md * fix GHSA-gqp5-wm97-qxcv * typo fix * update readme --------- Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com> Co-authored-by: binary-husky <qingxu.fu@outlook.com>
P.S. 如果您按照以下步骤成功接入了新的大模型,欢迎发Pull Requests(如果您在自己接入新模型的过程中遇到困难,欢迎加README底部QQ群联系群主)
如何接入其他本地大语言模型
-
复制
request_llms/bridge_llama2.py,重命名为你喜欢的名字 -
修改
load_model_and_tokenizer方法,加载你的模型和分词器(去该模型官网找demo,复制粘贴即可) -
修改
llm_stream_generator方法,定义推理模型(去该模型官网找demo,复制粘贴即可) -
命令行测试
- 修改
tests/test_llms.py(聪慧如您,只需要看一眼该文件就明白怎么修改了) - 运行
python tests/test_llms.py
- 修改
-
测试通过后,在
request_llms/bridge_all.py中做最后的修改,把你的模型完全接入到框架中(聪慧如您,只需要看一眼该文件就明白怎么修改了) -
修改
LLM_MODEL配置,然后运行python main.py,测试最后的效果
如何接入其他在线大语言模型
-
复制
request_llms/bridge_zhipu.py,重命名为你喜欢的名字 -
修改
predict_no_ui_long_connection -
修改
predict -
命令行测试
- 修改
tests/test_llms.py(聪慧如您,只需要看一眼该文件就明白怎么修改了) - 运行
python tests/test_llms.py
- 修改
-
测试通过后,在
request_llms/bridge_all.py中做最后的修改,把你的模型完全接入到框架中(聪慧如您,只需要看一眼该文件就明白怎么修改了) -
修改
LLM_MODEL配置,然后运行python main.py,测试最后的效果