镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-07 06:56:48 +00:00
比较提交
3 次代码提交
version3.5
...
version3.5
| 作者 | SHA1 | 提交日期 | |
|---|---|---|---|
|
|
87ccd1a89a | ||
|
|
87b9734986 | ||
|
|
d2d5665c37 |
@@ -155,11 +155,13 @@ def auto_update(raise_error=False):
|
|||||||
|
|
||||||
def warm_up_modules():
|
def warm_up_modules():
|
||||||
print('正在执行一些模块的预热...')
|
print('正在执行一些模块的预热...')
|
||||||
|
from toolbox import ProxyNetworkActivate
|
||||||
from request_llm.bridge_all import model_info
|
from request_llm.bridge_all import model_info
|
||||||
enc = model_info["gpt-3.5-turbo"]['tokenizer']
|
with ProxyNetworkActivate("Warmup_Modules"):
|
||||||
enc.encode("模块预热", disallowed_special=())
|
enc = model_info["gpt-3.5-turbo"]['tokenizer']
|
||||||
enc = model_info["gpt-4"]['tokenizer']
|
enc.encode("模块预热", disallowed_special=())
|
||||||
enc.encode("模块预热", disallowed_special=())
|
enc = model_info["gpt-4"]['tokenizer']
|
||||||
|
enc.encode("模块预热", disallowed_special=())
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ PATH_PRIVATE_UPLOAD = "private_upload"
|
|||||||
# 日志文件夹的位置,请勿修改
|
# 日志文件夹的位置,请勿修改
|
||||||
PATH_LOGGING = "gpt_log"
|
PATH_LOGGING = "gpt_log"
|
||||||
# 除了连接OpenAI之外,还有哪些场合允许使用代理,请勿修改
|
# 除了连接OpenAI之外,还有哪些场合允许使用代理,请勿修改
|
||||||
WHEN_TO_USE_PROXY = ["Download_LLM", "Download_Gradio_Theme", "Connect_Grobid"]
|
WHEN_TO_USE_PROXY = ["Download_LLM", "Download_Gradio_Theme", "Connect_Grobid", "Warmup_Modules"]
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -251,20 +251,23 @@ def get_crazy_functions():
|
|||||||
"Info": "对中文Latex项目全文进行润色处理 | 输入参数为路径或上传压缩包",
|
"Info": "对中文Latex项目全文进行润色处理 | 输入参数为路径或上传压缩包",
|
||||||
"Function": HotReload(Latex中文润色)
|
"Function": HotReload(Latex中文润色)
|
||||||
},
|
},
|
||||||
"Latex项目全文中译英(输入路径或上传压缩包)": {
|
|
||||||
"Group": "学术",
|
# 被新插件取代
|
||||||
"Color": "stop",
|
# "Latex项目全文中译英(输入路径或上传压缩包)": {
|
||||||
"AsButton": False, # 加入下拉菜单中
|
# "Group": "学术",
|
||||||
"Info": "对Latex项目全文进行中译英处理 | 输入参数为路径或上传压缩包",
|
# "Color": "stop",
|
||||||
"Function": HotReload(Latex中译英)
|
# "AsButton": False, # 加入下拉菜单中
|
||||||
},
|
# "Info": "对Latex项目全文进行中译英处理 | 输入参数为路径或上传压缩包",
|
||||||
"Latex项目全文英译中(输入路径或上传压缩包)": {
|
# "Function": HotReload(Latex中译英)
|
||||||
"Group": "学术",
|
# },
|
||||||
"Color": "stop",
|
# "Latex项目全文英译中(输入路径或上传压缩包)": {
|
||||||
"AsButton": False, # 加入下拉菜单中
|
# "Group": "学术",
|
||||||
"Info": "对Latex项目全文进行英译中处理 | 输入参数为路径或上传压缩包",
|
# "Color": "stop",
|
||||||
"Function": HotReload(Latex英译中)
|
# "AsButton": False, # 加入下拉菜单中
|
||||||
},
|
# "Info": "对Latex项目全文进行英译中处理 | 输入参数为路径或上传压缩包",
|
||||||
|
# "Function": HotReload(Latex英译中)
|
||||||
|
# },
|
||||||
|
|
||||||
"批量Markdown中译英(输入路径或上传压缩包)": {
|
"批量Markdown中译英(输入路径或上传压缩包)": {
|
||||||
"Group": "编程",
|
"Group": "编程",
|
||||||
"Color": "stop",
|
"Color": "stop",
|
||||||
|
|||||||
@@ -11,13 +11,14 @@ function gradioApp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const copiedIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg></span>';
|
|
||||||
const copyIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span>';
|
|
||||||
|
|
||||||
|
|
||||||
function addCopyButton(botElement) {
|
function addCopyButton(botElement) {
|
||||||
// https://github.com/GaiZhenbiao/ChuanhuChatGPT/tree/main/web_assets/javascript
|
// https://github.com/GaiZhenbiao/ChuanhuChatGPT/tree/main/web_assets/javascript
|
||||||
// Copy bot button
|
// Copy bot button
|
||||||
|
const copiedIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg></span>';
|
||||||
|
const copyIcon = '<span><svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" height=".8em" width=".8em" xmlns="http://www.w3.org/2000/svg"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span>';
|
||||||
|
|
||||||
const messageBtnColumnElement = botElement.querySelector('.message-btn-row');
|
const messageBtnColumnElement = botElement.querySelector('.message-btn-row');
|
||||||
if (messageBtnColumnElement) {
|
if (messageBtnColumnElement) {
|
||||||
// Do something if .message-btn-column exists, for example, remove it
|
// Do something if .message-btn-column exists, for example, remove it
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户