From 8c16cda3e8ac619b275557aa287d1ab7a5b4d8e8 Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Thu, 27 Apr 2023 20:07:33 +0800 Subject: [PATCH 1/9] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index da66f8a..f7f8b9a 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,7 @@ docker run --rm -it --net=host --gpus=all gpt-academic bash ## 版本: +- version 3.5(Todo): 使用自然语言调用本项目的所有函数插件(高优先级) - version 3.4(Todo): 完善chatglm本地大模型的多线支持 - version 3.3: +互联网信息综合功能 - version 3.2: 函数插件支持更多参数接口 (保存对话功能, 解读任意语言代码+同时询问任意的LLM组合) From 86b654d6be1e8657185b488dd3422a68f2c86c2a Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Thu, 27 Apr 2023 20:30:03 +0800 Subject: [PATCH 2/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f7f8b9a..831ef71 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ cd chatgpt_academic 3. 安装依赖 ```sh -# (选择I: 如熟悉python)推荐 +# (选择I: 如熟悉python)(python版本3.9以上,越新越好) python -m pip install -r requirements.txt # 备注:使用官方pip源或者阿里pip源,其他pip源(如一些大学的pip)有可能出问题,临时换源方法:python -m pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ From 984c7e9e12c6e54160af3200917b0e087d21b4cf Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 27 Apr 2023 21:11:15 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check_proxy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_proxy.py b/check_proxy.py index 28711a8..a8e4b72 100644 --- a/check_proxy.py +++ b/check_proxy.py @@ -67,7 +67,11 @@ def patch_and_restart(path): print亮黄('由于您没有设置config_private.py私密配置,现将您的现有配置移动至config_private.py以防止配置丢失,', '另外您可以随时在history子文件夹下找回旧版的程序。') shutil.copyfile('config.py', 'config_private.py') - distutils.dir_util.copy_tree(path+'/chatgpt_academic-master', './') + try: + distutils.dir_util.copy_tree(path+'/gpt_academic-master', './') + except: + from distutils import dir_util + dir_util.copy_tree(path+'/gpt_academic-master', './') import subprocess print亮绿('代码已经更新,即将更新pip包依赖……') for i in reversed(range(5)): time.sleep(1); print(i) From dfa31a8c167ab1a90a6a8d86f888daaf7c1c7276 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 27 Apr 2023 21:15:22 +0800 Subject: [PATCH 4/9] 3.31 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index a21ca72..85277aa 100644 --- a/version +++ b/version @@ -1,5 +1,5 @@ { "version": 3.31, "show_feature": true, - "new_feature": "ChatGLM加线程锁提高并发稳定性 <-> 支持NewBing <-> Markdown翻译功能支持直接输入Readme文件网址 <-> 保存对话功能 <-> 解读任意语言代码+同时询问任意的LLM组合 <-> 添加联网(Google)回答问题插件 <-> 修复ChatGLM上下文BUG <-> 添加支持清华ChatGLM" + "new_feature": "我们发现了自动更新模块的BUG,此次更新可能需要您手动到Github下载新版程序并覆盖 <-> ChatGLM加线程锁提高并发稳定性 <-> 支持NewBing <-> Markdown翻译功能支持直接输入Readme文件网址 <-> 保存对话功能 <-> 解读任意语言代码+同时询问任意的LLM组合 <-> 添加联网(Google)回答问题插件 <-> 修复ChatGLM上下文BUG <-> 添加支持清华ChatGLM" } From a2195120452cc7054d964de2bd3c371154cbf0a1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 27 Apr 2023 21:26:01 +0800 Subject: [PATCH 5/9] fix auto upgrade issue --- check_proxy.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/check_proxy.py b/check_proxy.py index a8e4b72..754b5d3 100644 --- a/check_proxy.py +++ b/check_proxy.py @@ -56,26 +56,24 @@ def patch_and_restart(path): """ 一键更新协议:覆盖和重启 """ - import distutils + from distutils import dir_util import shutil import os import sys import time + import glob from colorful import print亮黄, print亮绿, print亮红 # if not using config_private, move origin config.py as config_private.py if not os.path.exists('config_private.py'): print亮黄('由于您没有设置config_private.py私密配置,现将您的现有配置移动至config_private.py以防止配置丢失,', '另外您可以随时在history子文件夹下找回旧版的程序。') shutil.copyfile('config.py', 'config_private.py') - try: - distutils.dir_util.copy_tree(path+'/gpt_academic-master', './') - except: - from distutils import dir_util - dir_util.copy_tree(path+'/gpt_academic-master', './') - import subprocess + path_new_version = glob.glob(path + '/*-master')[0] + dir_util.copy_tree(path_new_version, './') print亮绿('代码已经更新,即将更新pip包依赖……') for i in reversed(range(5)): time.sleep(1); print(i) try: + import subprocess subprocess.check_call([sys.executable, '-m', 'pip', 'install', '-r', 'requirements.txt']) except: print亮红('pip包依赖安装出现问题,需要手动安装新增的依赖库 `python -m pip install -r requirements.txt`,然后在用常规的`python main.py`的方式启动。') From b6119ed82766ec5bc118bc8192669eb7512f439f Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:04:08 +0800 Subject: [PATCH 6/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 831ef71..21cba02 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ chat分析报告生成 | [函数插件] 运行后自动生成总结汇报 [PDF论文全文翻译功能](https://www.bilibili.com/video/BV1KT411x7Wn) | [函数插件] PDF论文提取题目&摘要+翻译全文(多线程) [Arxiv小助手](https://www.bilibili.com/video/BV1LM4y1279X) | [函数插件] 输入arxiv文章url即可一键翻译摘要+下载PDF [谷歌学术统合小助手](https://www.bilibili.com/video/BV19L411U7ia) | [函数插件] 给定任意谷歌学术搜索页面URL,让gpt帮你[写relatedworks](https://www.bilibili.com/video/BV1GP411U7Az/) -互联网信息聚合+GPT | [函数插件] 一键让GPT先从互联网获取信息,再回答问题,让信息永不过时 +互联网信息聚合+GPT | [函数插件] 一键[让GPT先从互联网获取信息](https://www.bilibili.com/video/BV1om4y127ck),再回答问题,让信息永不过时 公式/图片/表格显示 | 可以同时显示公式的[tex形式和渲染形式](https://user-images.githubusercontent.com/96192199/230598842-1d7fcddd-815d-40ee-af60-baf488a199df.png),支持公式、代码高亮 多线程函数插件支持 | 支持多线调用chatgpt,一键处理[海量文本](https://www.bilibili.com/video/BV1FT411H7c5/)或程序 启动暗色gradio[主题](https://github.com/binary-husky/chatgpt_academic/issues/173) | 在浏览器url后面添加```/?__dark-theme=true```可以切换dark主题 From c12ac066b6106471802ccbf2de4099fe791be510 Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:18:02 +0800 Subject: [PATCH 7/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 21cba02..8201354 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ chat分析报告生成 | [函数插件] 运行后自动生成总结汇报 多线程函数插件支持 | 支持多线调用chatgpt,一键处理[海量文本](https://www.bilibili.com/video/BV1FT411H7c5/)或程序 启动暗色gradio[主题](https://github.com/binary-husky/chatgpt_academic/issues/173) | 在浏览器url后面添加```/?__dark-theme=true```可以切换dark主题 [多LLM模型](https://www.bilibili.com/video/BV1wT411p7yf)支持,[API2D](https://api2d.com/)接口支持 | 同时被GPT3.5、GPT4和[清华ChatGLM](https://github.com/THUDM/ChatGLM-6B)伺候的感觉一定会很不错吧? -更多LLM模型接入 | 新加入Newbing测试接口(新必应AI) +更多LLM模型接入,支持[huggingface部署](https://huggingface.co/spaces/qingxu98/gpt-academic) | 新加入Newbing测试接口(新必应AI) …… | …… From 71ba23b24ad73e4271321e82a466bbfd6337a65c Mon Sep 17 00:00:00 2001 From: binary-husky <96192199+binary-husky@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:18:54 +0800 Subject: [PATCH 8/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8201354..ff9e92b 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ If you like this project, please give it a Star. If you've come up with more use 模块化设计 | 支持自定义强大的[函数插件](https://github.com/binary-husky/chatgpt_academic/tree/master/crazy_functions),插件支持[热更新](https://github.com/binary-husky/chatgpt_academic/wiki/%E5%87%BD%E6%95%B0%E6%8F%92%E4%BB%B6%E6%8C%87%E5%8D%97) [自我程序剖析](https://www.bilibili.com/video/BV1cj411A7VW) | [函数插件] [一键读懂](https://github.com/binary-husky/chatgpt_academic/wiki/chatgpt-academic%E9%A1%B9%E7%9B%AE%E8%87%AA%E8%AF%91%E8%A7%A3%E6%8A%A5%E5%91%8A)本项目的源代码 [程序剖析](https://www.bilibili.com/video/BV1cj411A7VW) | [函数插件] 一键可以剖析其他Python/C/C++/Java/Lua/...项目树 -读论文、翻译论文 | [函数插件] 一键解读latex/pdf论文全文并生成摘要 +读论文、[翻译](https://www.bilibili.com/video/BV1KT411x7Wn)论文 | [函数插件] 一键解读latex/pdf论文全文并生成摘要 Latex全文[翻译](https://www.bilibili.com/video/BV1nk4y1Y7Js/)、[润色](https://www.bilibili.com/video/BV1FT411H7c5/) | [函数插件] 一键翻译或润色latex论文 批量注释生成 | [函数插件] 一键批量生成函数注释 Markdown[中英互译](https://www.bilibili.com/video/BV1yo4y157jV/) | [函数插件] 看到上面5种语言的[README](https://github.com/binary-husky/chatgpt_academic/blob/master/docs/README_EN.md)了吗? From 730940b60d2517be74b37564bd1bc616dae47eae Mon Sep 17 00:00:00 2001 From: binary-husky <505030475@qq.com> Date: Fri, 28 Apr 2023 12:18:12 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=A4=9AGPU=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=9A=84=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/Dockerfile+ChatGLM | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Dockerfile+ChatGLM b/docs/Dockerfile+ChatGLM index 9631d4b..9e6db27 100644 --- a/docs/Dockerfile+ChatGLM +++ b/docs/Dockerfile+ChatGLM @@ -1,6 +1,6 @@ # How to build | 如何构建: docker build -t gpt-academic --network=host -f Dockerfile+ChatGLM . -# How to run | 如何运行 (1) 直接运行(选择0号GPU): docker run --rm -it --net=host --gpus="0" gpt-academic -# How to run | 如何运行 (2) 我想运行之前进容器做一些调整: docker run --rm -it --net=host --gpus="0" gpt-academic bash +# How to run | (1) 我想直接一键运行(选择0号GPU): docker run --rm -it --net=host --gpus \"device=0\" gpt-academic +# How to run | (2) 我想运行之前进容器做一些调整(选择1号GPU): docker run --rm -it --net=host --gpus \"device=1\" gpt-academic bash # 从NVIDIA源,从而支持显卡运损(检查宿主的nvidia-smi中的cuda版本必须>=11.3) FROM nvidia/cuda:11.3.1-runtime-ubuntu20.04 @@ -14,6 +14,7 @@ RUN apt-get install -y git python python3 python-dev python3-dev --fix-missing RUN $useProxyNetwork curl cip.cc RUN sed -i '$ d' /etc/proxychains.conf RUN sed -i '$ d' /etc/proxychains.conf +# 在这里填写主机的代理协议(用于从github拉取代码) RUN echo "socks5 127.0.0.1 10880" >> /etc/proxychains.conf ARG useProxyNetwork=proxychains # # comment out above if you do not need proxy network | 如果不需要翻墙 - 从此行向上删除 @@ -49,6 +50,7 @@ RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' # 可同时填写多个API-KEY,支持openai的key和api2d的key共存,用英文逗号分割,例如API_KEY = "sk-openaikey1,fkxxxx-api2dkey2,........" # LLM_MODEL 是选择初始的模型 # LOCAL_MODEL_DEVICE 是选择chatglm等本地模型运行的设备,可选 cpu 和 cuda +# [说明: 以下内容与`config.py`一一对应,请查阅config.py来完成一下配置的填写] RUN echo ' \n\ API_KEY = "sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \n\ USE_PROXY = True \n\