Update README.md
This commit is contained in:
parent
4812513cbc
commit
2b9261bc39
73
README.md
73
README.md
@ -91,9 +91,8 @@ cd chatgpt_academic
|
||||
|
||||
在`config.py`中,配置 海外Proxy 和 OpenAI API KEY,说明如下
|
||||
```
|
||||
1. 如果你在国内,需要设置海外代理才能够顺利使用 OpenAI API,设置方法请仔细阅读config.py(1.修改其中的USE_PROXY为True; 2.按照说明修改其中的proxies)。
|
||||
2. 配置 OpenAI API KEY。你需要在 OpenAI 官网上注册并获取 API KEY。一旦你拿到了 API KEY,在 config.py 文件里配置好即可。
|
||||
3. 支持任意数量的OpenAI的密钥和API2D的密钥共存/负载均衡,多个KEY用英文逗号分隔即可,例如输入 API_KEY="OpenAI密钥1,API2D密钥2,OpenAI密钥3,OpenAI密钥4"
|
||||
1. 如果你在国内,需要设置海外代理才能够顺利使用OpenAI API,设置方法请仔细阅读config.py(1.修改其中的USE_PROXY为True; 2.按照说明修改其中的proxies)。
|
||||
2. 配置 OpenAI API KEY。支持任意数量的OpenAI的密钥和API2D的密钥共存/负载均衡,多个KEY用英文逗号分隔即可,例如输入 API_KEY="OpenAI密钥1,API2D密钥2,OpenAI密钥3,OpenAI密钥4"
|
||||
3. 与代理网络有关的issue(网络超时、代理不起作用)汇总到 https://github.com/binary-husky/chatgpt_academic/issues/1
|
||||
```
|
||||
(P.S. 程序运行时会优先检查是否存在名为`config_private.py`的私密配置文件,并用其中的配置覆盖`config.py`的同名配置。因此,如果您能理解我们的配置读取逻辑,我们强烈建议您在`config.py`旁边创建一个名为`config_private.py`的新配置文件,并把`config.py`中的配置转移(复制)到`config_private.py`中。`config_private.py`不受git管控,可以让您的隐私信息更加安全。)
|
||||
@ -101,19 +100,17 @@ cd chatgpt_academic
|
||||
|
||||
3. 安装依赖
|
||||
```sh
|
||||
# (选择一)推荐
|
||||
python -m pip install -r requirements.txt
|
||||
# (选择I: 如熟悉python)推荐
|
||||
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/
|
||||
|
||||
# (选择二)如果您使用anaconda,步骤也是类似的:
|
||||
# (选择二.1)conda create -n gptac_venv python=3.11
|
||||
# (选择二.2)conda activate gptac_venv
|
||||
# (选择二.3)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/
|
||||
# (选择II: 如不熟悉python)使用anaconda,步骤也是类似的:
|
||||
# (II-1)conda create -n gptac_venv python=3.11
|
||||
# (II-2)conda activate gptac_venv
|
||||
# (II-3)python -m pip install -r requirements.txt
|
||||
```
|
||||
|
||||
如果需要支持清华ChatGLM,需要额外安装更多依赖(不熟悉python者、电脑配置不佳者,建议不要尝试):
|
||||
如果需要支持清华ChatGLM后端,需要额外安装更多依赖(不熟悉python、电脑配置不佳者,建议不要尝试):
|
||||
```sh
|
||||
python -m pip install -r request_llm/requirements_chatglm.txt
|
||||
```
|
||||
@ -134,7 +131,7 @@ python main.py
|
||||
- 函数插件区下拉菜单中有更多功能可供选择
|
||||
```
|
||||
|
||||
## 安装-方法2:使用docker (Linux)
|
||||
## 安装-方法2:使用Docker (Linux)
|
||||
|
||||
1. 仅ChatGPT(推荐大多数人选择)
|
||||
``` sh
|
||||
@ -147,33 +144,23 @@ cd chatgpt_academic
|
||||
docker build -t gpt-academic .
|
||||
# 运行
|
||||
docker run --rm -it --net=host gpt-academic
|
||||
|
||||
# 测试函数插件
|
||||
## 测试函数插件模板函数(要求gpt回答历史上的今天发生了什么),您可以根据此函数为模板,实现更复杂的功能
|
||||
点击 "[函数插件模板Demo] 历史上的今天"
|
||||
## 测试给Latex项目写摘要
|
||||
input区域 输入 ./crazy_functions/test_project/latex/attention , 然后点击 "读Tex论文写摘要"
|
||||
## 测试Python项目分析
|
||||
input区域 输入 ./crazy_functions/test_project/python/dqn , 然后点击 "解析整个Python项目"
|
||||
|
||||
函数插件区下拉菜单中有更多功能可供选择
|
||||
```
|
||||
|
||||
2. ChatGPT+ChatGLM(需要对docker非常熟悉 + 电脑配置足够强)
|
||||
2. ChatGPT+ChatGLM(需要对docker熟悉 + 读懂Dockerfile + 电脑配置够强)
|
||||
|
||||
``` sh
|
||||
# 修改dockerfile
|
||||
# 修改Dockerfile
|
||||
cd docs && nano Dockerfile+ChatGLM
|
||||
# How to build | 如何构建 (Dockerfile+ChatGLM在docs路径下,请先cd docs)
|
||||
# 构建 (Dockerfile+ChatGLM在docs路径下,请先cd docs)
|
||||
docker build -t gpt-academic --network=host -f Dockerfile+ChatGLM .
|
||||
# How to run | 如何运行 (1) 直接运行:
|
||||
# 运行 (1) 直接运行:
|
||||
docker run --rm -it --net=host --gpus=all gpt-academic
|
||||
# How to run | 如何运行 (2) 我想运行之前进容器做一些调整:
|
||||
# 运行 (2) 我想运行之前进容器做一些调整:
|
||||
docker run --rm -it --net=host --gpus=all gpt-academic bash
|
||||
```
|
||||
|
||||
|
||||
## 安装-方法3:其他部署方式
|
||||
## 安装-方法3:其他部署方式(需要云服务器知识与经验)
|
||||
|
||||
1. 远程云服务器部署
|
||||
请访问[部署wiki-1](https://github.com/binary-husky/chatgpt_academic/wiki/%E4%BA%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E8%BF%9C%E7%A8%8B%E9%83%A8%E7%BD%B2%E6%8C%87%E5%8D%97)
|
||||
@ -192,7 +179,9 @@ docker run --rm -it --net=host --gpus=all gpt-academic bash
|
||||
|
||||
---
|
||||
|
||||
## 自定义新的便捷按钮(学术快捷键自定义)
|
||||
## 自定义新的便捷按钮 / 自定义函数插件
|
||||
|
||||
1. 自定义新的便捷按钮(学术快捷键)
|
||||
任意文本编辑器打开`core_functional.py`,添加条目如下,然后重启程序即可。(如果按钮已经添加成功并可见,那么前缀、后缀都支持热修改,无需重启程序即可生效。)
|
||||
例如
|
||||
```
|
||||
@ -208,19 +197,25 @@ docker run --rm -it --net=host --gpus=all gpt-academic bash
|
||||
<img src="https://user-images.githubusercontent.com/96192199/226899272-477c2134-ed71-4326-810c-29891fe4a508.png" width="500" >
|
||||
</div>
|
||||
|
||||
2. 自定义函数插件
|
||||
|
||||
编写强大的函数插件来执行任何你想得到的和想不到的任务。
|
||||
本项目的插件编写、调试难度很低,只要您具备一定的python基础知识,就可以仿照我们提供的模板实现自己的插件功能。
|
||||
详情请参考[函数插件指南](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)
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
## 部分功能展示
|
||||
|
||||
### 图片显示:
|
||||
1. 图片显示:
|
||||
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/228737599-bf0a9d9c-1808-4f43-ae15-dfcc7af0f295.png" width="800" >
|
||||
</div>
|
||||
|
||||
|
||||
### 如果一个程序能够读懂并剖析自己:
|
||||
2. 本项目的代码自译解(如果一个程序能够读懂并剖析自己):
|
||||
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/226936850-c77d7183-0749-4c1c-9875-fd4891842d0c.png" width="800" >
|
||||
@ -230,7 +225,7 @@ docker run --rm -it --net=host --gpus=all gpt-academic bash
|
||||
<img src="https://user-images.githubusercontent.com/96192199/226936618-9b487e4b-ab5b-4b6e-84c6-16942102e917.png" width="800" >
|
||||
</div>
|
||||
|
||||
### 其他任意Python/Cpp项目剖析:
|
||||
3. 其他任意Python/Cpp/Java/Go/Rect/...项目剖析:
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/226935232-6b6a73ce-8900-4aee-93f9-733c7e6fef53.png" width="800" >
|
||||
</div>
|
||||
@ -239,26 +234,26 @@ docker run --rm -it --net=host --gpus=all gpt-academic bash
|
||||
<img src="https://user-images.githubusercontent.com/96192199/226969067-968a27c1-1b9c-486b-8b81-ab2de8d3f88a.png" width="800" >
|
||||
</div>
|
||||
|
||||
### Latex论文一键阅读理解与摘要生成
|
||||
4. Latex论文一键阅读理解与摘要生成
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/227504406-86ab97cd-f208-41c3-8e4a-7000e51cf980.png" width="800" >
|
||||
</div>
|
||||
|
||||
### 自动报告生成
|
||||
5. 自动报告生成
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/227503770-fe29ce2c-53fd-47b0-b0ff-93805f0c2ff4.png" height="300" >
|
||||
<img src="https://user-images.githubusercontent.com/96192199/227504617-7a497bb3-0a2a-4b50-9a8a-95ae60ea7afd.png" height="300" >
|
||||
<img src="https://user-images.githubusercontent.com/96192199/227504005-efeaefe0-b687-49d0-bf95-2d7b7e66c348.png" height="300" >
|
||||
</div>
|
||||
|
||||
### 模块化功能设计
|
||||
6. 模块化功能设计
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/229288270-093643c1-0018-487a-81e6-1d7809b6e90f.png" height="400" >
|
||||
<img src="https://user-images.githubusercontent.com/96192199/227504931-19955f78-45cd-4d1c-adac-e71e50957915.png" height="400" >
|
||||
</div>
|
||||
|
||||
|
||||
### 源代码转译英文
|
||||
7. 源代码转译英文
|
||||
|
||||
<div align="center">
|
||||
<img src="https://user-images.githubusercontent.com/96192199/229720562-fe6c3508-6142-4635-a83d-21eb3669baee.png" height="400" >
|
||||
|
Loading…
x
Reference in New Issue
Block a user