Compare commits

...

1 Commits

Author SHA1 Message Date
qingxu fu
c957cc00f8 移除冗余代码 2023-11-20 00:43:51 +08:00
5 changed files with 15 additions and 26 deletions

View File

@@ -1,10 +0,0 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

View File

@@ -235,11 +235,6 @@ BLOCK_INVALID_APIKEY = False
# 自定义按钮的最大数量限制 # 自定义按钮的最大数量限制
NUM_CUSTOM_BASIC_BTN = 4 NUM_CUSTOM_BASIC_BTN = 4
# LATEX实验性功能
LATEX_EXPERIMENTAL = False
""" """
在线大模型配置关联关系示意图 在线大模型配置关联关系示意图

View File

@@ -95,11 +95,14 @@ class LatexPaperSplit():
self.abstract = "unknown" self.abstract = "unknown"
def read_title_and_abstract(self, txt): def read_title_and_abstract(self, txt):
try:
title, abstract = find_title_and_abs(txt) title, abstract = find_title_and_abs(txt)
if title is not None: if title is not None:
self.title = title.replace('\n', ' ').replace('\\\\', ' ').replace(' ', '').replace(' ', '') self.title = title.replace('\n', ' ').replace('\\\\', ' ').replace(' ', '').replace(' ', '')
if abstract is not None: if abstract is not None:
self.abstract = abstract.replace('\n', ' ').replace('\\\\', ' ').replace(' ', '').replace(' ', '') self.abstract = abstract.replace('\n', ' ').replace('\\\\', ' ').replace(' ', '').replace(' ', '')
except:
pass
def merge_result(self, arr, mode, msg, buggy_lines=[], buggy_line_surgery_n_lines=10): def merge_result(self, arr, mode, msg, buggy_lines=[], buggy_line_surgery_n_lines=10):
""" """
@@ -265,12 +268,12 @@ def Latex精细分解与转化(file_manifest, project_folder, llm_kwargs, plugin
else: else:
# <-------- gpt 多线程请求 ----------> # <-------- gpt 多线程请求 ---------->
LATEX_EXPERIMENTAL, = get_conf('LATEX_EXPERIMENTAL')
history_array = [[""] for _ in range(n_split)] history_array = [[""] for _ in range(n_split)]
if LATEX_EXPERIMENTAL: # LATEX_EXPERIMENTAL, = get_conf('LATEX_EXPERIMENTAL')
paper_meta = f"The paper you processing is `{lps.title}`, a part of the abstraction is `{lps.abstract}`" # if LATEX_EXPERIMENTAL:
paper_meta_max_len = 888 # paper_meta = f"The paper you processing is `{lps.title}`, a part of the abstraction is `{lps.abstract}`"
history_array = [[ paper_meta[:paper_meta_max_len] + '...', "Understand, what should I do?"] for _ in range(n_split)] # paper_meta_max_len = 888
# history_array = [[ paper_meta[:paper_meta_max_len] + '...', "Understand, what should I do?"] for _ in range(n_split)]
gpt_response_collection = yield from request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency( gpt_response_collection = yield from request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
inputs_array=inputs_array, inputs_array=inputs_array,

View File

@@ -352,6 +352,7 @@ def find_title_and_abs(main_file):
title = extract_title(main_file) title = extract_title(main_file)
return title, abstract return title, abstract
def merge_tex_files(project_foler, main_file, mode): def merge_tex_files(project_foler, main_file, mode):
""" """
Merge Tex project recrusively Merge Tex project recrusively

View File

@@ -1,5 +1,5 @@
{ {
"version": 3.60, "version": 3.60,
"show_feature": true, "show_feature": true,
"new_feature": "11月12日紧急BUG修复 <-> AutoGen多智能体插件测试版 <-> 修复本地模型在Windows下的加载BUG <-> 支持文心一言v4和星火v3 <-> 支持GLM3和智谱的API <-> 解决本地模型并发BUG <-> 支持动态追加基础功能按钮 <-> 新汇报PDF汇总页面 <-> 重新编译Gradio优化使用体验" "new_feature": "修复多个BUG <-> AutoGen多智能体插件测试版 <-> 修复本地模型在Windows下的加载BUG <-> 支持文心一言v4和星火v3 <-> 支持GLM3和智谱的API <-> 解决本地模型并发BUG <-> 支持动态追加基础功能按钮 <-> 新汇报PDF汇总页面 <-> 重新编译Gradio优化使用体验"
} }