diff --git a/check_proxy.py b/check_proxy.py
index 3aad33c1..b5ee17d3 100644
--- a/check_proxy.py
+++ b/check_proxy.py
@@ -1,3 +1,4 @@
+from loguru import logger
def check_proxy(proxies, return_ip=False):
import requests
@@ -19,14 +20,14 @@ def check_proxy(proxies, return_ip=False):
else:
result = f"代理配置 {proxies_https}, 代理数据解析失败:{data}"
if not return_ip:
- print(result)
+ logger.warning(result)
return result
else:
return ip
except:
result = f"代理配置 {proxies_https}, 代理所在地查询超时,代理可能无效"
if not return_ip:
- print(result)
+ logger.warning(result)
return result
else:
return ip
@@ -82,25 +83,25 @@ def patch_and_restart(path):
import sys
import time
import glob
- from shared_utils.colorful import print亮黄, print亮绿, print亮红
+ from shared_utils.colorful import log亮黄, log亮绿, log亮红
# 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以防止配置丢失,',
+ log亮黄('由于您没有设置config_private.py私密配置,现将您的现有配置移动至config_private.py以防止配置丢失,',
'另外您可以随时在history子文件夹下找回旧版的程序。')
shutil.copyfile('config.py', 'config_private.py')
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)
+ log亮绿('代码已经更新,即将更新pip包依赖……')
+ for i in reversed(range(5)): time.sleep(1); log亮绿(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`的方式启动。')
- print亮绿('更新完成,您可以随时在history子文件夹下找回旧版的程序,5s之后重启')
- print亮红('假如重启失败,您可能需要手动安装新增的依赖库 `python -m pip install -r requirements.txt`,然后在用常规的`python main.py`的方式启动。')
- print(' ------------------------------ -----------------------------------')
- for i in reversed(range(8)): time.sleep(1); print(i)
+ log亮红('pip包依赖安装出现问题,需要手动安装新增的依赖库 `python -m pip install -r requirements.txt`,然后在用常规的`python main.py`的方式启动。')
+ log亮绿('更新完成,您可以随时在history子文件夹下找回旧版的程序,5s之后重启')
+ log亮红('假如重启失败,您可能需要手动安装新增的依赖库 `python -m pip install -r requirements.txt`,然后在用常规的`python main.py`的方式启动。')
+ log亮绿(' ------------------------------ -----------------------------------')
+ for i in reversed(range(8)): time.sleep(1); log亮绿(i)
os.execl(sys.executable, sys.executable, *sys.argv)
@@ -135,9 +136,9 @@ def auto_update(raise_error=False):
current_version = f.read()
current_version = json.loads(current_version)['version']
if (remote_version - current_version) >= 0.01-1e-5:
- from shared_utils.colorful import print亮黄
- print亮黄(f'\n新版本可用。新版本:{remote_version},当前版本:{current_version}。{new_feature}')
- print('(1)Github更新地址:\nhttps://github.com/binary-husky/chatgpt_academic\n')
+ from shared_utils.colorful import log亮黄
+ log亮黄(f'\n新版本可用。新版本:{remote_version},当前版本:{current_version}。{new_feature}')
+ logger.info('(1)Github更新地址:\nhttps://github.com/binary-husky/chatgpt_academic\n')
user_instruction = input('(2)是否一键更新代码(Y+回车=确认,输入其他/无输入+回车=不更新)?')
if user_instruction in ['Y', 'y']:
path = backup_and_download(current_version, remote_version)
@@ -148,9 +149,9 @@ def auto_update(raise_error=False):
if raise_error:
from toolbox import trimmed_format_exc
msg += trimmed_format_exc()
- print(msg)
+ logger.warning(msg)
else:
- print('自动更新程序:已禁用')
+ logger.info('自动更新程序:已禁用')
return
else:
return
@@ -159,10 +160,10 @@ def auto_update(raise_error=False):
if raise_error:
from toolbox import trimmed_format_exc
msg += trimmed_format_exc()
- print(msg)
+ logger.info(msg)
def warm_up_modules():
- print('正在执行一些模块的预热 ...')
+ logger.info('正在执行一些模块的预热 ...')
from toolbox import ProxyNetworkActivate
from request_llms.bridge_all import model_info
with ProxyNetworkActivate("Warmup_Modules"):
@@ -172,7 +173,7 @@ def warm_up_modules():
enc.encode("模块预热", disallowed_special=())
def warm_up_vectordb():
- print('正在执行一些模块的预热 ...')
+ logger.info('正在执行一些模块的预热 ...')
from toolbox import ProxyNetworkActivate
with ProxyNetworkActivate("Warmup_Modules"):
import nltk
diff --git a/config.py b/config.py
index b6ca53af..e71a59b1 100644
--- a/config.py
+++ b/config.py
@@ -57,9 +57,9 @@ EMBEDDING_MODEL = "text-embedding-3-small"
# "yi-34b-chat-0205","yi-34b-chat-200k","yi-large","yi-medium","yi-spark","yi-large-turbo","yi-large-preview",
# ]
# --- --- --- ---
-# 此外,您还可以在接入one-api/vllm/ollama时,
-# 使用"one-api-*","vllm-*","ollama-*"前缀直接使用非标准方式接入的模型,例如
-# AVAIL_LLM_MODELS = ["one-api-claude-3-sonnet-20240229(max_token=100000)", "ollama-phi3(max_token=4096)"]
+# 此外,您还可以在接入one-api/vllm/ollama/Openroute时,
+# 使用"one-api-*","vllm-*","ollama-*","openrouter-*"前缀直接使用非标准方式接入的模型,例如
+# AVAIL_LLM_MODELS = ["one-api-claude-3-sonnet-20240229(max_token=100000)", "ollama-phi3(max_token=4096)","openrouter-openai/gpt-4o-mini","openrouter-openai/chatgpt-4o-latest"]
# --- --- --- ---
diff --git a/crazy_functional.py b/crazy_functional.py
index 31bb17c2..1ddd8c20 100644
--- a/crazy_functional.py
+++ b/crazy_functional.py
@@ -1,5 +1,6 @@
from toolbox import HotReload # HotReload 的意思是热更新,修改函数插件后,不需要重启程序,代码直接生效
from toolbox import trimmed_format_exc
+from loguru import logger
def get_crazy_functions():
@@ -429,8 +430,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
# try:
# from crazy_functions.联网的ChatGPT import 连接网络回答问题
@@ -460,8 +461,8 @@ def get_crazy_functions():
# }
# )
# except:
- # print(trimmed_format_exc())
- # print("Load function plugin failed")
+ # logger.error(trimmed_format_exc())
+ # logger.error("Load function plugin failed")
try:
from crazy_functions.SourceCode_Analyse import 解析任意code项目
@@ -479,8 +480,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.询问多个大语言模型 import 同时问询_指定模型
@@ -498,8 +499,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
@@ -520,8 +521,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.数学动画生成manim import 动画生成
@@ -538,8 +539,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.Markdown_Translate import Markdown翻译指定语言
@@ -557,8 +558,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.知识库问答 import 知识库文件注入
@@ -576,8 +577,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.知识库问答 import 读取知识库作答
@@ -595,8 +596,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.交互功能函数模板 import 交互功能模板函数
@@ -612,8 +613,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
@@ -635,8 +636,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.批量翻译PDF文档_NOUGAT import 批量翻译PDF文档
@@ -652,8 +653,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.函数动态生成 import 函数动态生成
@@ -669,8 +670,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.多智能体 import 多智能体终端
@@ -686,8 +687,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
try:
from crazy_functions.互动小游戏 import 随机小游戏
@@ -703,8 +704,8 @@ def get_crazy_functions():
}
)
except:
- print(trimmed_format_exc())
- print("Load function plugin failed")
+ logger.error(trimmed_format_exc())
+ logger.error("Load function plugin failed")
# try:
# from crazy_functions.高级功能函数模板 import 测试图表渲染
@@ -717,7 +718,7 @@ def get_crazy_functions():
# }
# })
# except:
- # print(trimmed_format_exc())
+ # logger.error(trimmed_format_exc())
# print('Load function plugin failed')
# try:
diff --git a/crazy_functions/Conversation_To_File.py b/crazy_functions/Conversation_To_File.py
index 24f94b36..b8408748 100644
--- a/crazy_functions/Conversation_To_File.py
+++ b/crazy_functions/Conversation_To_File.py
@@ -171,7 +171,7 @@ def 载入对话历史存档(txt, llm_kwargs, plugin_kwargs, chatbot, history, s
system_prompt 给gpt的静默提醒
user_request 当前用户的请求信息(IP地址等)
"""
- from .crazy_utils import get_files_from_everything
+ from crazy_functions.crazy_utils import get_files_from_everything
success, file_manifest, _ = get_files_from_everything(txt, type='.html')
if not success:
diff --git a/crazy_functions/Image_Generate.py b/crazy_functions/Image_Generate.py
index 70beec81..d4d0a612 100644
--- a/crazy_functions/Image_Generate.py
+++ b/crazy_functions/Image_Generate.py
@@ -30,7 +30,7 @@ def gen_image(llm_kwargs, prompt, resolution="1024x1024", model="dall-e-2", qual
if style is not None:
data['style'] = style
response = requests.post(url, headers=headers, json=data, proxies=proxies)
- print(response.content)
+ # logger.info(response.content)
try:
image_url = json.loads(response.content.decode('utf8'))['data'][0]['url']
except:
@@ -76,7 +76,7 @@ def edit_image(llm_kwargs, prompt, image_path, resolution="1024x1024", model="da
}
response = requests.post(url, headers=headers, files=files, proxies=proxies)
- print(response.content)
+ # logger.info(response.content)
try:
image_url = json.loads(response.content.decode('utf8'))['data'][0]['url']
except:
diff --git a/crazy_functions/Latex_Function.py b/crazy_functions/Latex_Function.py
index ba03cf12..af020775 100644
--- a/crazy_functions/Latex_Function.py
+++ b/crazy_functions/Latex_Function.py
@@ -1,6 +1,8 @@
from toolbox import update_ui, trimmed_format_exc, get_conf, get_log_folder, promote_file_to_downloadzone, check_repeat_upload, map_file_to_sha256
from toolbox import CatchException, report_exception, update_ui_lastest_msg, zip_result, gen_time_str
from functools import partial
+from loguru import logger
+
import glob, os, requests, time, json, tarfile
pj = os.path.join
@@ -178,7 +180,7 @@ def pdf2tex_project(pdf_file_path, plugin_kwargs):
if response.ok:
pdf_id = response.json()["pdf_id"]
- print(f"PDF processing initiated. PDF ID: {pdf_id}")
+ logger.info(f"PDF processing initiated. PDF ID: {pdf_id}")
# Step 2: Check processing status
while True:
@@ -186,12 +188,12 @@ def pdf2tex_project(pdf_file_path, plugin_kwargs):
conversion_data = conversion_response.json()
if conversion_data["status"] == "completed":
- print("PDF processing completed.")
+ logger.info("PDF processing completed.")
break
elif conversion_data["status"] == "error":
- print("Error occurred during processing.")
+ logger.info("Error occurred during processing.")
else:
- print(f"Processing status: {conversion_data['status']}")
+ logger.info(f"Processing status: {conversion_data['status']}")
time.sleep(5) # wait for a few seconds before checking again
# Step 3: Save results to local files
@@ -206,7 +208,7 @@ def pdf2tex_project(pdf_file_path, plugin_kwargs):
output_path = os.path.join(output_dir, output_name)
with open(output_path, "wb") as output_file:
output_file.write(response.content)
- print(f"tex.zip file saved at: {output_path}")
+ logger.info(f"tex.zip file saved at: {output_path}")
import zipfile
unzip_dir = os.path.join(output_dir, file_name_wo_dot)
@@ -216,7 +218,7 @@ def pdf2tex_project(pdf_file_path, plugin_kwargs):
return unzip_dir
else:
- print(f"Error sending PDF for processing. Status code: {response.status_code}")
+ logger.error(f"Error sending PDF for processing. Status code: {response.status_code}")
return None
else:
from crazy_functions.pdf_fns.parse_pdf_via_doc2x import 解析PDF_DOC2X_转Latex
diff --git a/crazy_functions/Latex全文润色.py b/crazy_functions/Latex全文润色.py
index 960571fd..875e5ad4 100644
--- a/crazy_functions/Latex全文润色.py
+++ b/crazy_functions/Latex全文润色.py
@@ -1,6 +1,6 @@
from toolbox import update_ui, trimmed_format_exc, promote_file_to_downloadzone, get_log_folder
from toolbox import CatchException, report_exception, write_history_to_file, zip_folder
-
+from loguru import logger
class PaperFileGroup():
def __init__(self):
@@ -33,7 +33,7 @@ class PaperFileGroup():
self.sp_file_index.append(index)
self.sp_file_tag.append(self.file_paths[index] + f".part-{j}.tex")
- print('Segmentation: done')
+ logger.info('Segmentation: done')
def merge_result(self):
self.file_result = ["" for _ in range(len(self.file_paths))]
for r, k in zip(self.sp_file_result, self.sp_file_index):
@@ -56,7 +56,7 @@ class PaperFileGroup():
def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, language='en', mode='polish'):
import time, os, re
- from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+ from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
# <-------- 读取Latex文件,删除其中的所有注释 ---------->
@@ -122,7 +122,7 @@ def 多文件润色(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch
pfg.write_result()
pfg.zip_result()
except:
- print(trimmed_format_exc())
+ logger.error(trimmed_format_exc())
# <-------- 整理结果,退出 ---------->
create_report_file_name = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime()) + f"-chatgpt.polish.md"
diff --git a/crazy_functions/Latex全文翻译.py b/crazy_functions/Latex全文翻译.py
index a0802fd5..47824860 100644
--- a/crazy_functions/Latex全文翻译.py
+++ b/crazy_functions/Latex全文翻译.py
@@ -1,6 +1,6 @@
from toolbox import update_ui, promote_file_to_downloadzone
from toolbox import CatchException, report_exception, write_history_to_file
-fast_debug = False
+from loguru import logger
class PaperFileGroup():
def __init__(self):
@@ -33,11 +33,11 @@ class PaperFileGroup():
self.sp_file_index.append(index)
self.sp_file_tag.append(self.file_paths[index] + f".part-{j}.tex")
- print('Segmentation: done')
+ logger.info('Segmentation: done')
def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, language='en'):
import time, os, re
- from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+ from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
# <-------- 读取Latex文件,删除其中的所有注释 ---------->
pfg = PaperFileGroup()
diff --git a/crazy_functions/Markdown_Translate.py b/crazy_functions/Markdown_Translate.py
index 59f26fee..858d13da 100644
--- a/crazy_functions/Markdown_Translate.py
+++ b/crazy_functions/Markdown_Translate.py
@@ -1,4 +1,5 @@
-import glob, shutil, os, re, logging
+import glob, shutil, os, re
+from loguru import logger
from toolbox import update_ui, trimmed_format_exc, gen_time_str
from toolbox import CatchException, report_exception, get_log_folder
from toolbox import write_history_to_file, promote_file_to_downloadzone
@@ -34,7 +35,7 @@ class PaperFileGroup():
self.sp_file_contents.append(segment)
self.sp_file_index.append(index)
self.sp_file_tag.append(self.file_paths[index] + f".part-{j}.md")
- logging.info('Segmentation: done')
+ logger.info('Segmentation: done')
def merge_result(self):
self.file_result = ["" for _ in range(len(self.file_paths))]
@@ -51,7 +52,7 @@ class PaperFileGroup():
return manifest
def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, language='en'):
- from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+ from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
# <-------- 读取Markdown文件,删除其中的所有注释 ---------->
pfg = PaperFileGroup()
@@ -106,7 +107,7 @@ def 多文件翻译(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch
expected_f_name = plugin_kwargs['markdown_expected_output_path']
shutil.copyfile(output_file, expected_f_name)
except:
- logging.error(trimmed_format_exc())
+ logger.error(trimmed_format_exc())
# <-------- 整理结果,退出 ---------->
create_report_file_name = gen_time_str() + f"-chatgpt.md"
@@ -126,7 +127,7 @@ def get_files_from_everything(txt, preference=''):
proxies = get_conf('proxies')
# 网络的远程文件
if preference == 'Github':
- logging.info('正在从github下载资源 ...')
+ logger.info('正在从github下载资源 ...')
if not txt.endswith('.md'):
# Make a request to the GitHub API to retrieve the repository information
url = txt.replace("https://github.com/", "https://api.github.com/repos/") + '/readme'
diff --git a/crazy_functions/Social_Helper.py b/crazy_functions/Social_Helper.py
index 9627f9c0..c4aaec23 100644
--- a/crazy_functions/Social_Helper.py
+++ b/crazy_functions/Social_Helper.py
@@ -1,7 +1,13 @@
+import pickle, os, random
from toolbox import CatchException, update_ui, get_conf, get_log_folder, update_ui_lastest_msg
from crazy_functions.crazy_utils import input_clipping
from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-import pickle, os
+from request_llms.bridge_all import predict_no_ui_long_connection
+from crazy_functions.json_fns.select_tool import structure_output, select_tool
+from pydantic import BaseModel, Field
+from loguru import logger
+from typing import List
+
SOCIAL_NETWOK_WORKER_REGISTER = {}
@@ -9,7 +15,7 @@ class SocialNetwork():
def __init__(self):
self.people = []
-class SocialNetworkWorker():
+class SaveAndLoad():
def __init__(self, user_name, llm_kwargs, auto_load_checkpoint=True, checkpoint_dir=None) -> None:
self.user_name = user_name
self.checkpoint_dir = checkpoint_dir
@@ -41,8 +47,105 @@ class SocialNetworkWorker():
return SocialNetwork()
+class Friend(BaseModel):
+ friend_name: str = Field(description="name of a friend")
+ friend_description: str = Field(description="description of a friend (everything about this friend)")
+ friend_relationship: str = Field(description="The relationship with a friend (e.g. friend, family, colleague)")
+
+class FriendList(BaseModel):
+ friends_list: List[Friend] = Field(description="The list of friends")
+
+
+class SocialNetworkWorker(SaveAndLoad):
+ def ai_socail_advice(self, prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, run_gpt_fn, intention_type):
+ pass
+
+ def ai_remove_friend(self, prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, run_gpt_fn, intention_type):
+ pass
+
+ def ai_list_friends(self, prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, run_gpt_fn, intention_type):
+ pass
+
+ def ai_add_multi_friends(self, prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, run_gpt_fn, intention_type):
+ friend, err_msg = structure_output(
+ txt=prompt,
+ prompt="根据提示, 解析多个联系人的身份信息\n\n",
+ err_msg=f"不能理解该联系人",
+ run_gpt_fn=run_gpt_fn,
+ pydantic_cls=FriendList
+ )
+ if friend.friends_list:
+ for f in friend.friends_list:
+ self.add_friend(f)
+ msg = f"成功添加{len(friend.friends_list)}个联系人: {str(friend.friends_list)}"
+ yield from update_ui_lastest_msg(lastmsg=msg, chatbot=chatbot, history=history, delay=0)
+
+
+ def run(self, txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request):
+ prompt = txt
+ run_gpt_fn = lambda inputs, sys_prompt: predict_no_ui_long_connection(inputs=inputs, llm_kwargs=llm_kwargs, history=[], sys_prompt=sys_prompt, observe_window=[])
+ self.tools_to_select = {
+ "SocialAdvice":{
+ "explain_to_llm": "如果用户希望获取社交指导,调用SocialAdvice生成一些社交建议",
+ "callback": self.ai_socail_advice,
+ },
+ "AddFriends":{
+ "explain_to_llm": "如果用户给出了联系人,调用AddMultiFriends把联系人添加到数据库",
+ "callback": self.ai_add_multi_friends,
+ },
+ "RemoveFriend":{
+ "explain_to_llm": "如果用户希望移除某个联系人,调用RemoveFriend",
+ "callback": self.ai_remove_friend,
+ },
+ "ListFriends":{
+ "explain_to_llm": "如果用户列举联系人,调用ListFriends",
+ "callback": self.ai_list_friends,
+ }
+ }
+
+ try:
+ Explaination = '\n'.join([f'{k}: {v["explain_to_llm"]}' for k, v in self.tools_to_select.items()])
+ class UserSociaIntention(BaseModel):
+ intention_type: str = Field(
+ description=
+ f"The type of user intention. You must choose from {self.tools_to_select.keys()}.\n\n"
+ f"Explaination:\n{Explaination}",
+ default="SocialAdvice"
+ )
+ pydantic_cls_instance, err_msg = select_tool(
+ prompt=txt,
+ run_gpt_fn=run_gpt_fn,
+ pydantic_cls=UserSociaIntention
+ )
+ except Exception as e:
+ yield from update_ui_lastest_msg(
+ lastmsg=f"无法理解用户意图 {err_msg}",
+ chatbot=chatbot,
+ history=history,
+ delay=0
+ )
+ return
+
+ intention_type = pydantic_cls_instance.intention_type
+ intention_callback = self.tools_to_select[pydantic_cls_instance.intention_type]['callback']
+ yield from intention_callback(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, run_gpt_fn, intention_type)
+
+
+ def add_friend(self, friend):
+ # check whether the friend is already in the social network
+ for f in self.social_network.people:
+ if f.friend_name == friend.friend_name:
+ f.friend_description = friend.friend_description
+ f.friend_relationship = friend.friend_relationship
+ logger.info(f"Repeated friend, update info: {friend}")
+ return
+ logger.info(f"Add a new friend: {friend}")
+ self.social_network.people.append(friend)
+ return
+
+
@CatchException
-def I人助手(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request, num_day=5):
+def I人助手(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request):
# 1. we retrieve worker from global context
user_name = chatbot.get_user()
@@ -58,8 +161,7 @@ def I人助手(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt,
)
# 2. save
- social_network_worker.social_network.people.append("张三")
+ yield from social_network_worker.run(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request)
social_network_worker.save_to_checkpoint(checkpoint_dir)
- chatbot.append(["good", "work"])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
diff --git a/crazy_functions/SourceCode_Analyse.py b/crazy_functions/SourceCode_Analyse.py
index ea071ed3..9f2c342f 100644
--- a/crazy_functions/SourceCode_Analyse.py
+++ b/crazy_functions/SourceCode_Analyse.py
@@ -5,8 +5,8 @@ from crazy_functions.crazy_utils import input_clipping
def 解析源代码新(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
import os, copy
- from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
- from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+ from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+ from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
summary_batch_isolation = True
inputs_array = []
diff --git a/crazy_functions/SourceCode_Comment.py b/crazy_functions/SourceCode_Comment.py
index e61f14d5..20390800 100644
--- a/crazy_functions/SourceCode_Comment.py
+++ b/crazy_functions/SourceCode_Comment.py
@@ -73,7 +73,7 @@ def 注释源代码(file_manifest, project_folder, llm_kwargs, plugin_kwargs, ch
file_tree_struct.manifest[fp].compare_html = compare_html_path
with open(compare_html_path, 'w', encoding='utf-8') as f:
f.write(html_template)
- print('done 1')
+ # print('done 1')
chatbot.append([None, f"正在处理:"])
futures = []
diff --git a/crazy_functions/agent_fns/echo_agent.py b/crazy_functions/agent_fns/echo_agent.py
index 52bf72de..1c691cb7 100644
--- a/crazy_functions/agent_fns/echo_agent.py
+++ b/crazy_functions/agent_fns/echo_agent.py
@@ -1,4 +1,5 @@
from crazy_functions.agent_fns.pipe import PluginMultiprocessManager, PipeCom
+from loguru import logger
class EchoDemo(PluginMultiprocessManager):
def subprocess_worker(self, child_conn):
@@ -16,4 +17,4 @@ class EchoDemo(PluginMultiprocessManager):
elif msg.cmd == "terminate":
self.child_conn.send(PipeCom("done", ""))
break
- print('[debug] subprocess_worker terminated')
\ No newline at end of file
+ logger.info('[debug] subprocess_worker terminated')
\ No newline at end of file
diff --git a/crazy_functions/agent_fns/pipe.py b/crazy_functions/agent_fns/pipe.py
index 128507c3..db8e83d5 100644
--- a/crazy_functions/agent_fns/pipe.py
+++ b/crazy_functions/agent_fns/pipe.py
@@ -1,5 +1,6 @@
from toolbox import get_log_folder, update_ui, gen_time_str, get_conf, promote_file_to_downloadzone
from crazy_functions.agent_fns.watchdog import WatchDog
+from loguru import logger
import time, os
class PipeCom:
@@ -47,7 +48,7 @@ class PluginMultiprocessManager:
def terminate(self):
self.p.terminate()
self.alive = False
- print("[debug] instance terminated")
+ logger.info("[debug] instance terminated")
def subprocess_worker(self, child_conn):
# ⭐⭐ run in subprocess
diff --git a/crazy_functions/agent_fns/python_comment_agent.py b/crazy_functions/agent_fns/python_comment_agent.py
index 66fa5c38..dd4b6ce8 100644
--- a/crazy_functions/agent_fns/python_comment_agent.py
+++ b/crazy_functions/agent_fns/python_comment_agent.py
@@ -1,10 +1,12 @@
-from toolbox import CatchException, update_ui
-from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-from request_llms.bridge_all import predict_no_ui_long_connection
import datetime
import re
import os
+from loguru import logger
from textwrap import dedent
+from toolbox import CatchException, update_ui
+from request_llms.bridge_all import predict_no_ui_long_connection
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+
# TODO: 解决缩进问题
find_function_end_prompt = '''
@@ -355,7 +357,7 @@ class PythonCodeComment():
try:
successful, hint = self.verify_successful(next_batch, result)
except Exception as e:
- print('ignored exception:\n' + str(e))
+ logger.error('ignored exception:\n' + str(e))
break
if successful:
break
diff --git a/crazy_functions/agent_fns/watchdog.py b/crazy_functions/agent_fns/watchdog.py
index 7cd14d23..bb9a99d1 100644
--- a/crazy_functions/agent_fns/watchdog.py
+++ b/crazy_functions/agent_fns/watchdog.py
@@ -1,4 +1,5 @@
import threading, time
+from loguru import logger
class WatchDog():
def __init__(self, timeout, bark_fn, interval=3, msg="") -> None:
@@ -13,7 +14,7 @@ class WatchDog():
while True:
if self.kill_dog: break
if time.time() - self.last_feed > self.timeout:
- if len(self.msg) > 0: print(self.msg)
+ if len(self.msg) > 0: logger.info(self.msg)
self.bark_fn()
break
time.sleep(self.interval)
diff --git a/crazy_functions/chatglm微调工具.py b/crazy_functions/chatglm微调工具.py
index 8405fc55..fc5f33da 100644
--- a/crazy_functions/chatglm微调工具.py
+++ b/crazy_functions/chatglm微调工具.py
@@ -1,5 +1,5 @@
from toolbox import CatchException, update_ui, promote_file_to_downloadzone
-from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
import datetime, json
def fetch_items(list_of_items, batch_size):
diff --git a/crazy_functions/crazy_utils.py b/crazy_functions/crazy_utils.py
index 710fd7f1..5751956f 100644
--- a/crazy_functions/crazy_utils.py
+++ b/crazy_functions/crazy_utils.py
@@ -1,8 +1,8 @@
-from toolbox import update_ui, get_conf, trimmed_format_exc, get_max_token, Singleton
-from shared_utils.char_visual_effect import scolling_visual_effect
-import threading
import os
-import logging
+import threading
+from loguru import logger
+from shared_utils.char_visual_effect import scolling_visual_effect
+from toolbox import update_ui, get_conf, trimmed_format_exc, get_max_token, Singleton
def input_clipping(inputs, history, max_token_limit, return_clip_flags=False):
"""
@@ -133,7 +133,7 @@ def request_gpt_model_in_new_thread_with_ui_alive(
except:
# 【第三种情况】:其他错误:重试几次
tb_str = '```\n' + trimmed_format_exc() + '```'
- print(tb_str)
+ logger.error(tb_str)
mutable[0] += f"[Local Message] 警告,在执行过程中遭遇问题, Traceback:\n\n{tb_str}\n\n"
if retry_op > 0:
retry_op -= 1
@@ -283,7 +283,7 @@ def request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency(
# 【第三种情况】:其他错误
if detect_timeout(): raise RuntimeError("检测到程序终止。")
tb_str = '```\n' + trimmed_format_exc() + '```'
- print(tb_str)
+ logger.error(tb_str)
gpt_say += f"[Local Message] 警告,线程{index}在执行过程中遭遇问题, Traceback:\n\n{tb_str}\n\n"
if len(mutable[index][0]) > 0: gpt_say += "此线程失败前收到的回答:\n\n" + mutable[index][0]
if retry_op > 0:
@@ -378,7 +378,7 @@ def read_and_clean_pdf_text(fp):
import fitz, copy
import re
import numpy as np
- from shared_utils.colorful import print亮黄, print亮绿
+ # from shared_utils.colorful import print亮黄, print亮绿
fc = 0 # Index 0 文本
fs = 1 # Index 1 字体
fb = 2 # Index 2 框框
@@ -595,7 +595,7 @@ class nougat_interface():
def nougat_with_timeout(self, command, cwd, timeout=3600):
import subprocess
from toolbox import ProxyNetworkActivate
- logging.info(f'正在执行命令 {command}')
+ logger.info(f'正在执行命令 {command}')
with ProxyNetworkActivate("Nougat_Download"):
process = subprocess.Popen(command, shell=False, cwd=cwd, env=os.environ)
try:
@@ -603,7 +603,7 @@ class nougat_interface():
except subprocess.TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
- print("Process timed out!")
+ logger.error("Process timed out!")
return False
return True
diff --git a/crazy_functions/diagram_fns/file_tree.py b/crazy_functions/diagram_fns/file_tree.py
index e1800ee9..0d1c8310 100644
--- a/crazy_functions/diagram_fns/file_tree.py
+++ b/crazy_functions/diagram_fns/file_tree.py
@@ -1,5 +1,6 @@
import os
from textwrap import indent
+from loguru import logger
class FileNode:
def __init__(self, name, build_manifest=False):
@@ -60,7 +61,7 @@ class FileNode:
current_node.children.append(term)
def print_files_recursively(self, level=0, code="R0"):
- print(' '*level + self.name + ' ' + str(self.is_leaf) + ' ' + str(self.level))
+ logger.info(' '*level + self.name + ' ' + str(self.is_leaf) + ' ' + str(self.level))
for j, child in enumerate(self.children):
child.print_files_recursively(level=level+1, code=code+str(j))
self.parenting_ship.extend(child.parenting_ship)
@@ -123,4 +124,4 @@ if __name__ == "__main__":
"用于加载和分割文件中的文本的通用文件加载器用于加载和分割文件中的文本的通用文件加载器用于加载和分割文件中的文本的通用文件加载器",
"包含了用于构建和管理向量数据库的函数和类包含了用于构建和管理向量数据库的函数和类包含了用于构建和管理向量数据库的函数和类",
]
- print(build_file_tree_mermaid_diagram(file_manifest, file_comments, "项目文件树"))
\ No newline at end of file
+ logger.info(build_file_tree_mermaid_diagram(file_manifest, file_comments, "项目文件树"))
\ No newline at end of file
diff --git a/crazy_functions/json_fns/pydantic_io.py b/crazy_functions/json_fns/pydantic_io.py
index d7093359..bd78cefe 100644
--- a/crazy_functions/json_fns/pydantic_io.py
+++ b/crazy_functions/json_fns/pydantic_io.py
@@ -24,8 +24,8 @@ class Actor(BaseModel):
film_names: List[str] = Field(description="list of names of films they starred in")
"""
-import json, re, logging
-
+import json, re
+from loguru import logger as logging
PYDANTIC_FORMAT_INSTRUCTIONS = """The output should be formatted as a JSON instance that conforms to the JSON schema below.
diff --git a/crazy_functions/json_fns/select_tool.py b/crazy_functions/json_fns/select_tool.py
new file mode 100644
index 00000000..5ed61301
--- /dev/null
+++ b/crazy_functions/json_fns/select_tool.py
@@ -0,0 +1,26 @@
+from crazy_functions.json_fns.pydantic_io import GptJsonIO, JsonStringError
+
+def structure_output(txt, prompt, err_msg, run_gpt_fn, pydantic_cls):
+ gpt_json_io = GptJsonIO(pydantic_cls)
+ analyze_res = run_gpt_fn(
+ txt,
+ sys_prompt=prompt + gpt_json_io.format_instructions
+ )
+ try:
+ friend = gpt_json_io.generate_output_auto_repair(analyze_res, run_gpt_fn)
+ except JsonStringError as e:
+ return None, err_msg
+
+ err_msg = ""
+ return friend, err_msg
+
+
+def select_tool(prompt, run_gpt_fn, pydantic_cls):
+ pydantic_cls_instance, err_msg = structure_output(
+ txt=prompt,
+ prompt="根据提示, 分析应该调用哪个工具函数\n\n",
+ err_msg=f"不能理解该联系人",
+ run_gpt_fn=run_gpt_fn,
+ pydantic_cls=pydantic_cls
+ )
+ return pydantic_cls_instance, err_msg
\ No newline at end of file
diff --git a/crazy_functions/latex_fns/latex_actions.py b/crazy_functions/latex_fns/latex_actions.py
index 0ec01b99..4293f0d0 100644
--- a/crazy_functions/latex_fns/latex_actions.py
+++ b/crazy_functions/latex_fns/latex_actions.py
@@ -1,15 +1,17 @@
+import os
+import re
+import shutil
+import numpy as np
+from loguru import logger
from toolbox import update_ui, update_ui_lastest_msg, get_log_folder
from toolbox import get_conf, promote_file_to_downloadzone
-from .latex_toolbox import PRESERVE, TRANSFORM
-from .latex_toolbox import set_forbidden_text, set_forbidden_text_begin_end, set_forbidden_text_careful_brace
-from .latex_toolbox import reverse_forbidden_text_careful_brace, reverse_forbidden_text, convert_to_linklist, post_process
-from .latex_toolbox import fix_content, find_main_tex_file, merge_tex_files, compile_latex_with_timeout
-from .latex_toolbox import find_title_and_abs
-from .latex_pickle_io import objdump, objload
+from crazy_functions.latex_fns.latex_toolbox import PRESERVE, TRANSFORM
+from crazy_functions.latex_fns.latex_toolbox import set_forbidden_text, set_forbidden_text_begin_end, set_forbidden_text_careful_brace
+from crazy_functions.latex_fns.latex_toolbox import reverse_forbidden_text_careful_brace, reverse_forbidden_text, convert_to_linklist, post_process
+from crazy_functions.latex_fns.latex_toolbox import fix_content, find_main_tex_file, merge_tex_files, compile_latex_with_timeout
+from crazy_functions.latex_fns.latex_toolbox import find_title_and_abs
+from crazy_functions.latex_fns.latex_pickle_io import objdump, objload
-import os, shutil
-import re
-import numpy as np
pj = os.path.join
@@ -323,7 +325,7 @@ def remove_buggy_lines(file_path, log_path, tex_name, tex_name_pure, n_fix, work
buggy_lines = [int(l) for l in buggy_lines]
buggy_lines = sorted(buggy_lines)
buggy_line = buggy_lines[0]-1
- print("reversing tex line that has errors", buggy_line)
+ logger.warning("reversing tex line that has errors", buggy_line)
# 重组,逆转出错的段落
if buggy_line not in fixed_line:
@@ -337,7 +339,7 @@ def remove_buggy_lines(file_path, log_path, tex_name, tex_name_pure, n_fix, work
return True, f"{tex_name_pure}_fix_{n_fix}", buggy_lines
except:
- print("Fatal error occurred, but we cannot identify error, please download zip, read latex log, and compile manually.")
+ logger.error("Fatal error occurred, but we cannot identify error, please download zip, read latex log, and compile manually.")
return False, -1, [-1]
@@ -380,7 +382,7 @@ def 编译Latex(chatbot, history, main_file_original, main_file_modified, work_f
if mode!='translate_zh':
yield from update_ui_lastest_msg(f'尝试第 {n_fix}/{max_try} 次编译, 使用latexdiff生成论文转化前后对比 ...', chatbot, history) # 刷新Gradio前端界面
- print( f'latexdiff --encoding=utf8 --append-safecmd=subfile {work_folder_original}/{main_file_original}.tex {work_folder_modified}/{main_file_modified}.tex --flatten > {work_folder}/merge_diff.tex')
+ logger.info( f'latexdiff --encoding=utf8 --append-safecmd=subfile {work_folder_original}/{main_file_original}.tex {work_folder_modified}/{main_file_modified}.tex --flatten > {work_folder}/merge_diff.tex')
ok = compile_latex_with_timeout(f'latexdiff --encoding=utf8 --append-safecmd=subfile {work_folder_original}/{main_file_original}.tex {work_folder_modified}/{main_file_modified}.tex --flatten > {work_folder}/merge_diff.tex', os.getcwd())
yield from update_ui_lastest_msg(f'尝试第 {n_fix}/{max_try} 次编译, 正在编译对比PDF ...', chatbot, history) # 刷新Gradio前端界面
@@ -419,7 +421,7 @@ def 编译Latex(chatbot, history, main_file_original, main_file_modified, work_f
shutil.copyfile(concat_pdf, pj(work_folder, '..', 'translation', 'comparison.pdf'))
promote_file_to_downloadzone(concat_pdf, rename_file=None, chatbot=chatbot) # promote file to web UI
except Exception as e:
- print(e)
+ logger.error(e)
pass
return True # 成功啦
else:
@@ -465,4 +467,4 @@ def write_html(sp_file_contents, sp_file_result, chatbot, project_folder):
promote_file_to_downloadzone(file=res, chatbot=chatbot)
except:
from toolbox import trimmed_format_exc
- print('writing html result failed:', trimmed_format_exc())
+ logger.error('writing html result failed:', trimmed_format_exc())
diff --git a/crazy_functions/latex_fns/latex_toolbox.py b/crazy_functions/latex_fns/latex_toolbox.py
index bbd1bb3c..81e191ab 100644
--- a/crazy_functions/latex_fns/latex_toolbox.py
+++ b/crazy_functions/latex_fns/latex_toolbox.py
@@ -1,6 +1,8 @@
-import os, shutil
+import os
import re
+import shutil
import numpy as np
+from loguru import logger
PRESERVE = 0
TRANSFORM = 1
@@ -55,7 +57,7 @@ def post_process(root):
str_stack.append("{")
elif c == "}":
if len(str_stack) == 1:
- print("stack fix")
+ logger.warning("fixing brace error")
return i
str_stack.pop(-1)
else:
@@ -601,7 +603,7 @@ def compile_latex_with_timeout(command, cwd, timeout=60):
except subprocess.TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
- print("Process timed out!")
+ logger.error("Process timed out (compile_latex_with_timeout)!")
return False
return True
diff --git a/crazy_functions/live_audio/aliyunASR.py b/crazy_functions/live_audio/aliyunASR.py
index 3a523287..c1d646dc 100644
--- a/crazy_functions/live_audio/aliyunASR.py
+++ b/crazy_functions/live_audio/aliyunASR.py
@@ -1,5 +1,6 @@
-import time, logging, json, sys, struct
+import time, json, sys, struct
import numpy as np
+from loguru import logger as logging
from scipy.io.wavfile import WAVE_FORMAT
def write_numpy_to_wave(filename, rate, data, add_header=False):
@@ -106,18 +107,14 @@ def is_speaker_speaking(vad, data, sample_rate):
class AliyunASR():
def test_on_sentence_begin(self, message, *args):
- # print("test_on_sentence_begin:{}".format(message))
pass
def test_on_sentence_end(self, message, *args):
- # print("test_on_sentence_end:{}".format(message))
message = json.loads(message)
self.parsed_sentence = message['payload']['result']
self.event_on_entence_end.set()
- # print(self.parsed_sentence)
def test_on_start(self, message, *args):
- # print("test_on_start:{}".format(message))
pass
def test_on_error(self, message, *args):
@@ -129,13 +126,11 @@ class AliyunASR():
pass
def test_on_result_chg(self, message, *args):
- # print("test_on_chg:{}".format(message))
message = json.loads(message)
self.parsed_text = message['payload']['result']
self.event_on_result_chg.set()
def test_on_completed(self, message, *args):
- # print("on_completed:args=>{} message=>{}".format(args, message))
pass
def audio_convertion_thread(self, uuid):
@@ -248,14 +243,14 @@ class AliyunASR():
try:
response = client.do_action_with_exception(request)
- print(response)
+ logging.info(response)
jss = json.loads(response)
if 'Token' in jss and 'Id' in jss['Token']:
token = jss['Token']['Id']
expireTime = jss['Token']['ExpireTime']
- print("token = " + token)
- print("expireTime = " + str(expireTime))
+ logging.info("token = " + token)
+ logging.info("expireTime = " + str(expireTime))
except Exception as e:
- print(e)
+ logging.error(e)
return token
diff --git a/crazy_functions/pdf_fns/breakdown_txt.py b/crazy_functions/pdf_fns/breakdown_txt.py
index 784d796b..d89ce9fc 100644
--- a/crazy_functions/pdf_fns/breakdown_txt.py
+++ b/crazy_functions/pdf_fns/breakdown_txt.py
@@ -1,4 +1,5 @@
from crazy_functions.ipc_fns.mp import run_in_subprocess_with_timeout
+from loguru import logger
def force_breakdown(txt, limit, get_token_fn):
""" 当无法用标点、空行分割时,我们用最暴力的方法切割
@@ -76,7 +77,7 @@ def cut(limit, get_token_fn, txt_tocut, must_break_at_empty_line, break_anyway=F
remain_txt_to_cut = post
remain_txt_to_cut, remain_txt_to_cut_storage = maintain_storage(remain_txt_to_cut, remain_txt_to_cut_storage)
process = fin_len/total_len
- print(f'正在文本切分 {int(process*100)}%')
+ logger.info(f'正在文本切分 {int(process*100)}%')
if len(remain_txt_to_cut.strip()) == 0:
break
return res
@@ -119,7 +120,7 @@ if __name__ == '__main__':
for i in range(5):
file_content += file_content
- print(len(file_content))
+ logger.info(len(file_content))
TOKEN_LIMIT_PER_FRAGMENT = 2500
res = breakdown_text_to_satisfy_token_limit(file_content, TOKEN_LIMIT_PER_FRAGMENT)
diff --git a/crazy_functions/pdf_fns/parse_pdf_legacy.py b/crazy_functions/pdf_fns/parse_pdf_legacy.py
index 482cd055..56cdb844 100644
--- a/crazy_functions/pdf_fns/parse_pdf_legacy.py
+++ b/crazy_functions/pdf_fns/parse_pdf_legacy.py
@@ -5,6 +5,7 @@ from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_
from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
from crazy_functions.crazy_utils import read_and_clean_pdf_text
from shared_utils.colorful import *
+from loguru import logger
import os
def 解析PDF_简单拆解(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
@@ -93,7 +94,7 @@ def 解析PDF_简单拆解(file_manifest, project_folder, llm_kwargs, plugin_kwa
generated_html_files.append(ch.save_file(create_report_file_name))
except:
from toolbox import trimmed_format_exc
- print('writing html result failed:', trimmed_format_exc())
+ logger.error('writing html result failed:', trimmed_format_exc())
# 准备文件的下载
for pdf_path in generated_conclusion_files:
diff --git a/crazy_functions/rag_fns/llama_index_worker.py b/crazy_functions/rag_fns/llama_index_worker.py
index 7a559927..f6f7f0ab 100644
--- a/crazy_functions/rag_fns/llama_index_worker.py
+++ b/crazy_functions/rag_fns/llama_index_worker.py
@@ -1,6 +1,7 @@
import llama_index
import os
import atexit
+from loguru import logger
from typing import List
from llama_index.core import Document
from llama_index.core.schema import TextNode
@@ -41,14 +42,14 @@ class SaveLoad():
return True
def save_to_checkpoint(self, checkpoint_dir=None):
- print(f'saving vector store to: {checkpoint_dir}')
+ logger.info(f'saving vector store to: {checkpoint_dir}')
if checkpoint_dir is None: checkpoint_dir = self.checkpoint_dir
self.vs_index.storage_context.persist(persist_dir=checkpoint_dir)
def load_from_checkpoint(self, checkpoint_dir=None):
if checkpoint_dir is None: checkpoint_dir = self.checkpoint_dir
if self.does_checkpoint_exist(checkpoint_dir=checkpoint_dir):
- print('loading checkpoint from disk')
+ logger.info('loading checkpoint from disk')
from llama_index.core import StorageContext, load_index_from_storage
storage_context = StorageContext.from_defaults(persist_dir=checkpoint_dir)
self.vs_index = load_index_from_storage(storage_context, embed_model=self.embed_model)
@@ -85,9 +86,9 @@ class LlamaIndexRagWorker(SaveLoad):
self.vs_index.storage_context.index_store.to_dict()
docstore = self.vs_index.storage_context.docstore.docs
vector_store_preview = "\n".join([ f"{_id} | {tn.text}" for _id, tn in docstore.items() ])
- print('\n++ --------inspect_vector_store begin--------')
- print(vector_store_preview)
- print('oo --------inspect_vector_store end--------')
+ logger.info('\n++ --------inspect_vector_store begin--------')
+ logger.info(vector_store_preview)
+ logger.info('oo --------inspect_vector_store end--------')
return vector_store_preview
def add_documents_to_vector_store(self, document_list):
@@ -125,5 +126,5 @@ class LlamaIndexRagWorker(SaveLoad):
def generate_node_array_preview(self, nodes):
buf = "\n".join(([f"(No.{i+1} | score {n.score:.3f}): {n.text}" for i, n in enumerate(nodes)]))
- if self.debug_mode: print(buf)
+ if self.debug_mode: logger.info(buf)
return buf
diff --git a/crazy_functions/rag_fns/milvus_worker.py b/crazy_functions/rag_fns/milvus_worker.py
index 4b5b0ad9..6eccb6a7 100644
--- a/crazy_functions/rag_fns/milvus_worker.py
+++ b/crazy_functions/rag_fns/milvus_worker.py
@@ -2,6 +2,7 @@ import llama_index
import os
import atexit
from typing import List
+from loguru import logger
from llama_index.core import Document
from llama_index.core.schema import TextNode
from request_llms.embed_models.openai_embed import OpenAiEmbeddingModel
@@ -44,14 +45,14 @@ class MilvusSaveLoad():
return True
def save_to_checkpoint(self, checkpoint_dir=None):
- print(f'saving vector store to: {checkpoint_dir}')
+ logger.info(f'saving vector store to: {checkpoint_dir}')
# if checkpoint_dir is None: checkpoint_dir = self.checkpoint_dir
# self.vs_index.storage_context.persist(persist_dir=checkpoint_dir)
def load_from_checkpoint(self, checkpoint_dir=None):
if checkpoint_dir is None: checkpoint_dir = self.checkpoint_dir
if self.does_checkpoint_exist(checkpoint_dir=checkpoint_dir):
- print('loading checkpoint from disk')
+ logger.info('loading checkpoint from disk')
from llama_index.core import StorageContext, load_index_from_storage
storage_context = StorageContext.from_defaults(persist_dir=checkpoint_dir)
try:
@@ -101,7 +102,7 @@ class MilvusRagWorker(MilvusSaveLoad, LlamaIndexRagWorker):
vector_store_preview = "\n".join(
[f"{node.id_} | {node.text}" for node in dummy_retrieve_res]
)
- print('\n++ --------inspect_vector_store begin--------')
- print(vector_store_preview)
- print('oo --------inspect_vector_store end--------')
+ logger.info('\n++ --------inspect_vector_store begin--------')
+ logger.info(vector_store_preview)
+ logger.info('oo --------inspect_vector_store end--------')
return vector_store_preview
diff --git a/crazy_functions/vector_fns/vector_database.py b/crazy_functions/vector_fns/vector_database.py
index 46fc72d6..cd93ae92 100644
--- a/crazy_functions/vector_fns/vector_database.py
+++ b/crazy_functions/vector_fns/vector_database.py
@@ -1,16 +1,17 @@
# From project chatglm-langchain
-import threading
-from toolbox import Singleton
import os
-import shutil
import os
import uuid
import tqdm
+import shutil
+import threading
+import numpy as np
+from toolbox import Singleton
+from loguru import logger
from langchain.vectorstores import FAISS
from langchain.docstore.document import Document
from typing import List, Tuple
-import numpy as np
from crazy_functions.vector_fns.general_file_loader import load_file
embedding_model_dict = {
@@ -150,17 +151,17 @@ class LocalDocQA:
failed_files = []
if isinstance(filepath, str):
if not os.path.exists(filepath):
- print("路径不存在")
+ logger.error("路径不存在")
return None
elif os.path.isfile(filepath):
file = os.path.split(filepath)[-1]
try:
docs = load_file(filepath, SENTENCE_SIZE)
- print(f"{file} 已成功加载")
+ logger.info(f"{file} 已成功加载")
loaded_files.append(filepath)
except Exception as e:
- print(e)
- print(f"{file} 未能成功加载")
+ logger.error(e)
+ logger.error(f"{file} 未能成功加载")
return None
elif os.path.isdir(filepath):
docs = []
@@ -170,23 +171,23 @@ class LocalDocQA:
docs += load_file(fullfilepath, SENTENCE_SIZE)
loaded_files.append(fullfilepath)
except Exception as e:
- print(e)
+ logger.error(e)
failed_files.append(file)
if len(failed_files) > 0:
- print("以下文件未能成功加载:")
+ logger.error("以下文件未能成功加载:")
for file in failed_files:
- print(f"{file}\n")
+ logger.error(f"{file}\n")
else:
docs = []
for file in filepath:
docs += load_file(file, SENTENCE_SIZE)
- print(f"{file} 已成功加载")
+ logger.info(f"{file} 已成功加载")
loaded_files.append(file)
if len(docs) > 0:
- print("文件加载完毕,正在生成向量库")
+ logger.info("文件加载完毕,正在生成向量库")
if vs_path and os.path.isdir(vs_path):
try:
self.vector_store = FAISS.load_local(vs_path, text2vec)
@@ -233,7 +234,7 @@ class LocalDocQA:
prompt += "\n\n".join([f"({k}): " + doc.page_content for k, doc in enumerate(related_docs_with_score)])
prompt += "\n\n---\n\n"
prompt = prompt.encode('utf-8', 'ignore').decode() # avoid reading non-utf8 chars
- # print(prompt)
+ # logger.info(prompt)
response = {"query": query, "source_documents": related_docs_with_score}
return response, prompt
@@ -262,7 +263,7 @@ def construct_vector_store(vs_id, vs_path, files, sentence_size, history, one_co
else:
pass
# file_status = "文件未成功加载,请重新上传文件"
- # print(file_status)
+ # logger.info(file_status)
return local_doc_qa, vs_path
@Singleton
@@ -278,7 +279,7 @@ class knowledge_archive_interface():
if self.text2vec_large_chinese is None:
# < -------------------预热文本向量化模组--------------- >
from toolbox import ProxyNetworkActivate
- print('Checking Text2vec ...')
+ logger.info('Checking Text2vec ...')
from langchain.embeddings.huggingface import HuggingFaceEmbeddings
with ProxyNetworkActivate('Download_LLM'): # 临时地激活代理网络
self.text2vec_large_chinese = HuggingFaceEmbeddings(model_name="GanymedeNil/text2vec-large-chinese")
diff --git a/crazy_functions/下载arxiv论文翻译摘要.py b/crazy_functions/下载arxiv论文翻译摘要.py
index 4360df7f..25e4d01d 100644
--- a/crazy_functions/下载arxiv论文翻译摘要.py
+++ b/crazy_functions/下载arxiv论文翻译摘要.py
@@ -1,17 +1,19 @@
+import re, requests, unicodedata, os
from toolbox import update_ui, get_log_folder
from toolbox import write_history_to_file, promote_file_to_downloadzone
from toolbox import CatchException, report_exception, get_conf
-import re, requests, unicodedata, os
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from loguru import logger
+
def download_arxiv_(url_pdf):
if 'arxiv.org' not in url_pdf:
if ('.' in url_pdf) and ('/' not in url_pdf):
new_url = 'https://arxiv.org/abs/'+url_pdf
- print('下载编号:', url_pdf, '自动定位:', new_url)
+ logger.info('下载编号:', url_pdf, '自动定位:', new_url)
# download_arxiv_(new_url)
return download_arxiv_(new_url)
else:
- print('不能识别的URL!')
+ logger.info('不能识别的URL!')
return None
if 'abs' in url_pdf:
url_pdf = url_pdf.replace('abs', 'pdf')
@@ -42,15 +44,12 @@ def download_arxiv_(url_pdf):
requests_pdf_url = url_pdf
file_path = download_dir+title_str
- print('下载中')
+ logger.info('下载中')
proxies = get_conf('proxies')
r = requests.get(requests_pdf_url, proxies=proxies)
with open(file_path, 'wb+') as f:
f.write(r.content)
- print('下载完成')
-
- # print('输出下载命令:','aria2c -o \"%s\" %s'%(title_str,url_pdf))
- # subprocess.call('aria2c --all-proxy=\"172.18.116.150:11084\" -o \"%s\" %s'%(download_dir+title_str,url_pdf), shell=True)
+ logger.info('下载完成')
x = "%s %s %s.bib" % (paper_id, other_info['year'], other_info['authors'])
x = x.replace('?', '?')\
@@ -63,19 +62,9 @@ def download_arxiv_(url_pdf):
def get_name(_url_):
- import os
from bs4 import BeautifulSoup
- print('正在获取文献名!')
- print(_url_)
-
- # arxiv_recall = {}
- # if os.path.exists('./arxiv_recall.pkl'):
- # with open('./arxiv_recall.pkl', 'rb') as f:
- # arxiv_recall = pickle.load(f)
-
- # if _url_ in arxiv_recall:
- # print('在缓存中')
- # return arxiv_recall[_url_]
+ logger.info('正在获取文献名!')
+ logger.info(_url_)
proxies = get_conf('proxies')
res = requests.get(_url_, proxies=proxies)
@@ -92,7 +81,7 @@ def get_name(_url_):
other_details['abstract'] = abstract
except:
other_details['year'] = ''
- print('年份获取失败')
+ logger.info('年份获取失败')
# get author
try:
@@ -101,7 +90,7 @@ def get_name(_url_):
other_details['authors'] = authors
except:
other_details['authors'] = ''
- print('authors获取失败')
+ logger.info('authors获取失败')
# get comment
try:
@@ -116,11 +105,11 @@ def get_name(_url_):
other_details['comment'] = ''
except:
other_details['comment'] = ''
- print('年份获取失败')
+ logger.info('年份获取失败')
title_str = BeautifulSoup(
res.text, 'html.parser').find('title').contents[0]
- print('获取成功:', title_str)
+ logger.info('获取成功:', title_str)
# arxiv_recall[_url_] = (title_str+'.pdf', other_details)
# with open('./arxiv_recall.pkl', 'wb') as f:
# pickle.dump(arxiv_recall, f)
diff --git a/crazy_functions/交互功能函数模板.py b/crazy_functions/交互功能函数模板.py
index 4a8ae6f6..ec9836a4 100644
--- a/crazy_functions/交互功能函数模板.py
+++ b/crazy_functions/交互功能函数模板.py
@@ -1,6 +1,5 @@
from toolbox import CatchException, update_ui
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
@CatchException
def 交互功能模板函数(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request):
diff --git a/crazy_functions/函数动态生成.py b/crazy_functions/函数动态生成.py
index 2ca23559..cd1c8cd4 100644
--- a/crazy_functions/函数动态生成.py
+++ b/crazy_functions/函数动态生成.py
@@ -16,8 +16,8 @@ Testing:
from toolbox import CatchException, update_ui, gen_time_str, trimmed_format_exc, is_the_upload_folder
from toolbox import promote_file_to_downloadzone, get_log_folder, update_ui_lastest_msg
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_plugin_arg
-from .crazy_utils import input_clipping, try_install_deps
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_plugin_arg
+from crazy_functions.crazy_utils import input_clipping, try_install_deps
from crazy_functions.gen_fns.gen_fns_shared import is_function_successfully_generated
from crazy_functions.gen_fns.gen_fns_shared import get_class_name
from crazy_functions.gen_fns.gen_fns_shared import subprocess_worker
diff --git a/crazy_functions/命令行助手.py b/crazy_functions/命令行助手.py
index 43c6d8fb..390ce177 100644
--- a/crazy_functions/命令行助手.py
+++ b/crazy_functions/命令行助手.py
@@ -1,6 +1,6 @@
from toolbox import CatchException, update_ui, gen_time_str
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-from .crazy_utils import input_clipping
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import input_clipping
import copy, json
@CatchException
diff --git a/crazy_functions/多智能体.py b/crazy_functions/多智能体.py
index 00e4539c..37cfeab5 100644
--- a/crazy_functions/多智能体.py
+++ b/crazy_functions/多智能体.py
@@ -6,13 +6,14 @@
"""
+import time
from toolbox import CatchException, update_ui, gen_time_str, trimmed_format_exc, ProxyNetworkActivate
from toolbox import get_conf, select_api_key, update_ui_lastest_msg, Singleton
from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_plugin_arg
from crazy_functions.crazy_utils import input_clipping, try_install_deps
from crazy_functions.agent_fns.persistent import GradioMultiuserManagerForPersistentClasses
from crazy_functions.agent_fns.auto_agent import AutoGenMath
-import time
+from loguru import logger
def remove_model_prefix(llm):
if llm.startswith('api2d-'): llm = llm.replace('api2d-', '')
@@ -80,12 +81,12 @@ def 多智能体终端(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_
persistent_key = f"{user_uuid}->多智能体终端"
if persistent_class_multi_user_manager.already_alive(persistent_key):
# 当已经存在一个正在运行的多智能体终端时,直接将用户输入传递给它,而不是再次启动一个新的多智能体终端
- print('[debug] feed new user input')
+ logger.info('[debug] feed new user input')
executor = persistent_class_multi_user_manager.get(persistent_key)
exit_reason = yield from executor.main_process_ui_control(txt, create_or_resume="resume")
else:
# 运行多智能体终端 (首次)
- print('[debug] create new executor instance')
+ logger.info('[debug] create new executor instance')
history = []
chatbot.append(["正在启动: 多智能体终端", "插件动态生成, 执行开始, 作者 Microsoft & Binary-Husky."])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
diff --git a/crazy_functions/总结word文档.py b/crazy_functions/总结word文档.py
index c27c952f..99f0919b 100644
--- a/crazy_functions/总结word文档.py
+++ b/crazy_functions/总结word文档.py
@@ -1,7 +1,7 @@
from toolbox import update_ui
from toolbox import CatchException, report_exception
from toolbox import write_history_to_file, promote_file_to_downloadzone
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
fast_debug = False
diff --git a/crazy_functions/总结音视频.py b/crazy_functions/总结音视频.py
index b27bcce0..6adaca1a 100644
--- a/crazy_functions/总结音视频.py
+++ b/crazy_functions/总结音视频.py
@@ -1,5 +1,5 @@
from toolbox import CatchException, report_exception, select_api_key, update_ui, get_conf
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from toolbox import write_history_to_file, promote_file_to_downloadzone, get_log_folder
def split_audio_file(filename, split_duration=1000):
diff --git a/crazy_functions/批量总结PDF文档.py b/crazy_functions/批量总结PDF文档.py
index 4bd772fe..a23750df 100644
--- a/crazy_functions/批量总结PDF文档.py
+++ b/crazy_functions/批量总结PDF文档.py
@@ -1,16 +1,18 @@
+from loguru import logger
+
from toolbox import update_ui, promote_file_to_downloadzone, gen_time_str
from toolbox import CatchException, report_exception
from toolbox import write_history_to_file, promote_file_to_downloadzone
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-from .crazy_utils import read_and_clean_pdf_text
-from .crazy_utils import input_clipping
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import read_and_clean_pdf_text
+from crazy_functions.crazy_utils import input_clipping
def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
file_write_buffer = []
for file_name in file_manifest:
- print('begin analysis on:', file_name)
+ logger.info('begin analysis on:', file_name)
############################## <第 0 步,切割PDF> ##################################
# 递归地切割PDF文件,每一块(尽量是完整的一个section,比如introduction,experiment等,必要时再进行切割)
# 的长度必须小于 2500 个 Token
@@ -38,7 +40,7 @@ def 解析PDF(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot,
last_iteration_result = paper_meta # 初始值是摘要
MAX_WORD_TOTAL = 4096 * 0.7
n_fragment = len(paper_fragments)
- if n_fragment >= 20: print('文章极长,不能达到预期效果')
+ if n_fragment >= 20: logger.warning('文章极长,不能达到预期效果')
for i in range(n_fragment):
NUM_OF_WORD = MAX_WORD_TOTAL // n_fragment
i_say = f"Read this section, recapitulate the content of this section with less than {NUM_OF_WORD} Chinese characters: {paper_fragments[i]}"
diff --git a/crazy_functions/批量总结PDF文档pdfminer.py b/crazy_functions/批量总结PDF文档pdfminer.py
index b5abc71d..0afc9968 100644
--- a/crazy_functions/批量总结PDF文档pdfminer.py
+++ b/crazy_functions/批量总结PDF文档pdfminer.py
@@ -1,6 +1,7 @@
+from loguru import logger
from toolbox import update_ui
from toolbox import CatchException, report_exception
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from toolbox import write_history_to_file, promote_file_to_downloadzone
fast_debug = False
@@ -57,7 +58,6 @@ def readPdf(pdfPath):
layout = device.get_result()
for obj in layout._objs:
if isinstance(obj, pdfminer.layout.LTTextBoxHorizontal):
- # print(obj.get_text())
outTextList.append(obj.get_text())
return outTextList
@@ -66,7 +66,7 @@ def readPdf(pdfPath):
def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
import time, glob, os
from bs4 import BeautifulSoup
- print('begin analysis on:', file_manifest)
+ logger.info('begin analysis on:', file_manifest)
for index, fp in enumerate(file_manifest):
if ".tex" in fp:
with open(fp, 'r', encoding='utf-8', errors='replace') as f:
diff --git a/crazy_functions/批量翻译PDF文档_NOUGAT.py b/crazy_functions/批量翻译PDF文档_NOUGAT.py
index a124150f..130dde8f 100644
--- a/crazy_functions/批量翻译PDF文档_NOUGAT.py
+++ b/crazy_functions/批量翻译PDF文档_NOUGAT.py
@@ -1,9 +1,9 @@
from toolbox import CatchException, report_exception, get_log_folder, gen_time_str
from toolbox import update_ui, promote_file_to_downloadzone, update_ui_lastest_msg, disable_auto_promotion
from toolbox import write_history_to_file, promote_file_to_downloadzone
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
-from .crazy_utils import read_and_clean_pdf_text
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+from crazy_functions.crazy_utils import read_and_clean_pdf_text
from .pdf_fns.parse_pdf import parse_pdf, get_avail_grobid_url, translate_pdf
from shared_utils.colorful import *
import copy
@@ -60,7 +60,7 @@ def 批量翻译PDF文档(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
# 清空历史,以免输入溢出
history = []
- from .crazy_utils import get_files_from_everything
+ from crazy_functions.crazy_utils import get_files_from_everything
success, file_manifest, project_folder = get_files_from_everything(txt, type='.pdf')
if len(file_manifest) > 0:
# 尝试导入依赖,如果缺少依赖,则给出安装建议
diff --git a/crazy_functions/数学动画生成manim.py b/crazy_functions/数学动画生成manim.py
index 551a8081..4a074e43 100644
--- a/crazy_functions/数学动画生成manim.py
+++ b/crazy_functions/数学动画生成manim.py
@@ -1,4 +1,5 @@
import os
+from loguru import logger
from toolbox import CatchException, update_ui, gen_time_str, promote_file_to_downloadzone
from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from crazy_functions.crazy_utils import input_clipping
@@ -34,10 +35,10 @@ def eval_manim(code):
return f'gpt_log/{time_str}.mp4'
except subprocess.CalledProcessError as e:
output = e.output.decode()
- print(f"Command returned non-zero exit status {e.returncode}: {output}.")
+ logger.error(f"Command returned non-zero exit status {e.returncode}: {output}.")
return f"Evaluating python script failed: {e.output}."
except:
- print('generating mp4 failed')
+ logger.error('generating mp4 failed')
return "Generating mp4 failed."
diff --git a/crazy_functions/理解PDF文档内容.py b/crazy_functions/理解PDF文档内容.py
index fd935ab7..23e3ce4f 100644
--- a/crazy_functions/理解PDF文档内容.py
+++ b/crazy_functions/理解PDF文档内容.py
@@ -1,13 +1,12 @@
+from loguru import logger
from toolbox import update_ui
from toolbox import CatchException, report_exception
-from .crazy_utils import read_and_clean_pdf_text
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-fast_debug = False
+from crazy_functions.crazy_utils import read_and_clean_pdf_text
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
def 解析PDF(file_name, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
- import tiktoken
- print('begin analysis on:', file_name)
+ logger.info('begin analysis on:', file_name)
############################## <第 0 步,切割PDF> ##################################
# 递归地切割PDF文件,每一块(尽量是完整的一个section,比如introduction,experiment等,必要时再进行切割)
@@ -36,7 +35,7 @@ def 解析PDF(file_name, llm_kwargs, plugin_kwargs, chatbot, history, system_pro
last_iteration_result = paper_meta # 初始值是摘要
MAX_WORD_TOTAL = 4096
n_fragment = len(paper_fragments)
- if n_fragment >= 20: print('文章极长,不能达到预期效果')
+ if n_fragment >= 20: logger.warning('文章极长,不能达到预期效果')
for i in range(n_fragment):
NUM_OF_WORD = MAX_WORD_TOTAL // n_fragment
i_say = f"Read this section, recapitulate the content of this section with less than {NUM_OF_WORD} words: {paper_fragments[i]}"
@@ -57,7 +56,7 @@ def 解析PDF(file_name, llm_kwargs, plugin_kwargs, chatbot, history, system_pro
chatbot.append([i_say_show_user, gpt_say])
############################## <第 4 步,设置一个token上限,防止回答时Token溢出> ##################################
- from .crazy_utils import input_clipping
+ from crazy_functions.crazy_utils import input_clipping
_, final_results = input_clipping("", final_results, max_token_limit=3200)
yield from update_ui(chatbot=chatbot, history=final_results) # 注意这里的历史记录被替代了
diff --git a/crazy_functions/生成函数注释.py b/crazy_functions/生成函数注释.py
index b563ba66..64a3176c 100644
--- a/crazy_functions/生成函数注释.py
+++ b/crazy_functions/生成函数注释.py
@@ -1,12 +1,12 @@
+from loguru import logger
from toolbox import update_ui
from toolbox import CatchException, report_exception
from toolbox import write_history_to_file, promote_file_to_downloadzone
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
-fast_debug = False
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
def 生成函数注释(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
import time, os
- print('begin analysis on:', file_manifest)
+ logger.info('begin analysis on:', file_manifest)
for index, fp in enumerate(file_manifest):
with open(fp, 'r', encoding='utf-8', errors='replace') as f:
file_content = f.read()
@@ -16,22 +16,20 @@ def 生成函数注释(file_manifest, project_folder, llm_kwargs, plugin_kwargs,
chatbot.append((i_say_show_user, "[Local Message] waiting gpt response."))
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
- if not fast_debug:
- msg = '正常'
- # ** gpt request **
- gpt_say = yield from request_gpt_model_in_new_thread_with_ui_alive(
- i_say, i_say_show_user, llm_kwargs, chatbot, history=[], sys_prompt=system_prompt) # 带超时倒计时
+ msg = '正常'
+ # ** gpt request **
+ gpt_say = yield from request_gpt_model_in_new_thread_with_ui_alive(
+ i_say, i_say_show_user, llm_kwargs, chatbot, history=[], sys_prompt=system_prompt) # 带超时倒计时
- chatbot[-1] = (i_say_show_user, gpt_say)
- history.append(i_say_show_user); history.append(gpt_say)
- yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
- if not fast_debug: time.sleep(2)
-
- if not fast_debug:
- res = write_history_to_file(history)
- promote_file_to_downloadzone(res, chatbot=chatbot)
- chatbot.append(("完成了吗?", res))
+ chatbot[-1] = (i_say_show_user, gpt_say)
+ history.append(i_say_show_user); history.append(gpt_say)
yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
+ time.sleep(2)
+
+ res = write_history_to_file(history)
+ promote_file_to_downloadzone(res, chatbot=chatbot)
+ chatbot.append(("完成了吗?", res))
+ yield from update_ui(chatbot=chatbot, history=history, msg=msg) # 刷新界面
diff --git a/crazy_functions/生成多种Mermaid图表.py b/crazy_functions/生成多种Mermaid图表.py
index 677ddf8f..fff7f5d8 100644
--- a/crazy_functions/生成多种Mermaid图表.py
+++ b/crazy_functions/生成多种Mermaid图表.py
@@ -1,5 +1,5 @@
from toolbox import CatchException, update_ui, report_exception
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from crazy_functions.plugin_template.plugin_class_template import (
GptAcademicPluginTemplate,
)
@@ -201,8 +201,7 @@ def 解析历史输入(history, llm_kwargs, file_manifest, chatbot, plugin_kwarg
MAX_WORD_TOTAL = 4096
n_txt = len(txt)
last_iteration_result = "从以下文本中提取摘要。"
- if n_txt >= 20:
- print("文章极长,不能达到预期效果")
+
for i in range(n_txt):
NUM_OF_WORD = MAX_WORD_TOTAL // n_txt
i_say = f"Read this section, recapitulate the content of this section with less than {NUM_OF_WORD} words in Chinese: {txt[i]}"
diff --git a/crazy_functions/知识库问答.py b/crazy_functions/知识库问答.py
index 943eeeff..f902ed09 100644
--- a/crazy_functions/知识库问答.py
+++ b/crazy_functions/知识库问答.py
@@ -1,6 +1,6 @@
from toolbox import CatchException, update_ui, ProxyNetworkActivate, update_ui_lastest_msg, get_log_folder, get_user
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_files_from_everything
-
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, get_files_from_everything
+from loguru import logger
install_msg ="""
1. python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
@@ -40,7 +40,7 @@ def 知识库文件注入(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
except Exception as e:
chatbot.append(["依赖不足", f"{str(e)}\n\n导入依赖失败。请用以下命令安装" + install_msg])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
- # from .crazy_utils import try_install_deps
+ # from crazy_functions.crazy_utils import try_install_deps
# try_install_deps(['zh_langchain==0.2.1', 'pypinyin'], reload_m=['pypinyin', 'zh_langchain'])
# yield from update_ui_lastest_msg("安装完成,您可以再次重试。", chatbot, history)
return
@@ -60,7 +60,7 @@ def 知识库文件注入(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
# < -------------------预热文本向量化模组--------------- >
chatbot.append(['
'.join(file_manifest), "正在预热文本向量化模组, 如果是第一次运行, 将消耗较长时间下载中文向量化模型..."])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
- print('Checking Text2vec ...')
+ logger.info('Checking Text2vec ...')
from langchain.embeddings.huggingface import HuggingFaceEmbeddings
with ProxyNetworkActivate('Download_LLM'): # 临时地激活代理网络
HuggingFaceEmbeddings(model_name="GanymedeNil/text2vec-large-chinese")
@@ -68,7 +68,7 @@ def 知识库文件注入(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
# < -------------------构建知识库--------------- >
chatbot.append(['
'.join(file_manifest), "正在构建知识库..."])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
- print('Establishing knowledge archive ...')
+ logger.info('Establishing knowledge archive ...')
with ProxyNetworkActivate('Download_LLM'): # 临时地激活代理网络
kai = knowledge_archive_interface()
vs_path = get_log_folder(user=get_user(chatbot), plugin_name='vec_store')
@@ -93,7 +93,7 @@ def 读取知识库作答(txt, llm_kwargs, plugin_kwargs, chatbot, history, syst
except Exception as e:
chatbot.append(["依赖不足", f"{str(e)}\n\n导入依赖失败。请用以下命令安装" + install_msg])
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面
- # from .crazy_utils import try_install_deps
+ # from crazy_functions.crazy_utils import try_install_deps
# try_install_deps(['zh_langchain==0.2.1', 'pypinyin'], reload_m=['pypinyin', 'zh_langchain'])
# yield from update_ui_lastest_msg("安装完成,您可以再次重试。", chatbot, history)
return
diff --git a/crazy_functions/联网的ChatGPT.py b/crazy_functions/联网的ChatGPT.py
index c121e54c..20402eed 100644
--- a/crazy_functions/联网的ChatGPT.py
+++ b/crazy_functions/联网的ChatGPT.py
@@ -1,5 +1,5 @@
from toolbox import CatchException, update_ui
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, input_clipping
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, input_clipping
import requests
from bs4 import BeautifulSoup
from request_llms.bridge_all import model_info
@@ -23,8 +23,8 @@ def google(query, proxies):
item = {'title': title, 'link': link}
results.append(item)
- for r in results:
- print(r['link'])
+ # for r in results:
+ # print(r['link'])
return results
def scrape_text(url, proxies) -> str:
diff --git a/crazy_functions/联网的ChatGPT_bing版.py b/crazy_functions/联网的ChatGPT_bing版.py
index eff6f8f9..d748ceab 100644
--- a/crazy_functions/联网的ChatGPT_bing版.py
+++ b/crazy_functions/联网的ChatGPT_bing版.py
@@ -1,5 +1,5 @@
from toolbox import CatchException, update_ui
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, input_clipping
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive, input_clipping
import requests
from bs4 import BeautifulSoup
from request_llms.bridge_all import model_info
@@ -22,8 +22,8 @@ def bing_search(query, proxies=None):
item = {'title': title, 'link': link}
results.append(item)
- for r in results:
- print(r['link'])
+ # for r in results:
+ # print(r['link'])
return results
diff --git a/crazy_functions/解析JupyterNotebook.py b/crazy_functions/解析JupyterNotebook.py
index 2f2c0883..e7186aa9 100644
--- a/crazy_functions/解析JupyterNotebook.py
+++ b/crazy_functions/解析JupyterNotebook.py
@@ -64,7 +64,7 @@ def parseNotebook(filename, enable_markdown=1):
def ipynb解释(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
- from .crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
+ from crazy_functions.crazy_utils import request_gpt_model_multi_threads_with_very_awesome_ui_and_high_efficiency
if ("advanced_arg" in plugin_kwargs) and (plugin_kwargs["advanced_arg"] == ""): plugin_kwargs.pop("advanced_arg")
enable_markdown = plugin_kwargs.get("advanced_arg", "1")
diff --git a/crazy_functions/询问多个大语言模型.py b/crazy_functions/询问多个大语言模型.py
index a608b7b0..82619cd9 100644
--- a/crazy_functions/询问多个大语言模型.py
+++ b/crazy_functions/询问多个大语言模型.py
@@ -1,5 +1,5 @@
from toolbox import CatchException, update_ui, get_conf
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
import datetime
@CatchException
def 同时问询(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request):
diff --git a/crazy_functions/语音助手.py b/crazy_functions/语音助手.py
index 1e85b361..8aeeeda4 100644
--- a/crazy_functions/语音助手.py
+++ b/crazy_functions/语音助手.py
@@ -1,11 +1,13 @@
from toolbox import update_ui
from toolbox import CatchException, get_conf, markdown_convertion
+from request_llms.bridge_all import predict_no_ui_long_connection
from crazy_functions.crazy_utils import input_clipping
from crazy_functions.agent_fns.watchdog import WatchDog
-from request_llms.bridge_all import predict_no_ui_long_connection
+from crazy_functions.live_audio.aliyunASR import AliyunASR
+from loguru import logger
+
import threading, time
import numpy as np
-from .live_audio.aliyunASR import AliyunASR
import json
import re
@@ -42,9 +44,9 @@ class AsyncGptTask():
gpt_say_partial = predict_no_ui_long_connection(inputs=i_say, llm_kwargs=llm_kwargs, history=history, sys_prompt=sys_prompt,
observe_window=observe_window[index], console_slience=True)
except ConnectionAbortedError as token_exceed_err:
- print('至少一个线程任务Token溢出而失败', e)
+ logger.error('至少一个线程任务Token溢出而失败', e)
except Exception as e:
- print('至少一个线程任务意外失败', e)
+ logger.error('至少一个线程任务意外失败', e)
def add_async_gpt_task(self, i_say, chatbot_index, llm_kwargs, history, system_prompt):
self.observe_future.append([""])
diff --git a/crazy_functions/读文章写摘要.py b/crazy_functions/读文章写摘要.py
index 95adda09..1bb0d325 100644
--- a/crazy_functions/读文章写摘要.py
+++ b/crazy_functions/读文章写摘要.py
@@ -1,12 +1,11 @@
from toolbox import update_ui
from toolbox import CatchException, report_exception
from toolbox import write_history_to_file, promote_file_to_downloadzone
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
def 解析Paper(file_manifest, project_folder, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt):
import time, glob, os
- print('begin analysis on:', file_manifest)
for index, fp in enumerate(file_manifest):
with open(fp, 'r', encoding='utf-8', errors='replace') as f:
file_content = f.read()
diff --git a/crazy_functions/谷歌检索小助手.py b/crazy_functions/谷歌检索小助手.py
index 27873518..0cb0bbb0 100644
--- a/crazy_functions/谷歌检索小助手.py
+++ b/crazy_functions/谷歌检索小助手.py
@@ -1,4 +1,4 @@
-from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
+from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from toolbox import CatchException, report_exception, promote_file_to_downloadzone
from toolbox import update_ui, update_ui_lastest_msg, disable_auto_promotion, write_history_to_file
import logging
diff --git a/docs/WithFastapi.md b/docs/WithFastapi.md
index 27037507..d963ddd5 100644
--- a/docs/WithFastapi.md
+++ b/docs/WithFastapi.md
@@ -4,7 +4,7 @@ We currently support fastapi in order to solve sub-path deploy issue.
1. change CUSTOM_PATH setting in `config.py`
-``` sh
+```sh
nano config.py
```
@@ -35,9 +35,8 @@ if __name__ == "__main__":
main()
```
-
3. Go!
-``` sh
+```sh
python main.py
```
diff --git a/docs/translate_english.json b/docs/translate_english.json
index db517714..02735a21 100644
--- a/docs/translate_english.json
+++ b/docs/translate_english.json
@@ -4205,5 +4205,1299 @@
"怎么下载": "How to download",
"请稍后": "Please wait",
"会尝试结合历史记录进行搜索优化": "Will try to optimize the search by combining historical records",
- "max_token_limit 最大token限制": "max_token_limit maximum token limit"
+ "max_token_limit 最大token限制": "max_token_limit maximum token limit",
+ "所有这些顾虑": "All these concerns",
+ "宽倒披针状线形或近倒卵形;花序圆锥状或近伞房状": "Broadly lanceolate or nearly oval; inflorescence conical or nearly umbellate",
+ "使工人的整个生活地位越来越没有保障;单个工人和单个资产者之间的冲突越来越具有两个阶级的冲突的性质": "The entire living status of workers is becoming increasingly insecure; the conflict between individual workers and individual capitalists increasingly has the nature of a conflict between two classes",
+ "而且": "Moreover",
+ "资产阶级无意中造成而又无力抵抗的工业进步": "The industrial progress that the bourgeoisie inadvertently causes and is powerless to resist",
+ "力图使工人阶级厌弃一切革命运动": "Striving to make the working class disdain all revolutionary movements",
+ "它第一个证明了": "It was the first to prove",
+ "只不过是僧侣用来使贵族的怨愤神圣的圣水罢了": "It was merely the holy water used by monks to sanctify the grievances of the nobility",
+ "他们再一次被可恨的暴发户打败了": "They were once again defeated by the detestable upstarts",
+ "你们责备我们": "You blame us",
+ "解析多个联系人的身份信息": "Analyze the identity information of multiple contacts",
+ "I人助手": "I assistant",
+ "就直接反对共产主义的“野蛮破坏的”倾向": "Directly opposing the 'savage destruction' tendency of communism",
+ "然后是某一工厂的工人": "Then there are the workers of a certain factory",
+ "无产者只有废除自己的现存的占有方式": "The proletariat can only abolish their existing mode of possession",
+ "德国的社会主义是这种批判的可怜的回声": "German socialism is a pathetic echo of this critique",
+ "我的朋友": "My friend",
+ "诅咒代议制国家": "Cursing representative states",
+ "对于中世纪被奴役的市民来说": "For the enslaved citizens of the Middle Ages",
+ "好一个劳动得来的、自己挣得的、自己赚来的财产!你们说的是资产阶级财产出现以前的那种小资产阶级、小农的财产吗": "What a property earned through labor, earned by oneself! Are you referring to the kind of petty-bourgeois and small peasant property that existed before the emergence of bourgeois property?",
+ "他们就不是维护他们目前的利益": "They are not defending their current interests",
+ "新的工业的建立已经成为一切文明民族的生命攸关的问题;这些工业所加工的": "The establishment of new industries has become a matter of vital importance for all civilized nations; these industries process",
+ "由于交通的极其便利": "Due to the extreme convenience of transportation",
+ "资产阶级社会早就应该因懒惰而灭亡了": "Bourgeois society should have long since perished due to laziness",
+ "精神的生产也是如此": "The production of spirit is the same",
+ "民族之间的敌对关系就会随之消失": "The antagonistic relations between nations will then disappear",
+ "他们以为": "They thought",
+ "一切固定的僵化的关系以及与之相适应的素被尊崇的观念和见解都被消除了": "All fixed, rigid relationships and the corresponding revered concepts and views have been eliminated",
+ "谈到古代所有制的时候你们所能理解的": "What you can understand when discussing ancient property",
+ "共产党人到处都支持一切反对现存的社会制度和政治制度的革命运动": "Communists everywhere support all revolutionary movements against the existing social and political systems",
+ "把社会主义的要求同政治运动对立起来": "Opposing the demands of socialism to political movements",
+ "无论在英国或法国": "Whether in England or France",
+ "都联合起来了": "All have united",
+ "资产阶级赖以形成的生产资料和交换手段": "The means of production and exchange upon which the bourgeoisie is formed",
+ "一切活动就会停止": "All activities will come to a halt",
+ "较耐寒": "More cold-resistant",
+ "把信贷集中在国家手里": "Concentrate credit in the hands of the state",
+ "拥有发展得多的无产阶级去实现这个变革": "The proletariat, which has developed much more, will realize this transformation",
+ "正如僧侣总是同封建主携手同行一样": "Just as monks always walk hand in hand with feudal lords",
+ "他们的目的只有用暴力推翻全部现存的社会制度才能达到": "Their goal can only be achieved by violently overthrowing all existing social systems",
+ "因为他们力图使历史的车轮倒转": "Because they strive to turn back the wheels of history",
+ "他们想也没有想到": "They never even thought",
+ "因为我是私生子": "Because I am a bastard",
+ "这些社会主义和共产主义的著作也含有批判的成分": "These works of socialism and communism also contain critical elements",
+ "他在守夜人军团中与我并肩作战": "He fought alongside me in the Night Watch Legion",
+ "凯特琳·史塔克": "Catelyn Stark",
+ "正是要消灭资产者的个性、独立性和自由": "It is precisely to eliminate the individuality, independence, and freedom of the capitalists",
+ "在无产阶级还很不发展、因而对本身的地位的认识还基于幻想的时候": "When the proletariat is still underdeveloped, and thus their understanding of their own position is still based on illusions",
+ "资产阶级生存和统治的根本条件": "The fundamental conditions for the survival and rule of the bourgeoisie",
+ "这样的个性确实应当被消灭": "Such individuality should indeed be eliminated",
+ "萼片呈宽三角形": "The sepals are broad and triangular",
+ "铁路的通行": "The passage of railways",
+ "不言而喻": "It goes without saying",
+ "隐藏在这些偏见后面的全都是资产阶级利益": "All that is hidden behind these prejudices are the interests of the bourgeoisie",
+ "工人有时也得到胜利": "Workers sometimes also achieve victory",
+ "如果不炸毁构成官方社会的整个上层": "If the entire upper layer constituting the official society is not blown up",
+ "诅咒资产阶级的竞争、资产阶级的新闻出版自由、资产阶级的法、资产阶级的自由和平等": "Cursing the competition of the bourgeoisie, the freedom of the bourgeois press, the law of the bourgeoisie, the freedom and equality of the bourgeoisie",
+ "一个幽灵": "A specter",
+ "或者毋宁说": "Or rather",
+ "它越来越感觉到自己的力量": "It increasingly feels its own power",
+ "已清空": "Has been emptied",
+ "是现存制度的真实的社会基础": "Is the real social foundation of the existing system",
+ "他们只是表明了一个事实": "They merely indicate a fact",
+ "用诅咒异端邪说的传统办法诅咒自由主义": "Cursing liberalism in the traditional way of cursing heretical doctrines",
+ "但颜色会稍有不同": "But the colors may be slightly different",
+ "这种在法国人的论述下面塞进自己哲学词句的做法": "This practice of inserting one's philosophical phrases into the discourse of the French",
+ "一、资产者和无产者": "1. The bourgeoisie and the proletariat",
+ "使之变成完全相反的东西": "Transforming it into something completely opposite",
+ "物质的生产是如此": "Material production is such",
+ "私有制一消灭": "The abolition of private property",
+ "从这种关系中产生的公妻制": "The communal wife system arising from this relationship",
+ "基督教不是也激烈反对私有财产": "Isn't Christianity also fiercely opposed to private property?",
+ "甚至使得统治阶级中的一小部分人脱离统治阶级而归附于革命的阶级": "Even causing a small portion of the ruling class to detach from the ruling class and join the revolutionary class",
+ "在德国": "In Germany",
+ "最先进的国家几乎都可以采取下面的措施": "The most advanced countries can almost adopt the following measures",
+ "使生产资料集中起来": "Concentrating the means of production",
+ "并不是共产主义所独具的特征": "Is not a characteristic unique to communism",
+ "他们总是不加区别地向整个社会呼吁": "They always indiscriminately appeal to the entire society",
+ "输入“清空向量数据库”可以清空RAG向量数据库": "Entering 'clear vector database' can clear the RAG vector database",
+ "从而废除全部现存的占有方式": "Thus abolishing all existing forms of possession",
+ "不过是使防止危机的手段越来越少的办法": "Merely a way to reduce the means of preventing crises",
+ "而仅仅是物质生活条件即经济关系的改变": "But merely a change in material living conditions, that is, economic relations",
+ "他们是产业军的普通士兵": "They are the ordinary soldiers of the industrial army",
+ "这种组织总是重新产生": "Such organizations always re-emerge",
+ "小资产者曾经在封建专制制度的束缚下挣扎到资产者的地位": "Petty bourgeoisie once struggled under the constraints of feudal despotism to attain the status of bourgeoisie",
+ "共产党人同全体无产者的关系是怎样的呢": "What is the relationship between communists and all proletarians?",
+ "即工人为维持其工人的生活所必需的生活资料的数额": "That is, the amount of living materials necessary for workers to maintain their livelihood",
+ "由于开拓了世界市场": "Due to the expansion of the world market",
+ "大工业建立了由美洲的发现所准备好的世界市场": "Large-scale industry established a world market prepared by the discoveries of America",
+ "开垦荒地和改良土壤": "Reclaiming wasteland and improving soil",
+ "它要求无产阶级实现它的体系": "It requires the proletariat to realize its system",
+ "我们是要这样做的": "We are going to do this",
+ "美洲的发现、绕过非洲的航行": "The discovery of America, the navigation around Africa",
+ "有人责备我们共产党人": "Some blame us communists",
+ "毫不奇怪": "Not surprising at all",
+ "它发展到最后": "It develops to the end",
+ "从而劳动的价格": "Thus the price of labor",
+ "它必须到处落户": "It must settle everywhere",
+ "共产主义并不剥夺任何人占有社会产品的权力": "Communism does not deprive anyone of the right to own social products",
+ "取消民族": "Abolish nations",
+ "他们在法国的原著下面写上自己的哲学胡说": "They write their philosophical nonsense under the original works in France",
+ "谈到封建所有制的时候你们所能理解的": "What you can understand when talking about feudal ownership",
+ "这种超乎阶级斗争的幻想": "This fantasy beyond class struggle",
+ "还要大": "It must be larger",
+ "使工人的工资越来越不稳定;机器的日益迅速的和继续不断的改良": "Making workers' wages increasingly unstable; the rapid and continuous improvement of machines",
+ "建立在私人发财上面的": "Built on private wealth",
+ "它要废除宗教、道德": "It aims to abolish religion and morality",
+ "在无产者不同的民族的斗争中": "In the struggles of the proletariat of different nations",
+ "是景天科景天属的多肉植物": "It is a succulent plant of the Crassulaceae family",
+ "整个整个大陆的开垦": "The cultivation of the entire continent",
+ "无产者不是同自己的敌人作斗争": "The proletariat does not fight against its own enemies",
+ "现世界多地均有栽培": "Cultivated in many places around the world today",
+ "“真正的”社会主义像瘟疫一样流行起来了": "\"True\" socialism has spread like a plague",
+ "这种社会主义是这些政府用来镇压德国工人起义的毒辣的皮鞭和枪弹的甜蜜的补充": "This socialism is the sweet complement of the vicious whip and bullets used by these governments to suppress the German workers' uprising",
+ "资产阶级挖掉了工业脚下的民族基础": "The bourgeoisie has undermined the national foundation of industry",
+ "工人革命的第一步就是使无产阶级上升为统治阶级": "The first step of the workers' revolution is to elevate the proletariat to the ruling class",
+ "不过表明竞争在信仰领域里占统治地位罢了": "It only indicates that competition dominates the realm of belief",
+ "绝对不是只有通过革命的途径才能实现的资产阶级生产关系的废除": "The abolition of bourgeois production relations is not achievable solely through revolutionary means",
+ "当阶级差别在发展进程中已经消失而全部生产集中在联合起来的个人的手里的时候": "When class differences have disappeared in the process of development and all production is concentrated in the hands of united individuals",
+ "Rag智能召回": "Rag intelligent recall",
+ "4、没收一切流亡分子和叛乱分子的财产": "4. Confiscate all property of exiles and rebels",
+ "雇佣工人靠自己的劳动所占有的东西": "What hired workers possess through their own labor",
+ "机器的采用": "The adoption of machines",
+ "也就是采取这样一些措施": "That is to take such measures",
+ "共产主义的特征并不是要废除一般的所有制": "The characteristic of communism is not to abolish general ownership",
+ "都伴随着相应的政治上的进展": "All accompanied by corresponding political progress",
+ "当厂主对工人的剥削告一段落": "When the exploitation of workers by factory owners comes to an end",
+ "它利用资产阶级内部的分裂": "It exploits the divisions within the bourgeoisie",
+ "狂热地迷信自己那一套社会科学的奇功异效": "Fanatically superstitious about the miraculous effects of their own social sciences",
+ "民族的片面性和局限性日益成为不可能": "The one-sidedness and limitations of nations are increasingly becoming impossible",
+ "贫困比人口和财富增长得还要快": "Poverty is growing faster than population and wealth",
+ "无产阶级反对资产阶级的斗争首先是一国范围内的斗争": "The struggle of the proletariat against the bourgeoisie is primarily a struggle within one country",
+ "向量化完成": "Vectorization completed",
+ "德国的社会主义者给自己的那几条干瘪的“永恒真理”披上一件用思辨的蛛丝织成的、绣满华丽辞藻的花朵和浸透甜情蜜意的甘露的外衣": "German socialists drape their few dry 'eternal truths' in a garment woven from the threads of speculative thought, adorned with flowery language and soaked in sweet sentiment",
+ "花朵玲珑小巧": "The flowers are exquisite and delicate",
+ "共产党人支持激进派": "Communists support the radicals",
+ "可盆栽放置于电视、电脑旁": "Can be potted and placed next to the TV or computer",
+ "或者是企图重新把现代的生产资料和交换手段硬塞到已被它们突破而且必然被突破的旧的所有制关系的框子里去": "Or attempting to forcibly shove modern means of production and exchange back into the outdated ownership relations that have already been transcended and will inevitably be transcended",
+ "从而对生产关系": "Thus affecting the production relations",
+ "他们控告资产阶级的主要罪状正是在于": "Their main accusation against the bourgeoisie is that",
+ "把自身组织成为民族": "They organize themselves into a nation",
+ "以便在推翻德国的反动阶级之后立即开始反对资产阶级本身的斗争": "So as to immediately begin the struggle against the bourgeoisie itself after overthrowing the reactionary class in Germany",
+ "甚至工场手工业也不再能满足需要了": "Even handicrafts in factories can no longer meet the needs",
+ "而代表真理的要求": "And the demands that represent the truth",
+ "经不起较大的资本家的竞争;有的是因为他们的手艺已经被新的生产方法弄得不值钱了": "Cannot withstand competition from larger capitalists; some of their skills have become worthless due to new production methods",
+ "故而得名“石莲”": "Hence the name 'stone lotus'",
+ "不管这个问题的发展程度怎样": "Regardless of the level of development of this issue",
+ "他们公开宣布": "They openly declare",
+ "一部分法国正统派和“青年英国”": "A part of the French orthodox and 'Young England'",
+ "不能理解该联系人": "Cannot understand the contact person",
+ "法国革命废除了封建的所有制": "The French Revolution abolished feudal ownership",
+ "是无产阶级获得解放的首要条件之一": "Is one of the primary conditions for the liberation of the proletariat",
+ "买卖一消失": "Trade disappears",
+ "汇合成阶级斗争": "Converges into class struggle",
+ "争得民主": "Strive for democracy",
+ "半是谤文": "Half slanderous writing",
+ "生长适温为15-25℃": "Optimal growth temperature is 15-25°C",
+ "小资产阶级的社会主义": "Petty-bourgeois socialism",
+ "使农民的民族从属于资产阶级的民族": "Makes the farmers' nation subordinate to the bourgeois nation",
+ "任何一个时代的统治思想始终都不过是统治阶级的思想": "The ruling ideology of any era is always merely the ideology of the ruling class",
+ "我们用社会教育代替家庭教育": "We replace family education with social education",
+ "关于自由买卖的言论": "Statements about free trade",
+ "无产阶级将利用自己的政治统治": "The proletariat will utilize its political power",
+ "自由买卖": "Free trade",
+ "现今社会的最下层": "The lowest strata of today's society",
+ "他们并不是随着工业的进步而上升": "They do not rise with the progress of industry",
+ "才能取得社会生产力": "In order to achieve social productivity",
+ "忌寒冷和过分潮湿": "Avoid cold and excessive humidity",
+ "法国和英国的贵族": "The nobility of France and England",
+ "资产阶级日甚一日地消灭生产资料、财产和人口的分散状态": "The bourgeoisie increasingly eliminates the scattered state of means of production, property, and population",
+ "基生叶莲座状": "Basal leaf rosette",
+ "个联系人": "Individual contacts",
+ "无产阶级": "Proletariat",
+ "它把人的尊严变成了交换价值": "It transforms human dignity into exchange value",
+ "要求他做的只是极其简单、极其单调和极容易学会的操作": "What is required of him is only extremely simple, monotonous, and easy-to-learn operations",
+ "劳动量出就越增加": "The more labor is produced, the greater the increase",
+ "而且作为变革全部生产方式的手段是必不可少的": "And it is indispensable as a means of transforming all modes of production",
+ "所以它本身还是民族的": "So it is still national in itself",
+ "都使无产者失去了任何民族性": "All make the proletariat lose any sense of nationality",
+ "就是保存德国的现存制度": "It is to preserve the existing system of Germany",
+ "他们的剥削方式和资产阶级的剥削不同": "Their mode of exploitation is different from that of the bourgeoisie",
+ "各自独立的、几乎只有同盟关系的、各有不同利益、不同法律、不同政府、不同关税的各个地区": "Each region is independent, almost only having an alliance relationship, with different interests, laws, governments, and tariffs",
+ "越来越严重了": "It is becoming increasingly serious",
+ "总是使整个社会服从于它们发财致富的条件": "Always makes the entire society subordinate to the conditions for their wealth",
+ "都发现他们的臀部带有旧的封建纹章": "All find that their backs bear the old feudal emblem",
+ "即德国小市民的利益": "That is, the interests of the German petty bourgeoisie",
+ "它们被新的工业排挤掉了": "They have been pushed out by new industries",
+ "工资也就越少": "Wages also become less",
+ "资产阶级都不得不向无产阶级呼吁": "The bourgeoisie has to appeal to the proletariat",
+ "他们也意识到": "They also realize",
+ "又有哪一个反对党不拿共产主义这个罪名去回敬更进步的反对党人和自己的反动敌人呢": "Which opposition party does not use the label of communism to counter more progressive opponents and their own reactionary enemies?",
+ "手工业者和农民——所有这些阶级都降落到无产阶级的队伍里来了": "Artisans and peasants—all these classes have descended into the ranks of the proletariat",
+ "我的弟弟": "My brother",
+ "而这种阶级对立在当时刚刚开始发展": "And this class opposition was just beginning to develop at that time",
+ "在现今的资产阶级生产关系的范围内": "Within the scope of today's bourgeois production relations",
+ "去干反动的勾当": "To engage in reactionary activities",
+ "植株多分枝": "Plants have multiple branches",
+ "它在现代的代议制国家里夺得了独占的政治统治": "It has gained exclusive political dominance in modern representative states",
+ "我们的资产者装得道貌岸然": "Our capitalists pretend to be virtuous",
+ "同直接剥削他们的单个资产者作斗争": "To struggle against individual capitalists who directly exploit them",
+ "没有的事": "Something that does not exist",
+ "蒸汽和机器引起了工业生产的革命": "Steam and machines have caused a revolution in industrial production",
+ "不也是由社会通过学校等等进行的直接的或间接的干涉决定的吗": "Isn't it also determined by direct or indirect interference from society through schools and so on?",
+ "资产阶级的所有制关系": "The ownership relations of the bourgeoisie",
+ "最初是单个的工人": "Initially, it was individual workers",
+ "工人是分散在全国各地并为竞争所分裂的群众": "Workers are scattered across the country and divided by competition",
+ "他们逐渐地堕落到上述反动的或保守的社会主义者的一伙中去了": "They gradually fell into the aforementioned reactionary or conservative socialists' group",
+ "每当人民跟着他们走的时候": "Whenever the people follow them",
+ "旧社会的生活条件已经被消灭了": "The living conditions of the old society have been eliminated",
+ "我的哥哥": "My brother",
+ "你们说": "You say",
+ "都是为了维护他们这种中间等级的生存": "All to maintain the existence of their intermediate class",
+ "法国的社会主义和共产主义的文献是在居于统治地位的资产阶级的压迫下产生的": "The literature of socialism and communism in France arose under the oppression of the ruling bourgeoisie",
+ "而是一些在这种生产关系的基础上实行的行政上的改良": "But rather some administrative reforms implemented on the basis of these production relations",
+ "“但是”": "\"But\"",
+ "资产阶级在历史上曾经起过非常革命的作用": "The bourgeoisie has played a very revolutionary role in history",
+ "你们是责备我们要消灭父母对子女的剥削吗": "Are you blaming us for wanting to eliminate parental exploitation of children?",
+ "批判的空想的社会主义和共产主义的意义": "The significance of critical utopian socialism and communism",
+ "但是共产主义要废除永恒真理": "But communism aims to abolish eternal truths",
+ "随着人们的生活条件、人们的社会关系、人们的社会存在的改变而改变": "Change with the changes in people's living conditions, social relations, and social existence",
+ "他们获得的将是整个世界": "What they gain will be the whole world",
+ "它所统治的世界自然是最美好的世界": "The world it dominates is naturally the best world",
+ "它摇摆于无产阶级和资产阶级之间": "It swings between the proletariat and the bourgeoisie",
+ "就使资产阶级所有制的存在受到威胁": "It threatens the existence of bourgeois ownership",
+ "自然就不能不想到妇女也会遭到同样的命运": "Naturally, one cannot help but think that women will also suffer the same fate",
+ "特别是在农业方面": "Especially in agriculture",
+ "那是鉴于他们行将转入无产阶级的队伍": "That is in view of their impending transition into the ranks of the proletariat",
+ "你们所理解的个性": "The individuality you understand",
+ "你们的利己观念使你们把自己的生产关系和所有制关系从历史的、在生产过程中是暂时的关系变成永恒的自然规律和理性规律": "Your egoistic views lead you to transform your production and ownership relations, which are historically and temporarily contingent in the production process, into eternal natural laws and rational laws",
+ "过去那种地方的和民族的自给自足和闭关自守状态": "The past state of local and national self-sufficiency and isolationism",
+ "这些形式": "These forms",
+ "为了拉拢人民": "In order to win over the people",
+ "并且每天都还在被消灭": "And are being eliminated every day",
+ "即同专制君主制的残余、地主、非工业资产者和小资产者作斗争": "That is, fighting against the remnants of autocratic monarchy, landlords, non-industrial capitalists, and petty bourgeoisie",
+ "共产党人为工人阶级的最近的目的和利益而斗争": "Communists fight for the immediate aims and interests of the working class",
+ "共产党人不是同其他工人政党相对立的特殊政党": "Communists are not a special party opposed to other workers' parties",
+ "正像它使农村从属于城市一样": "Just as it subordinates the countryside to the city",
+ "与原变种的不同处为叶上部有渐尖的锯齿": "The difference from the original variant is that the upper part of the leaf has gradually pointed serrations",
+ "在商业、工业和农业中很快就会被监工和雇员所代替": "In commerce, industry, and agriculture, it will soon be replaced by foremen and employees",
+ "社会的活动要由他们个人的发明活动来代替": "Social activities should be replaced by their individual inventive activities",
+ "封建的社会主义": "Feudal socialism",
+ "要消灭构成个人的一切自由、活动和独立的基础的财产": "To abolish the property that constitutes the basis of all individual freedom, activity, and independence",
+ "在你们的现存社会里": "In your existing society",
+ "使社会失去了全部生活资料;仿佛是工业和商业全被毁灭了": "Has caused society to lose all means of subsistence; as if industry and commerce have been completely destroyed",
+ "随着这些早期的无产阶级运动而出现的革命文献": "Revolutionary literature that emerged alongside these early proletarian movements",
+ "的二年生草本植物": "Biennial herbaceous plants",
+ "在资产阶级社会里是过去支配现在": "In bourgeois society, the past dominates the present",
+ "随着资产阶级即资本的发展": "With the development of the bourgeoisie, that is, capital",
+ "不断扩大产品销路的需要": "The need to continuously expand the market for products",
+ "是从小资产阶级的立场出发替工人说话的": "Speaks for the workers from the standpoint of the petty bourgeoisie",
+ "而且是大君主国的主要基础;最后": "And is the main foundation of the great monarchies; finally",
+ "决不是以这个或那个世界改革家所发明或发现的思想、原则为根据的": "It is certainly not based on the ideas or principles invented or discovered by this or that reformer of the world",
+ "都属于这一类卑鄙龌龊的、令人委靡的文献": "All belong to this kind of despicable, sordid, and demoralizing literature",
+ "这里所改变的只是财产的社会性质": "What changes here is only the social nature of property",
+ "于是由许多种民族的和地方的文学形成了一种世界的文学": "Thus, a world literature is formed from the literatures of many nations and localities",
+ "工人的大规模集结": "The large-scale mobilization of workers",
+ "无产者的劳动已经失去了任何独立的性质": "The labor of the proletariat has lost any independent nature.",
+ "这些原理不过是现存的阶级斗争、我们眼前的历史运动的真实关系的一般表述": "These principles are merely a general expression of the real relationships of the existing class struggle and the historical movement before us.",
+ "资产阶级也在同一程度上得到发展": "The bourgeoisie has developed to the same extent.",
+ "但是并不忽略这个政党是由互相矛盾的分子组成的": "However, it should not be overlooked that this party is composed of contradictory elements.",
+ "在通风透气、排水良好的土壤上生长良好": "It grows well in well-ventilated, well-drained soil.",
+ "它只是用新的阶级、新的压迫条件、新的斗争形式代替了旧的": "It merely replaces the old with new classes, new conditions of oppression, and new forms of struggle.",
+ "而是资产阶级联合的结果": "But rather the result of the unity of the bourgeoisie.",
+ "社会再不能在它统治下生存下去了": "Society can no longer survive under its rule.",
+ "他们就离开自己原来的立场": "They leave their original positions.",
+ "有傅立叶主义者反对改革派": "There are Fourierists opposing the reformists.",
+ "例如消灭城乡对立": "For example, the elimination of the urban-rural divide.",
+ "而活动着的个人却没有独立性和个性": "But the active individuals lack independence and personality.",
+ "河川的通航": "The navigation of rivers.",
+ "这不过是资产阶级准备更全面更猛烈的危机的办法": "This is merely a way for the bourgeoisie to prepare for a more comprehensive and intense crisis.",
+ "这些措施在经济上似乎是不够充分的和没有力量的": "These measures seem insufficient and powerless economically.",
+ "在共产主义社会里": "In a communist society.",
+ "整个历史运动都集中在资产阶级手里;在这种条件下取得的每一个胜利都是资产阶级的胜利": "The entire historical movement is concentrated in the hands of the bourgeoisie; every victory achieved under these conditions is a victory for the bourgeoisie.",
+ "联合起来!": "Unite!",
+ "其实它不过是要求无产阶级停留在现今的社会里": "In fact, it merely demands that the proletariat remain in the current society.",
+ "生长速度较虹之玉慢很多": "Grows much slower than the rainbow jade.",
+ "劳动越使人感到厌恶": "The more labor makes people feel disgusted.",
+ "僧侣们曾经在古代异教经典的手抄本上面写上荒诞的天主教圣徒传": "Monks once wrote absurd Catholic saint biographies on manuscripts of ancient pagan classics.",
+ "同时": "At the same time.",
+ "这是由于当时无产阶级本身还不够发展": "This is because the proletariat itself was not sufficiently developed at that time.",
+ "对所谓的共产党人的正式公妻制表示惊讶": "Expressing surprise at the formal communal marriage system of the so-called communists.",
+ "推翻资产阶级的统治": "Overthrow the rule of the bourgeoisie.",
+ "从此就再谈不上严重的政治斗争了": "From then on, serious political struggles could no longer be discussed.",
+ "共产主义的幽灵": "The ghost of communism.",
+ "他们用来泄愤的手段是": "The means they use to vent their anger are.",
+ "禁用stream的特殊模型处理": "Special model processing that prohibits the use of streams.",
+ "有哪一个反对党不被它的当政的敌人骂为共产党呢": "Which opposition party is not labeled as a communist by its ruling enemies?",
+ "就不能抬起头来": "Cannot raise their heads.",
+ "于是": "Then",
+ "——整个资产阶级异口同声地向我们这样叫喊": "—— The entire bourgeoisie shouted at us in unison",
+ "它必须被炸毁": "It must be destroyed",
+ "而对于共产主义要消灭买卖、消灭资产阶级生产关系和资产阶级本身这一点来说": "And regarding communism's goal to abolish trade, eliminate bourgeois production relations and the bourgeoisie itself",
+ "一句话": "In a word",
+ "3.批判的空想的社会主义和共产主义": "3. Critique of Utopian Socialism and Communism",
+ "本来意义的社会主义和共产主义的体系": "The system of socialism and communism in its original sense",
+ "它在自己的发展进程中要同传统的观念实行最彻底的决裂": "It must achieve a complete break with traditional concepts in its development process",
+ "而且主要是向统治阶级呼吁": "And it mainly appeals to the ruling class",
+ "虹之玉锦与虹之玉的叶片大小没有特别大的变化": "There is no significant change in the size of the leaves of the Rainbow Jade and Rainbow Jade varieties",
+ "德国的社会主义恰好忘记了": "German socialism has just forgotten",
+ "我们要消灭私有制": "We must abolish private property",
+ "四、共产党人对各种反对党派的态度": "4. The attitude of communists towards various opposing parties",
+ "从而消灭了它自己这个阶级的统治": "Thus eliminating the rule of its own class",
+ "长得好像长耳朵小兔": "Looks like a little rabbit with long ears",
+ "9、把农业和工业结合起来": "9. Combine agriculture and industry",
+ "根据提示": "According to the prompt",
+ "为虹之玉的锦化品种": "For the variegated variety of Rainbow Jade",
+ "为了对这个幽灵进行神圣的围剿": "To carry out a sacred encirclement against this specter",
+ "它只有通过社会许多成员的共同活动": "It can only be achieved through the collective activities of many members of society",
+ "他们激烈地反对工人的一切政治运动": "They fiercely oppose all political movements of the workers",
+ "生产力已经强大到这种关系所不能适应的地步": "The productive forces have become so powerful that this relationship can no longer adapt",
+ "那里的资产阶级才刚刚开始进行反对封建专制制度的斗争": "There, the bourgeoisie has just begun to fight against feudal despotism",
+ "而你们的教育不也是由社会决定的吗": "And isn't your education also determined by society?",
+ "将问答数据记录到向量库中": "Record the Q&A data into the vector database",
+ "除了极少数的例外": "With very few exceptions",
+ "将是这样一个联合体": "It will be such a union",
+ "既然这种文献在德国人手里已不再表现一个阶级反对另一个阶级的斗争": "Since this kind of literature no longer represents the struggle of one class against another in the hands of Germans",
+ "硬说能给工人阶级带来好处的并不是这样或那样的政治改革": "It is not this or that political reform that can supposedly benefit the working class",
+ "如果用户列举联系人": "If the user lists contacts",
+ "半是挽歌": "Half is a dirge",
+ "男工也就越受到女工和童工的排挤": "Male workers are increasingly pushed out by female and child workers",
+ "他们很快就会完全失去他们作为现代社会中一个独立部分的地位": "They will soon completely lose their status as an independent part of modern society.",
+ "特别是已经提高到从理论上认识整个历史运动这一水平的一部分资产阶级思想家": "Especially a part of the bourgeois thinkers who have elevated their understanding to the theoretical level of recognizing the entire historical movement.",
+ "就是说": "That is to say.",
+ "因为无产阶级首先必须取得政治统治": "Because the proletariat must first achieve political power.",
+ "因而也就可以了解他们同英国宪章派和北美土地改革派的关系": "Thus, they can also understand their relationship with the British Chartists and the North American land reformers.",
+ "由于一切生产工具的迅速改进": "Due to the rapid improvement of all means of production.",
+ "它的生存不再同社会相容了": "Its existence is no longer compatible with society.",
+ "共产党人可以把自己的理论概括为一句话": "Communists can summarize their theory in one sentence.",
+ "因而无产阶级内部的利益、生活状况也越来越趋于一致": "Thus, the interests and living conditions within the proletariat are increasingly converging.",
+ "缺水时容易耷拉下来;具枝干": "Easily droops when lacking water; has branches.",
+ "由于阶级对立的发展是同工业的发展步调一致的": "The development of class opposition is in step with the development of industry.",
+ "会给无产者创造出财产来吗": "Will it create property for the proletariat?",
+ "冬季温度不低于5℃": "Winter temperatures do not drop below 5°C.",
+ "他们就以为自己是高高超乎这种阶级对立之上的": "They think they are above this class opposition.",
+ "社会突然发现自己回到了一时的野蛮状态;仿佛是一次饥荒、一场普遍的毁灭性战争": "Society suddenly finds itself back in a temporary state of barbarism; as if there were a famine or a widespread catastrophic war.",
+ "在农民阶级远远超过人口半数的国家": "In countries where the peasant class far exceeds half of the population.",
+ "无产阶级经历了各个不同的发展阶段": "The proletariat has gone through various stages of development.",
+ "是同无产阶级对社会普遍改造的最初的本能的渴望相适应的": "It corresponds to the initial instinctive desire of the proletariat for the universal transformation of society.",
+ "才获得自己的适当的表现": "Only then does it gain its appropriate expression.",
+ "而且同时供世界各地消费": "And at the same time, it is supplied for consumption around the world.",
+ "也被扩及到精神产品的占有和生产方面": "It is also extended to the possession and production of spiritual products.",
+ "from shared_utils.colorful import print亮黄": "from shared_utils.colorful import printBrightYellow",
+ "各国人民之间的民族分隔和对立日益消失": "The national divisions and oppositions between peoples of different countries are increasingly disappearing.",
+ "取消现在这种形式的儿童的工厂劳动": "Abolish the current form of child labor in factories.",
+ "他们每日每时都受机器、受监工、首先是受各个经营工厂的资产者本人的奴役": "They are daily and hourly subjected to the machines, to overseers, and primarily to the enslavement of the capitalists operating the factories themselves.",
+ "捣毁机器": "Smash the machines.",
+ "你们就惊慌起来": "You become alarmed.",
+ "于是他们就去探求某种社会科学、社会规律": "Thus, they seek some kind of social science, social laws.",
+ "它们所知道的只是这种对立的早期的、不明显的、不确定的形式": "What they know is only the early, indistinct, and uncertain forms of this opposition.",
+ "福娘的物种": "Species of the blessed mother.",
+ "整个社会日益分裂为两大敌对的阵营": "The whole society is increasingly divided into two major opposing camps.",
+ "封建的农业和工场手工业组织": "Feudal agriculture and workshop handicraft organization.",
+ "他们拒绝一切政治行动": "They reject all political action",
+ "把资本变为公共的、属于社会全体成员的财产": "Transforming capital into public property that belongs to all members of society",
+ "夏季高温休眠明显": "The summer heat dormancy is obvious",
+ "就像掌握外国语一样": "Just like mastering a foreign language",
+ "说他们要取消祖国": "Saying they want to abolish the homeland",
+ "是财富在私人手里的积累": "It is the accumulation of wealth in private hands",
+ "山姆威尔·塔利": "Samuel Tarly",
+ "阳光充足": "Plenty of sunshine",
+ "是在无产阶级和资产阶级之间的斗争还不发展的最初时期出现的": "It appeared in the early stages when the struggle between the proletariat and the bourgeoisie was not yet developed",
+ "他们愿意要资产阶级": "They are willing to have the bourgeoisie",
+ "另一方面是由于革命无产阶级的兴起": "On the other hand, it is due to the rise of the revolutionary proletariat",
+ "对话句柄": "Dialogue handle",
+ "他们听说生产工具将要公共使用": "They heard that the means of production will be used publicly",
+ "以免于灭亡": "To avoid extinction",
+ "是以现代的资产阶级社会以及相应的物质生活条件和相当的政治制度为前提的": "It is based on modern bourgeois society and corresponding material living conditions and political systems",
+ "就使整个资产阶级社会陷入混乱": "This plunges the entire bourgeois society into chaos",
+ "它变成了束缚生产的桎梏": "It has become a shackle that binds production",
+ "淹没在利己主义打算的冰水之中": "Drowned in the icy waters of selfish intentions",
+ "法国的生活条件却没有同时搬过去": "The living conditions in France did not move over at the same time",
+ "如果说它通过革命使自己成为统治阶级": "If it becomes the ruling class through revolution",
+ "有些地方": "Some places",
+ "德国的特别是普鲁士的资产阶级反对封建主和专制王朝的斗争": "The struggle of the bourgeoisie in Germany, especially Prussia, against feudal lords and autocratic dynasties",
+ "那么它在消灭这种生产关系的同时": "Then it simultaneously eliminates this production relationship",
+ "卵圆形": "Oval shape",
+ "他们一贯企图削弱阶级斗争": "They consistently attempt to weaken class struggle",
+ "3、废除继承权": "3. Abolish inheritance rights",
+ "英国的十小时工作日法案就是一个例子": "The British Ten Hours Act is an example",
+ "他们看不到无产阶级方面的任何历史主动性": "They see no historical initiative from the proletariat",
+ "瑞肯·史塔克": "Reichen Stark",
+ "贵族们不得不装模作样": "The nobles had to put on a show",
+ "工场手工业代替了这种经营方式": "Workshop handcraft replaced this mode of operation",
+ "——这就是它的结论": "——This is its conclusion",
+ "按照他们的历史地位所负的使命": "According to the mission imposed by their historical status",
+ "这种利己观念是你们和一切灭亡了的统治阶级所共有的": "This self-serving concept is shared by you and all the ruling classes that have perished",
+ "他们是在完全不同的、目前已经过时的情况和条件下进行剥削的": "They exploit under completely different and now outdated circumstances and conditions",
+ "在公社里是武装的和自治的团体": "In the commune, they are armed and self-governing groups",
+ "他们要改善社会一切成员的生活状况": "They aim to improve the living conditions of all members of society",
+ "他们愿意要现存的社会": "They are willing to accept the existing society",
+ "它在封建主统治下是被压迫的等级": "It is an oppressed class under feudal lord rule",
+ "半是未来的恫吓;它有时也能用辛辣、俏皮而尖刻的评论剌中资产阶级的心": "Half a threat of the future; sometimes it can also pierce the heart of the bourgeoisie with sharp, witty, and incisive comments",
+ "现在是共产党人向全世界公开说明自己的观点、自己的目的、自己的意图并且拿党自己的宣言来反驳关于共产主义幽灵的神话的时候了": "Now is the time for communists to publicly explain their views, their goals, their intentions to the world and to use the party's own manifesto to refute the myths about the specter of communism",
+ "共产党人的理论原理": "The theoretical principles of communists",
+ "他们都只是劳动工具": "They are merely tools of labor",
+ "共产党人同社会主义民主党联合起来反对保守的和激进的资产阶级": "Communists unite with the socialist democrats to oppose the conservative and radical bourgeoisie",
+ "这一阶级的成员经常被竞争抛到无产阶级队伍里去": "Members of this class are often thrown into the ranks of the proletariat by competition",
+ "并且作为资产阶级社会的补充部分不断地重新组成": "And they are constantly reconstituted as a supplementary part of bourgeois society",
+ "这就是说": "That is to say",
+ "长大后叶子会慢慢变长变粗": "As they grow, the leaves will gradually become longer and thicker",
+ "都不可避免地遭到了失败": "All inevitably faced failure",
+ "却是毫无意义的": "But it is meaningless",
+ "在这个阶段上": "At this stage",
+ "多年生肉质草本植物": "Perennial succulent herbaceous plants",
+ "我们可以举蒲鲁东的《贫困的哲学》作为例子": "We can take Proudhon's 'The Philosophy of Poverty' as an example",
+ "智能召回 RAG": "Intelligent recall RAG",
+ "在危机期间": "During the crisis",
+ "在无产阶级的生活条件中": "In the living conditions of the proletariat",
+ "共产党人并没有发明社会对教育的作用;他们仅仅是要改变这种作用的性质": "Communists did not invent the role of society in education; they merely seek to change the nature of that role",
+ "就必须保证这个阶级至少有能够勉强维持它的奴隶般的生存的条件": "It must ensure that this class at least has the conditions to barely maintain its slave-like existence",
+ "中间等级": "Intermediate class",
+ "“真正的”社会主义能起一箭双雕的作用": "\"True\" socialism can serve a dual purpose",
+ "我的恋人": "My lover",
+ "其次": "Secondly",
+ "过去的一切运动都是少数人的或者为少数人谋利益的运动": "All past movements were either movements of a minority or for the benefit of a minority",
+ "字": "Word",
+ "这种社会主义成了德意志各邦专制政府及其随从——僧侣、教员、容克和官僚求之不得的、吓唬来势汹汹的资产阶级的稻草人": "This type of socialism has become a straw man for the autocratic governments of the German states and their followers—clergymen, educators, Junkers, and bureaucrats—who seek to intimidate the bourgeoisie.",
+ "那么它也就直接代表了一种反动的利益": "Then it directly represents a reactionary interest.",
+ "我的养父": "My adoptive father.",
+ "特别是一切革命行动;他们想通过和平的途径达到自己的目的": "Especially all revolutionary actions; they want to achieve their goals through peaceful means.",
+ "在他们心目中": "In their minds.",
+ "受着各级军士和军官的层层监视": "Under the close surveillance of soldiers and officers at all levels.",
+ "我们眼前又进行着类似的运动": "We are witnessing a similar movement before us.",
+ "难道雇佣劳动": "Isn't wage labor.",
+ "拟定了如下的宣言": "Drafted the following declaration.",
+ "挤在工厂里的工人群众就像士兵一样被组织起来": "The workers crowded in the factories are organized like soldiers.",
+ "这种交通工具把各地的工人彼此联系起来": "This means of transportation connects workers from different places.",
+ "但这种胜利只是暂时的": "But this victory is only temporary.",
+ "问题正在于使妇女不再处于单纯生产工具的地位": "The issue is to free women from being mere instruments of production.",
+ "调用ListFriends": "Call ListFriends.",
+ "上升为民族的阶级": "Rising to become a national class.",
+ "那就请你们不要同我们争论了": "Then please do not argue with us.",
+ "从中世纪的农奴中产生了初期城市的城关市民;从这个市民等级中发展出最初的资产阶级分子": "The early urban bourgeoisie emerged from the serfs of the Middle Ages; from this citizen class developed the initial bourgeois elements.",
+ "德国的社会主义也越来越认识到自己的使命就是充当这种小市民的夸夸其谈的代言人": "German socialism is increasingly recognizing its mission to act as a spokesperson for the petty bourgeoisie's grandiloquent talk.",
+ "看到社会地位分成多种多样的层次": "Seeing social status divided into various levels.",
+ "资本不是一种个人力量": "Capital is not a personal power.",
+ "资产阶级关于家庭和教育、关于父母和子女的亲密关系的空话就越是令人作呕": "The bourgeoisie's empty talk about family and education, about the intimate relationships between parents and children, is increasingly nauseating.",
+ "现今的这种财产是在资本和雇佣劳动的对立中运动的": "Today's property moves within the opposition between capital and wage labor.",
+ "起而代之的是自由竞争以及与自由竞争相适应的社会制度和政治制度、资产阶级的经济统治和政治统治": "What replaces it is free competition and the social and political systems that correspond to free competition, the economic and political domination of the bourgeoisie.",
+ "在另一些地方组成君主国中的纳税的第三等级;后来": "In other places, forming the taxed third estate in monarchies; later.",
+ "从封建社会的灭亡中产生出来的现代资产阶级社会并没有消灭阶级对立": "The modern bourgeois society that emerged from the demise of feudal society did not eliminate class antagonism.",
+ "在中世纪": "In the Middle Ages.",
+ "并且是同这种统治作斗争的文字表现": "And it is a written expression of the struggle against this domination.",
+ "用一种没有良心的贸易自由代替了无数特许的和自力挣得的自由": "Replaced countless privileges and self-earned freedoms with a heartless freedom of trade.",
+ "当然首先必须对所有权和资产阶级生产关系实行强制性的干涉": "Of course, there must first be compulsory interference with ownership and bourgeois production relations.",
+ "仿佛用法术从地下呼唤出来的大量人口": "As if a large population were summoned from underground by magic.",
+ "叶被毛": "Ye Beimao.",
+ "资产阶级赖以生产和占有产品的基础本身也就从它的脚下被挖掉了": "The very foundation upon which the bourgeoisie relies to produce and possess products has been undermined from beneath their feet.",
+ "共产党人的最近目的是和其他一切无产阶级政党的最近目的一样的": "The recent goal of communists is the same as that of all other proletarian parties.",
+ "甚至生活最优裕的成员也包括在内": "Even the most affluent members are included.",
+ "他们还能进行的只是文字斗争": "All they can engage in is a struggle of words.",
+ "并且向人民群众大肆宣扬": "And they widely promote to the masses.",
+ "由此可见": "It can be seen that.",
+ "这个阶级还在新兴的资产阶级身旁勉强生存着": "This class is barely surviving alongside the emerging bourgeoisie.",
+ "他们不仅仅攻击资产阶级的生产关系": "They not only attack the production relations of the bourgeoisie.",
+ "而资产阶级却把消灭这种关系说成是消灭个性和自由!说对了": "But the bourgeoisie claims that the abolition of these relations is the abolition of individuality and freedom! That's right.",
+ "而且养起来也不难": "And it's not difficult to sustain.",
+ "需求总是在增加": "Demand is always increasing.",
+ "他们毫不掩饰自己的批评的反动性质": "They do not hide the reactionary nature of their criticism.",
+ "工人开始成立反对资产者的同盟;他们联合起来保卫自己的工资": "Workers begin to form alliances against the capitalists; they unite to defend their wages.",
+ "都有是一样的": "They are all the same.",
+ "不仅如此": "Moreover.",
+ "不也是由你们进行教育时所处的那种社会关系决定的吗": "Isn't it also determined by the social relations you are in while educating?",
+ "资产阶级使农村屈服于城市的统治": "The bourgeoisie subjugates the countryside to the rule of the city.",
+ "还证明了什么呢": "What else does it prove?",
+ "私有财产对十分之九的成员来说已经被消灭了;这种私有制这所以存在": "Private property has been abolished for nine-tenths of the members; this form of private ownership exists because.",
+ "那些站在无产阶级方面反对资产阶级的著作家": "Those authors who stand on the side of the proletariat against the bourgeoisie.",
+ "在法国的1830年七月革命和英国的改革运动 中": "During the July Revolution of 1830 in France and the reform movement in England.",
+ "他们的计划主要是代表工人阶级这一受苦最深的阶级的利益": "Their plans mainly represent the interests of the working class, the most suffering class.",
+ "叶片外形多有变化有短圆形、厚厚的方形等不同叶形;": "The shape of the leaves varies, with short round shapes, thick square shapes, and other different leaf shapes.",
+ "却是过去的一切工业阶级生存的首要条件": "It was the primary condition for the survival of all past industrial classes.",
+ "在德国的条件下": "Under the conditions in Germany.",
+ "教皇和沙皇、梅特涅和基佐、法国的激进派和德国的警察": "The Pope and the Tsar, Metternich and Kossuth, the radicals in France and the police in Germany.",
+ "总而言之": "In summary.",
+ "这样": "Thus.",
+ "资产阶级的婚姻实际上是公妻制": "The marriage of the bourgeoisie is essentially a form of communal wife system.",
+ "Json解析异常": "Json parsing exception.",
+ "而无产者的被迫独居和公开的卖淫则是它的补充": "And the forced solitude and public prostitution of the proletariat are its supplements.",
+ "添加联系人": "Add contact.",
+ "却有一个特点": "But it has a characteristic.",
+ "可见": "Visible",
+ "或者是企图恢复旧的生产资料和交换手段": "Or attempting to restore old means of production and exchange",
+ "这些不得不把自己零星出卖的工人": "These workers who have to sell themselves sporadically",
+ "他们不提出任何特殊的原则": "They do not propose any special principles",
+ "是同历史的发展成反比的": "Is inversely proportional to the development of history",
+ "解放的历史条件要由幻想的条件来代替": "The historical conditions for liberation must be replaced by imaginary conditions",
+ "随着贸易自由的实现和世界市场的建立": "With the realization of trade freedom and the establishment of the world market",
+ "德国著作家对世俗的法国文献采取相反的作法": "German authors take the opposite approach to secular French literature",
+ "而是越来越降到本阶级的生存条件以下": "But increasingly fall below the living conditions of this class",
+ "其余的阶级都随着大工业的发展而日趋没落和灭亡": "The remaining classes are declining and perishing with the development of large-scale industry",
+ "但是它由于完全不能理解现代历史的进程而总是令人感到可笑": "But it is always laughable because it completely fails to understand the process of modern history",
+ "他们克服了“法国人的片面性”": "They have overcome the 'one-sidedness of the French'",
+ "净化空气": "Purify the air",
+ "资产者唯恐失去的那种教育": "The kind of education that capitalists fear losing",
+ "总之": "In summary",
+ "碧光环是番杏科碧光玉属": "The jade ring is from the genus Crassula in the Crassulaceae family",
+ "10、对所有儿童实行公共的和免费的教育": "10. Implement public and free education for all children",
+ "而只具有纯粹文献的形式": "But only has the form of pure literature",
+ "他是北境的继承人": "He is the heir of the North",
+ "于是就哈哈大笑": "And then laughed out loud",
+ "那种财产用不着我们去消灭": "That kind of property does not need to be eliminated by us",
+ "即剥削雇佣劳动的财产": "That is, the property that exploits wage labor",
+ "亦可栽植于室内以吸收甲醛等物质": "It can also be planted indoors to absorb formaldehyde and other substances",
+ "但是不要那些使这个社会革命化和瓦解的因素": "But do not want those factors that revolutionize and dissolve this society",
+ "这一方面是由于资本的积聚": "This is partly due to the accumulation of capital",
+ "从大工业和世界市场建立的时候起": "Since the establishment of large-scale industry and the world market",
+ "因福娘的叶形叶色较美": "Because the leaf shape and color of the fortune daughter are more beautiful",
+ "随着工业生产以及与之相适应的生活条件的趋于一致": "With the alignment of industrial production and the corresponding living conditions",
+ "不过是一般“实践理性”的要求": "It is merely a general requirement of 'practical reason'",
+ "由无产阶级夺取政权": "The proletariat seizes power",
+ "银波锦属的多年生肉质草本植物": "Perennial succulent herbaceous plants of the genus Silver Wave",
+ "给新兴的资产阶级开辟了新天地": "Opened up a new world for the emerging bourgeoisie",
+ "碧光环原产于南非": "The blue halo originates from South Africa",
+ "他们更甘心于被人收买": "They are more willing to be bought off",
+ "资产阶级的这种发展的每一个阶段": "Every stage of this development of the bourgeoisie",
+ "看不到它所特有的任何政治运动": "Cannot see any political movement unique to it",
+ "分工越细致": "The more detailed the division of labor",
+ "中世纪的城关市民和小农等级是现代资产阶级的前身": "The medieval town burghers and small peasant class are the predecessors of the modern bourgeoisie",
+ "他们在一些地方也被无产阶级革命卷到运动里来": "They have also been swept into the movement by the proletarian revolution in some places",
+ "在这种著作从法国搬到德国的时候": "When this kind of work moved from France to Germany",
+ "这样说来": "That being said",
+ "让统治阶级在共产主义革命面前发抖吧": "Let the ruling class tremble before the communist revolution",
+ "经济学家、博爱主义者、人道主义者、劳动阶级状况改善派、慈善事业组织者、动物保护协会会员、戒酒协会发起人以及形形色色的小改良家": "Economists, philanthropists, humanitarians, advocates for the improvement of the working class's conditions, charity organizers, animal protection association members, temperance movement initiators, and various minor reformers",
+ "各个世纪的社会意识": "Social consciousness of various centuries",
+ "“真正的”社会主义就得到了一个好机会": "The 'real' socialism has gotten a good opportunity",
+ "资产阶级的社会主义把这种安慰人心的观念制成半套或整套的体系": "The bourgeois socialism has turned this comforting idea into a half or full set of systems",
+ "资本是集体的产物": "Capital is a collective product",
+ "比过去一切世代创造的全部生产力还要多": "More than all the productive forces created by past generations",
+ "即袖珍版的新耶路撒冷": "A pocket-sized new Jerusalem",
+ "我的养母": "My adoptive mother",
+ "在实践方面": "In practical terms",
+ "但是在运动进程中它们会越出本身": "But in the course of the movement, they will exceed themselves",
+ "成立产业军": "Establish an industrial army",
+ "而且有很大一部分已经造成的生产力被毁灭掉": "And a large part of the productive forces that have already been created has been destroyed",
+ "他们违背自己的那一套冠冕堂皇的言词": "They contradict their own grandiloquent words",
+ "现代资产阶级本身是一个长期发展过程的产物": "The modern bourgeoisie itself is a product of a long developmental process",
+ "说我们消灭个人挣得的、自己劳动得来的财产": "Saying we abolish property earned by individuals through their own labor",
+ "这种文献倡导普遍的禁欲主义和粗陋的平均主义": "This kind of literature advocates for universal asceticism and crude egalitarianism",
+ "为了激起同情": "In order to arouse sympathy",
+ "使反动派大为惋惜的是": "What makes the reactionaries greatly regret is",
+ "它首先生产的是它自身的掘墓人": "What it first produces is its own gravediggers",
+ "无论在美国或德国": "Whether in America or Germany",
+ "几十年来的工业和商业的历史": "The history of industry and commerce over the decades",
+ "增加自己的资本": "Increase their own capital",
+ "思想的历史除了证明精神生产随着物质生产的改造而改造": "The history of thought not only proves that spiritual production is transformed along with the transformation of material production.",
+ "不满足任何一种已知的密钥格式": "Does not satisfy any known key format.",
+ "检测到长输入": "Long input detected.",
+ "即小工业家、小商人和小食利者": "That is, small industrialists, small merchants, and petty usurers.",
+ "二、无产者和共产党人": "2. The proletariat and communists.",
+ "流氓无产阶级是旧社会最下层中消极的腐化的部分": "The lumpenproletariat is the passive and corrupt part of the lowest layer of the old society.",
+ "它给这些小市民的每一种丑行都加上奥秘的、高尚的、社会主义的意义": "It adds a mysterious, noble, and socialist meaning to every vice of these petty bourgeois.",
+ "形成了一个新的小资产阶级": "A new petty bourgeoisie has formed.",
+ "即使在文字方面也不可能重弹复辟时期的老调了": "Even in terms of language, it is impossible to replay the old tunes of the restoration period.",
+ "使无产阶级形成为阶级": "It shapes the proletariat into a class.",
+ "社会所拥有的生产力已经不能再促进资产阶级文明和资产阶级所有制关系的发展;相反": "The productive forces possessed by society can no longer promote the development of bourgeois civilization and bourgeois property relations; on the contrary.",
+ "就是把新的法国的思想同他们的旧的哲学信仰调和起来": "It is to reconcile the new French thought with their old philosophical beliefs.",
+ "我们还是把资产阶级对共产主义的种种责难撇开吧": "Let us set aside the various accusations of the bourgeoisie against communism.",
+ "一切社会状况不停的动荡": "All social conditions are in constant turmoil.",
+ "社会上一部分人对另一部分人的剥削却是过去各个世纪所共有的事实": "The exploitation of one part of society by another has been a common fact throughout the centuries.",
+ "民族内部的阶级对立一消失": "Once the class antagonism within the nation disappears.",
+ "有人反驳说": "Some people argue that.",
+ "一些基础工具": "Some basic tools.",
+ "诚然": "Indeed.",
+ "换句话说": "In other words.",
+ "就是写一些抨击现代资产阶级社会的作品": "It is to write some works that criticize modern bourgeois society.",
+ "现代大工业代替了工场手工业;工业中的百万富翁": "Modern large-scale industry has replaced workshop handicrafts; millionaires in industry.",
+ "所不同的只是他们更加系统地卖弄学问": "The difference is that they flaunt their knowledge more systematically.",
+ "她是野人中的一员": "She is one of the savages.",
+ "这些体系的发明家看到了阶级的对立": "The inventors of these systems saw the class antagonism.",
+ "以便为可能发生的反抗准备食品": "In order to prepare food for possible resistance.",
+ "我们在前面已经叙述过了": "We have already described this earlier.",
+ "它把宗教虔诚、骑士热忱、小市民伤感这些情感的神圣发作": "It sanctifies the emotional outbursts of religious piety, chivalrous enthusiasm, and petty bourgeois sentimentality.",
+ "只够勉强维持他的生命的再生产": "Barely sufficient to sustain his life reproduction.",
+ "形态奇特": "The form is peculiar.",
+ "公妻制无需共产党人来实行": "The system of public wives does not require communists to implement.",
+ "只有当阶级对立完全消失的时候才会完全消失": "It will only completely disappear when class antagonism has completely vanished.",
+ "始终处于相互对立的地位": "Always in a position of mutual opposition",
+ "就是从他们的哲学观点出发去掌握法国的思想": "It is to grasp French thought from their philosophical perspective",
+ "自由主义运动": "Liberal movement",
+ "我们已经看到": "We have already seen",
+ "随着大工业的发展": "With the development of large industry",
+ "它只剥夺利用这种占有去奴役他人劳动的权力": "It only deprives the power to use this possession to enslave the labor of others",
+ "半是过去的回音": "Half is an echo of the past",
+ "只要资产阶级采取革命的行动": "As long as the bourgeoisie takes revolutionary action",
+ "无产者是没有财产的;他们和妻子儿女的关系同资产阶级的家庭关系再没有任何共同之处了;现代的工业劳动": "The proletarians have no property; their relationship with their wives and children has nothing in common with the bourgeois family relationship; modern industrial labor",
+ "绝大多数人来说是把人训练成机器": "For the vast majority of people, it trains humans to become machines",
+ "在资产阶级看来": "In the eyes of the bourgeoisie",
+ "人们的观念、观点和概念": "People's ideas, viewpoints, and concepts",
+ "无产阶级就是这样从居民的所有阶级中得到补充的": "The proletariat is thus supplemented from all classes of residents",
+ "手的操作所要求的技巧和气力越少": "The less skill and strength required for manual operation",
+ "我们不谈在现代一切大革命中表达过无产阶级要求的文献": "We do not talk about the literature that has expressed the demands of the proletariat in all modern revolutions",
+ "这种责难归结为什么呢": "What does this criticism boil down to?",
+ "封建主说": "The feudal lord says",
+ "而且几乎在每一个阶级内部又有一些特殊的阶层": "And there are almost some special strata within each class",
+ "资产阶级自己就把自己的教育因素即反对自身的武器给予了无产阶级": "The bourgeoisie itself has given the proletariat its educational factors, that is, the weapons against itself",
+ "雇佣劳动的平均价格是最低限度的工资": "The average price of wage labor is the minimum wage",
+ "即生产过剩的瘟疫": "That is the plague of overproduction",
+ "资产阶级中的一部分人想要消除社会的弊病": "Some people in the bourgeoisie want to eliminate the ills of society",
+ "一支一支产业大军的首领": "The leader of a battalion of industrial troops",
+ "所以": "Therefore",
+ "而是维护他们将来的利益": "But to protect their future interests",
+ "共产党人支持那个把土地革命当作民族解放的条件的政党": "Communists support the party that regards land reform as a condition for national liberation",
+ "性别和年龄的差别再没有什么社会意义了": "The differences in gender and age no longer have any social significance",
+ "资产阶级": "Bourgeoisie",
+ "——这才是资产阶级的社会主义唯一认真说出的最后的话": "— This is the only serious last word of the bourgeois socialism",
+ "要使教育摆脱统治阶级的影响": "To free education from the influence of the ruling class",
+ "它揭穿了经济学家的虚伪的粉饰": "It exposes the hypocritical embellishments of economists",
+ "把国家变成纯粹的生产管理机构": "Transform the state into a purely production management institution",
+ "他们都强调所有制问题是运动的基本问题": "They all emphasize that the issue of ownership is the fundamental issue of the movement.",
+ "至今的一切社会的历史都是在阶级对立中运动的": "The history of all societies to date has been a movement in class opposition.",
+ "以前那种封建的或行会的工业经营方式已经不能满足随着新市场的出现而增加的需求了": "The previous feudal or guild industrial management methods can no longer meet the increasing demands arising from new markets.",
+ "只要指出在周期性的重复中越来越危及整个资产阶级社会生存的商业危机就够了": "It is enough to point out the commercial crises that increasingly threaten the survival of the entire bourgeois society in periodic repetitions.",
+ "机器越推广": "The more machines are promoted.",
+ "为了这个目的": "For this purpose.",
+ "这一思潮在它以后的发展中变成了一种怯懦的悲叹": "This ideology later developed into a timid lament.",
+ "如果用户给出了联系人": "If the user provides a contact.",
+ "的确": "Indeed.",
+ "无产者的劳动": "The labor of the proletariat.",
+ "人们终于不得不用冷静的眼光来看他们的生活地位、他们的相互关系": "People finally have to look at their living conditions and their relationships with a calm perspective.",
+ "6、把全部运输业集中在国家的手里": "6. Centralize all transportation industries in the hands of the state.",
+ "各民族的精神产品成了公共的财产": "The spiritual products of various nations have become public property.",
+ "一切新形成的关系等不到固定下来就陈旧了": "All newly formed relationships become outdated before they can be established.",
+ "作为长期参考": "As a long-term reference.",
+ "还不是他们自己联合的结果": "It is not yet the result of their own union.",
+ "它使未开化和半开化的国家从属于文明的国家": "It makes uncivilized and semi-civilized countries subordinate to civilized nations.",
+ "到处建立联系": "Establish connections everywhere.",
+ "一旦没有资本": "Once there is no capital.",
+ "今后的世界历史不过是宣传和实施他们的社会计划": "The future world history is nothing but the promotion and implementation of their social plans.",
+ "封建社会正在同当时革命的资产阶级进行殊死的斗争": "Feudal society is engaged in a life-and-death struggle with the revolutionary bourgeoisie of the time.",
+ "肉质叶肥厚": "The fleshy leaves are thick.",
+ "把地租用于国家支出": "Use land rent for state expenditures.",
+ "另一方面夺取新的市场": "On the other hand, seize new markets.",
+ "1、剥夺地产": "1. Expropriate land.",
+ "他们甚至觉察到": "They even realize that.",
+ "在共产主义社会里是现在支配过去": "In a communist society, the present dominates the past.",
+ "每一个国家的无产阶级当然首先应该打倒本国的资产阶级": "The proletariat of each country should certainly first overthrow the bourgeoisie of their own country.",
+ "在它看来": "In its view.",
+ "这就是资产阶级时代不同于过去一切时代的地方": "This is where the bourgeois era differs from all past eras.",
+ "现今在德国流行的一切所谓社会主义和共产主义的著作": "All so-called socialist and communist writings currently popular in Germany.",
+ "他们参与对工人阶级采取的一切暴力措施": "They participate in all violent measures taken against the working class.",
+ "这样就把无产阶级卷进了政治运动": "This has drawn the proletariat into political movements.",
+ "如果说他们是革命的": "If they are said to be revolutionary.",
+ "并且企图通过一些小型的、当然不会成功的试验": "And they attempt to conduct some small-scale, of course unsuccessful experiments.",
+ "他们甚至建立了经常性的团体": "They even established regular organizations.",
+ "从而对全部社会关系不断地进行革命": "Thus continuously revolutionizing all social relations.",
+ "就能把许多性质相同的地方性的斗争汇合成全国性的斗争": "It can unite many similar local struggles into a national struggle.",
+ "——过去哪一个世纪料想到在社会劳动里蕴藏有这样的生产力呢": "—Which century in the past could have anticipated such productive forces hidden in social labor?",
+ "创立小伊加利亚": "Establishing a small Utopia.",
+ "资产阶级在它的不到一百年的阶级统治中所创造的生产力": "The productive forces created by the bourgeoisie in its less than a hundred years of class rule.",
+ "屈尊拾取金苹果": "Deigning to pick up golden apples.",
+ "封建社会的生产和交换在其中进行的关系": "The relations of production and exchange in feudal society.",
+ "让我们来看看这种对立的两个方面吧": "Let's take a look at these two opposing aspects.",
+ "资产者彼此间日益加剧的竞争以及由此引起的商业危机": "The increasingly intense competition among capitalists and the resulting commercial crises.",
+ "较喜光照": "Preferably well-lit.",
+ "现代的资产阶级私有制是建立在阶级对立上面、建立在一些人对另一些人的剥削上面的产品生产和占有的最后而又完备的表现": "Modern bourgeois private property is the final and complete manifestation of production and ownership based on class opposition and the exploitation of some by others.",
+ "他们不代表真实的要求": "They do not represent real demands.",
+ "我们的时代": "Our era.",
+ "他是个天真无邪的小孩": "He is an innocent child.",
+ "叶色灰绿": "The leaves are gray-green.",
+ "力图恢复已经失去的中世纪工人的地位": "Striving to restore the lost status of medieval workers.",
+ "在资产阶级的统治下有一个将把整个旧社会制度炸毁的阶级发展起来": "Under the rule of the bourgeoisie, a class is developing that will blow up the entire old social system.",
+ "无产阶级用暴力推翻资产阶级而建立自己的统治": "The proletariat overthrows the bourgeoisie with violence and establishes its own rule.",
+ "这件光彩夺目的外衣只是使他们的货物在这些顾客中间增加销路罢了": "This splendid exterior only serves to increase the market for their goods among these customers.",
+ "我们承认这种罪状": "We acknowledge this charge.",
+ "自由民和奴隶、贵族和平民、领主和农奴、行会师傅和帮工": "Freemen and slaves, nobles and commoners, lords and serfs, guild masters and apprentices.",
+ "挺起胸来": "Stand tall.",
+ "这是要计算嵌入的文本": "This is to calculate the embedded text.",
+ "这究竟是怎样的一种办法呢": "What kind of method is this?",
+ "也就消失了": "Has also disappeared.",
+ "更坚固": "Stronger.",
+ "要求无产阶级援助": "Demand assistance from the proletariat.",
+ "在旧社会内部已经形成了新社会的因素": "Factors of a new society have already formed within the old society.",
+ "贪婪地抓住了这种文献": "Greedily seized this literature",
+ "正像过去贵族中有一部分人转到资产阶级方面一样": "Just as some nobles in the past shifted to the bourgeoisie",
+ "而只存在于云雾弥漫的哲学幻想的太空": "And only exists in the space of philosophical fantasies shrouded in mist",
+ "他们不仅仅是资产阶级的、资产阶级国家的奴隶": "They are not merely slaves of the bourgeoisie and the bourgeois state",
+ "它是等级君主国或专制君主国中同贵族抗衡的势力": "It is a force that counters the nobility in hierarchical monarchies or despotic states",
+ "如自由、正义等等": "Such as freedom, justice, and so on",
+ "这种专制制度越是公开地把营利宣布为自己的最终目的": "The more this autocratic system openly declares profit as its ultimate goal",
+ "反而会失去一切": "The more it will lose everything",
+ "无产阶级在普遍激动的时代、在推翻封建社会的时期直接实现自己阶级利益的最初尝试": "The proletariat's initial attempt to directly realize its class interests during a time of general agitation and in the period of overthrowing feudal society",
+ "乙": "B",
+ "这种文献被搬到德国的时候": "When this literature was moved to Germany",
+ "珊莎·史塔克": "Sansa Stark",
+ "现在渐渐失去了它的自炫博学的天真": "Has gradually lost its naive self-congratulatory erudition",
+ "德国著作家的唯一工作": "The sole work of German authors",
+ "正如阶级的所有制的终止在资产者看来是生产本身的终止一样": "Just as the termination of class ownership appears to the capitalists as the termination of production itself",
+ "这种资产阶级的社会主义甚至被制成一些完整的体系": "This bourgeois socialism has even been formed into some complete systems",
+ "所谓自由就是自由贸易": "So-called freedom is free trade",
+ "他们甚至是反动的": "They are even reactionary",
+ "花期7-9月": "Flowering period is July to September",
+ "清空向量数据库": "Clear the vector database",
+ "农奴曾经在农奴制度下挣扎到公社成员的地位": "Serfs once struggled under serfdom to attain the status of commune members",
+ "花瓣呈红色": "The petals are red",
+ "他们斗争的真正成果并不是直接取得的成功": "The true outcome of their struggle was not a direct success",
+ "共产党人到处都努力争取全世界民主政党之间的团结和协调": "Communists everywhere strive for unity and coordination among democratic parties worldwide",
+ "它在这两种场合都是反动的": "It is reactionary in both cases",
+ "如果用户希望移除某个联系人": "If the user wishes to remove a contact",
+ "现在已经结合为一个拥有统一的政府、统一的法律、统一的民族阶级利益和统一的关税的统一的民族": "Now combined into a unified nation with a unified government, unified law, unified national class interests, and unified tariffs",
+ "是以极端怠惰作为相应补充的": "Is correspondingly supplemented by extreme laziness",
+ "而宗教、道德、哲学、政治和法在这种变化中却始终保存着": "While religion, morality, philosophy, politics, and law have always preserved themselves in this change",
+ "它把医生、律师、教士、诗人和学者变成了它出钱招雇的雇佣劳动者": "It turns doctors, lawyers, clergymen, poets, and scholars into hired laborers it pays to employ",
+ "8、实行普遍劳动义务制": "8. Implement universal labor obligation system",
+ "是它用来摧毁一切万里长城、征服野蛮人最顽强的仇外心理的重炮": "It is the heavy artillery it uses to destroy all barriers and conquer the most stubborn xenophobia of the barbarians",
+ "从这一事实中可以得出两个结论": "Two conclusions can be drawn from this fact",
+ "表覆白粉": "Powdered white coating",
+ "而是工人的越来越扩大的联合": "But rather the increasingly expanding union of workers",
+ "贵族们把无产阶级的乞食袋当作旗帜来挥舞": "The nobility wave the proletariat's begging bag as a flag",
+ "活的劳动只是增殖已经积累起来的劳动的一种手段": "Living labor is merely a means of augmenting already accumulated labor",
+ "现代的资本压迫": "Modern capital oppression",
+ "不代表无产者的利益": "Does not represent the interests of the proletariat",
+ "即发动过1846年克拉科夫起义的政党": "The party that instigated the Kraków uprising of 1846",
+ "进行不断的、有时隐蔽有时公开的斗争": "Engaging in continuous struggles, sometimes covertly and sometimes openly",
+ "促使城乡对立逐步消灭": "Promoting the gradual elimination of urban-rural opposition",
+ "不断地由于工人的自相竞争而受到破坏": "Constantly being undermined by the competition among workers",
+ "极具观赏价值": "Highly ornamental",
+ "这些措施在不同的国家里当然会是不同的": "These measures will certainly differ in different countries",
+ "封建的所有制关系": "Feudal ownership relations",
+ "雄蕊呈正方形;蓇葖果的喙反曲;种子平滑;花期9月;果期10月": "Stamens are square; the beak of the capsule is curved; seeds are smooth; flowering period is September; fruiting period is October",
+ "无产者没有什么自己的东西必须加以保护": "The proletariat has nothing of its own that must be protected",
+ "就会承认这种体系是最美好的社会的最美好的计划": "Will acknowledge this system as the best plan for the best society",
+ "到处开发": "Develop everywhere",
+ "他们也给无产阶级带来了大量的教育因素": "They also brought a wealth of educational factors to the proletariat",
+ "所以共产主义是同至今的全部历史发展相矛盾的": "Thus communism contradicts the entire historical development to date",
+ "似乎他们已经不关心自身的利益": "It seems they no longer care about their own interests",
+ "详见": "See details",
+ "但是要抛弃他们关于这个社会的可恶的观念": "But must abandon their abhorrent views about this society",
+ "西斯蒙第不仅对法国而且对英国来说都是这类著作家的首领": "Sismondi is the leader of such authors not only for France but also for Britain",
+ "又似玉石": "Also resembles jade",
+ "5、通过拥有国家资本和独享垄断权的国家银行": "5. By owning state capital and monopolizing the state bank",
+ "旧欧洲的一切势力": "All forces of old Europe",
+ "而这一切前提当时在德国正是尚待争取的": "And all these premises were yet to be fought for in Germany at that time",
+ "自由贸易!为了工人阶级的利益;保护关税!为了工人阶级的利益;单身牢房!为了工人阶级的利益": "Free trade! For the benefit of the working class; protective tariffs! For the benefit of the working class; solitary confinement! For the benefit of the working class",
+ "是景天科石莲属": "Is the Crassulaceae family of stone lotus",
+ "因此": "Therefore",
+ "共产党人是各国工人政党中最坚决的、始终起推动作用的部分;在理论方面": "Communists are the most resolute and consistently driving force within the workers' parties of various countries; in theoretical terms",
+ "以及旧风尚、旧家庭关系和旧民族性的解体": "The disintegration of old customs, old family relationships, and old national identities",
+ "无产阶级的统治将使它们更快地消失": "The rule of the proletariat will make them disappear more quickly",
+ "是景天科": "Is the Crassulaceae family",
+ "这种社会主义的另一种不够系统、但是比较实际的形式": "Another form of socialism that is not systematic enough but more practical",
+ "东印度和中国的市场、美洲的殖民化、对殖民地的贸易、交换手段和一般商品的增加": "The markets of East India and China, the colonization of the Americas, trade with the colonies, means of exchange, and the increase of general commodities",
+ "并且宣布自己是不偏不倚地超乎任何阶级斗争之上的": "And declare themselves to be above any class struggle in an impartial manner",
+ "在政治实践中": "In political practice",
+ "消灭家庭!连极端的激进派也对共产党人的这种可耻的意图表示愤慨": "Abolish the family! Even the most extreme radicals express outrage at the communists' shameful intention",
+ "一谈到资产阶级所有制你们就再也不能理解了": "When it comes to bourgeois ownership, you can no longer understand",
+ "二歧聚伞花序": "Dichasial umbel",
+ "资产阶级不仅锻造了置自身于死地的武器;它还产生了将要运用这种武器的人——现代的工人": "The bourgeoisie not only forged the weapons that would lead to their own destruction; it also produced the people who would wield these weapons—the modern workers",
+ "要做到这一点": "To achieve this",
+ "他在生产中不仅占有一种纯粹个人的地位": "He occupies not only a purely individual position in production",
+ "这个曾经仿佛用法术创造了如此庞大的生产资料和交换手段的现代资产阶级社会": "This modern bourgeois society that once seemed to have magically created such vast means of production and exchange",
+ "而一切阶级斗争都是政治斗争": "And all class struggles are political struggles",
+ "在他们的统治下并没有出现过现代的无产阶级": "The modern proletariat did not emerge under their rule",
+ "因为同17世纪的英国和18世纪的法国相比": "Because compared to 17th century England and 18th century France",
+ "晶莹剔透;两片圆柱形的叶子": "Crystal clear; two cylindrical leaves",
+ "调用SocialAdvice生成一些社交建议": "Invoke SocialAdvice to generate some social suggestions",
+ "无产阶级不仅人数增加了": "The proletariat has not only increased in number",
+ "资产阶级用来推翻封建制度的武器": "The weapons the bourgeoisie used to overthrow the feudal system",
+ "农业中的宗法经济": "Patriarchal economy in agriculture",
+ "是一个阶级用以压迫另一个阶级的有组织的暴力": "Is organized violence used by one class to oppress another class",
+ "不如说是因为它产生了革命的无产阶级": "Rather, it is because it produced a revolutionary proletariat",
+ "资产阶级在它已经取得了统治的地方把一切封建的、宗法的和田园般的关系都破坏了": "The bourgeoisie has destroyed all feudal, patriarchal, and idyllic relations in the places where it has already established its rule",
+ "把一切民族甚至最野蛮的民族都卷到文明中来了": "Has drawn all nations, even the most barbaric, into civilization",
+ "消灭阶级本身的存在条件": "Abolish the very conditions for the existence of classes",
+ "艾莉亚·史塔克": "Arya Stark",
+ "“宗教的、道德的、哲学的、政治的、法的观念等等在历史发展的进程中固然是不断改变的": "The concepts of religion, morality, philosophy, politics, law, etc., certainly change continuously in the process of historical development",
+ "而每一次斗争的结局都是整个社会受到革命改造或者斗争的各阶级同归于尽": "And the outcome of each struggle is either a revolutionary transformation of society or the mutual destruction of the contending classes",
+ "共产主义已经被欧洲的一切势力公认为一种势力;": "Communism has been recognized by all forces in Europe as a power;",
+ "在所有这些运动中": "In all these movements",
+ "轮船的行驶": "The navigation of the ship",
+ "因而对工人也失去了任何吸引力": "Thus lost any appeal to workers",
+ "他们就不得不呼吁资产阶级发善心和慷慨解囊": "They had to appeal to the bourgeoisie for kindness and generosity",
+ "个性被消灭了": "Individuality has been eliminated",
+ "不外是资产者、资产阶级私有者": "Nothing more than capitalists, bourgeois private owners",
+ "正在召回知识": "Recalling knowledge",
+ "茎和花无毛": "Stems and flowers are hairless",
+ "创办单个的法伦斯泰尔": "Establishing a single Falun Steel",
+ "这样就产生了封建的社会主义": "This has produced feudal socialism",
+ "才能运动起来": "Can move into action",
+ "人的活动能够取得什么样的成就": "What achievements human activities can attain",
+ "所以具有一定的观赏价值": "Therefore has certain aesthetic value",
+ "你们共产党人是要实行公妻制的啊": "You communists are going to implement communal marriage",
+ "反对婚姻": "Opposing marriage",
+ "无产阶级的运动是绝大多数人的、为绝大多数人谋利益的独立的运动": "The movement of the proletariat is an independent movement for the interests of the vast majority of people",
+ "交互对生": "Mutual interaction for life",
+ "永远的不安定和变动": "Eternal instability and change",
+ "随着工业、商业、航海业和铁路的扩展": "With the expansion of industry, commerce, shipping, and railways",
+ "无产者在这个革命中失去的只是锁链": "The proletariat loses only its chains in this revolution",
+ "虹之玉锦": "Rainbow jade brocade",
+ "更有力": "More powerful",
+ "观赏价值很高": "High aesthetic value",
+ "因而丝毫不会改变资本和雇佣劳动的关系": "Thus will not change the relationship between capital and wage labor in the slightest",
+ "碧光环的繁殖方式有扦插和播种": "The propagation methods of the green halo include cuttings and sowing",
+ "除了冷酷无情的“现金交易”": "Except for the cold and ruthless 'cash transaction'",
+ "两者都要随着资本的消失而消失": "Both will disappear with the disappearance of capital",
+ "社会主义的资产者愿意要现代社会的生存条件": "Socialist capitalists are willing to accept the conditions for survival in modern society",
+ "巴贝夫等人的著作": "The works of Babeuf and others",
+ "在当前同资产阶级对立的一切阶级中": "Among all classes currently opposed to the bourgeoisie",
+ "资产阶级的生产关系和交换关系": "The production and exchange relations of the bourgeoisie",
+ "小花黄色": "Small yellow flowers",
+ "都不值得详细讨论了": "Are not worth discussing in detail",
+ "共产党就同它一起去反对专制君主制、封建土地所有制和小市民的反动性": "The Communist Party opposes autocratic monarchy, feudal land ownership, and the reactionary nature of the petty bourgeoisie.",
+ "在18世纪的德国哲学家看来": "In the view of 18th-century German philosophers.",
+ "是说我们要消灭那种以社会上的绝大多数人没有财产为必要条件的所有制": "It means we must eliminate the ownership that requires the vast majority of people in society to be propertyless.",
+ "忌强光暴晒": "Avoid strong sunlight exposure.",
+ "——资产阶级用什么办法来克服这种危机呢": "— How does the bourgeoisie overcome this crisis?",
+ "它使人和人之间除了赤裸裸的利害关系": "It reduces relationships between people to nothing but bare self-interest.",
+ "他们的子女越是由于这种发展而被变成单纯的商品和劳动工具": "Their children are increasingly turned into mere commodities and tools of labor due to this development.",
+ "叶插的繁殖成功率不高": "The success rate of propagation through leaf cuttings is not high.",
+ "碧光环小巧饱满、圆滚滚的样子很可爱": "The small, plump, and round appearance of the jade ring is very cute.",
+ "他们称之为“行动的哲学”、”真正的社会主义”、“德国的社会主义科学”、“社会主义的哲学论证”": "They call it 'philosophy of action', 'true socialism', 'German socialist science', 'philosophical argument for socialism'.",
+ "从这个意义上说": "In this sense.",
+ "共产党人同其他无产阶级政党不同的地方只是": "The difference between communists and other proletarian parties is only.",
+ "因而使很大一部分居民脱离了农村生活的愚昧状态": "Thus, it has led a large portion of the population to escape the ignorance of rural life.",
+ "但是不要无产阶级": "But do not want the proletariat.",
+ "你们说的是现代的资产阶级的私有财产吧": "You are referring to the private property of the modern bourgeoisie, right?",
+ "工人仅仅为增殖资本而活着": "Workers live only to increase capital.",
+ "生长期要见干见湿": "During the growth period, it needs to be dry and wet.",
+ "是在封建社会里造成的": "It was created in feudal society.",
+ "sk-proj-xx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxx-xxx啊xxxxxxx": "sk-proj-xx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxx-xxx ah xxxxxxx.",
+ "尽管形形色色、千差万别": "Despite the various forms and differences.",
+ "它宣布德意志民族是模范的民族": "It declares the German nation to be a model nation.",
+ "他们责备资产阶级": "They blame the bourgeoisie.",
+ "工人变成赤贫者": "Workers become destitute.",
+ "多用枝插": "Use more branch cuttings.",
+ "在他们心目中就是纯粹的意志、本来的意志、真正人的意志的规律": "In their minds, it is the law of pure will, original will, and the will of true humanity.",
+ "——所有这些主张都只是表明要消灭阶级对立": "— All these claims merely indicate the need to eliminate class opposition.",
+ "它差不多是一向就有的": "It has almost always existed.",
+ "也是一种商品": "It is also a commodity.",
+ "茎绿色": "The stem is green.",
+ "他们还总是梦想用试验的办法来实现自己的社会空想": "They always dream of realizing their social utopia through experimental methods.",
+ "这种占有并不会留下任何剩余的东西使人们有可能支配别人的劳动": "This kind of possession does not leave any surplus that allows people to control the labor of others.",
+ "中世纪的市民靠乡间小道需要几百年才能达到的联合": "The union that medieval citizens could only achieve after hundreds of years through country paths.",
+ "同时又是空想的": "At the same time, it is also utopian",
+ "省略": "Omission",
+ "无产者组织成为阶级": "The proletariat organizes into a class",
+ "所以这些发明家也不可能看到无产阶级解放的物质条件": "Therefore, these inventors cannot foresee the material conditions for the liberation of the proletariat",
+ "使工资几乎到处都降到同样低的水平": "Causing wages to drop to the same low level almost everywhere",
+ "法国的社会主义和共产主义的文献就这样被完全阉割了": "The literature of socialism and communism in France has thus been completely emasculated",
+ "在波兰人中间": "Among the Poles",
+ "资产阶级的灭亡和无产阶级的胜利是同样不可避免的": "The demise of the bourgeoisie and the victory of the proletariat are equally inevitable",
+ "人们至多只能责备共产党人": "People can at most blame the communists",
+ "也就不再有雇佣劳动了": "There will no longer be wage labor",
+ "总是不仅有很大一部分制成的产品被毁灭掉": "There is always a large portion of manufactured products that are destroyed",
+ "这并不是把个人财产变为社会财产": "This does not mean turning personal property into social property",
+ "从而恢复旧的所有制关系和旧的社会": "Thus restoring the old property relations and the old society",
+ "我们决不打算消灭这种供直接生命再生产用的劳动产品的个人占有": "We do not intend to abolish personal ownership of labor products that are used for direct reproduction of life",
+ "再容纳不了它本身所造成的财富了": "It can no longer accommodate the wealth it itself has created",
+ "即掌握着未来的阶级": "That is, the class that holds the future",
+ "几乎只限于维持工人生活和延续工人后代所必需的生活资料": "Almost limited to the means of living necessary to sustain workers' lives and the continuation of workers' descendants",
+ "她梦想成为一位淑女": "She dreams of becoming a lady",
+ "成功添加": "Successfully added",
+ "因叶子有棱有角": "Because the leaves are jagged and angular",
+ "由此可以明显地看出": "It can be clearly seen from this",
+ "是资本的形成和增殖;资本的条件是雇佣劳动": "It is the formation and proliferation of capital; the condition of capital is wage labor",
+ "自由买卖也就会消失": "Free trade will also disappear",
+ "这种人不属于任何阶级": "Such people do not belong to any class",
+ "就越失去任何实践意义和任何理论根据": "The more it loses any practical significance and any theoretical basis",
+ "你们是承认": "You acknowledge",
+ "他是临冬城的公爵": "He is the Duke of Winterfell",
+ "既然“真正的”社会主义就这样成了这些政府对付德国资产阶级的武器": "Since 'true' socialism has thus become a weapon for these governments against the German bourgeoisie",
+ "而是来自极其遥远的地区的原料;它们的产品不仅供本国消费": "But rather raw materials from extremely distant regions; their products are not only for domestic consumption",
+ "以及占统治地位的社会本身中的瓦解因素的作用": "As well as the role of disintegrating factors within the dominant society itself",
+ "是说我们要消灭你们的那种所有制": "That is to say, we want to abolish your type of property",
+ "前面我们已经看到": "We have already seen earlier",
+ "封建贵族并不是被资产阶级所推翻的、其生活条件在现代资产阶级社会里日益恶化和消失的唯一阶级": "The feudal nobility is not the only class that has been overthrown by the bourgeoisie; its living conditions have increasingly deteriorated and disappeared in modern bourgeois society.",
+ "并且一次比一次更强大": "And it is becoming stronger each time.",
+ "无产阶级却是大工业本身的产物": "The proletariat, however, is a product of large-scale industry itself.",
+ "但是他们的信徒总是组成一些反动的宗派": "But their followers always form some reactionary sects.",
+ "资产阶级和无产阶级": "The bourgeoisie and the proletariat.",
+ "被新的、要靠极其遥远的国家和地带的产品来满足的需要所代替了": "Replaced by new needs that must be satisfied by products from extremely distant countries and regions.",
+ "叶片形似小熊的脚掌": "The leaves resemble the paws of a small bear.",
+ "它确凿地证明了机器和分工的破坏作用、资本和地产的积聚、生产过剩、危机、小资产者和小农的必然没落、无产阶级的贫困、生产的无政府状态、财富分配的极不平均、各民族之间的毁灭性的工业战争": "It conclusively proves the destructive effects of machinery and division of labor, the accumulation of capital and land, overproduction, crises, the inevitable decline of small capitalists and small farmers, the poverty of the proletariat, the anarchic state of production, the extremely uneven distribution of wealth, and the destructive industrial wars between nations.",
+ "消灭家庭": "Abolition of the family.",
+ "其中一部分是法国式的民主社会主义者": "Some of them are French-style democratic socialists.",
+ "压迫者和被压迫者": "Oppressors and the oppressed.",
+ "不过": "However.",
+ "无产阶级的逐步组织成为阶级要由一种特意设计出来的社会组织来代替": "The gradual organization of the proletariat into a class must be replaced by a specially designed social organization.",
+ "虹之玉锦一般会有粉红色、中绿色等": "Rainbow satin typically comes in colors like pink and medium green.",
+ "不过他们忘记了": "However, they have forgotten.",
+ "艾德·史塔克": "Eddard Stark.",
+ "而是保守的": "But rather conservative.",
+ "他们必须摧毁至今保护和保障私有财产的一切": "They must destroy everything that protects and guarantees private property until now.",
+ "是建立在资本上面": "It is built on capital.",
+ "是再容易不过了": "It couldn't be easier.",
+ "认为这种运动只是由于盲目地不相信新福音才发生的": "Believing that this movement occurred solely due to a blind disbelief in the new gospel.",
+ "7、按照总的计划增加国家工厂和生产工具": "7. Increase state factories and production tools according to the overall plan.",
+ "它使阶级对立简单化了": "It has simplified class antagonism.",
+ "虽然这些体系的创始人在许多方面是革命的": "Although the founders of these systems are revolutionary in many respects.",
+ "它反对资产阶级的斗争是和它的存在同时开始的": "Its struggle against the bourgeoisie began simultaneously with its existence.",
+ "而且只有当他们的劳动增殖资本的时候才能找到工作": "And they can only find work when their labor increases capital.",
+ "这种曾经郑重其事地看待自己那一套拙劣的小学生作业并且大言不惭地加以吹嘘的德国社会主义": "This German socialism, which once took its own set of poor student assignments seriously and shamelessly boasted about them.",
+ "并向他叽叽咕咕地说一些或多或少凶险的预言": "And muttered some more or less ominous prophecies to him.",
+ "每个人的自由发展是一切人的自由发展的条件": "The free development of each is the condition for the free development of all.",
+ "在无产阶级和资产阶级的斗争所经历的各个发展阶段上": "In all the stages of development experienced in the struggle between the proletariat and the bourgeoisie.",
+ "一步一步地夺取资产阶级的全部资本": "Step by step, seize all the capital of the bourgeoisie.",
+ "工人领到了用现钱支付的工资的时候": "When the workers receive wages paid in cash.",
+ "你们既然用你们资产阶级关于自由、教育、法等等的观念来衡量废除资产阶级所有制的主张": "Since you measure the proposal to abolish bourgeois private property with your bourgeois concepts of freedom, education, law, etc.",
+ "当基督教思想在18世纪被启蒙思想击败的时候": "When Christian thought was defeated by Enlightenment thought in the 18th century.",
+ "而代表人的本质的利益": "And represent the essential interests of people.",
+ "用以塑造无产阶级的运动": "Used to shape the movement of the proletariat.",
+ "现代的、资产阶级的家庭是建立在什么基础上的呢": "What is the foundation of the modern bourgeois family?",
+ "而是一种社会力量": "But rather a social force.",
+ "一方面": "On one hand.",
+ "人们的意识": "People's consciousness.",
+ "我们几乎到处都可以看到社会完全划分为各个不同的等级": "We can almost see society completely divided into different ranks everywhere.",
+ "共产主义革命就是同传统的所有制关系实行最彻底的决裂;毫不奇怪": "The communist revolution is the most thorough break with traditional property relations; it is not surprising.",
+ "你们的观念本身是资产阶级的生产关系和所有制关系的产物": "Your concepts themselves are products of bourgeois production relations and property relations.",
+ "正像你们的法不过是被奉为法律的你们这个阶级的意志一样": "Just as your laws are merely the will of your class sanctified as law.",
+ "该种原产于南非开普省": "This type originated in the Cape Province of South Africa.",
+ "资产阶级除非对生产工具": "The bourgeoisie, unless it is about the means of production.",
+ "他有预知未来的能力": "He has the ability to foresee the future.",
+ "现代的资产阶级正是他们的社会制度的必然产物": "The modern bourgeoisie is the inevitable product of their social system.",
+ "即无产者": "That is, the proletariat.",
+ "但是不要由这些条件必然产生的斗争和危险": "But do not let the struggles and dangers that necessarily arise from these conditions.",
+ "至多只能减少资产阶级的统治费用和简化它的财政管理": "At most, it can only reduce the ruling costs of the bourgeoisie and simplify its financial management.",
+ "市场总是在扩大": "The market is always expanding.",
+ "我的妹妹": "My sister.",
+ "易群生": "Yi Qunsheng.",
+ "懒惰之风就会兴起": "The wind of laziness will rise.",
+ "例如在法国": "For example, in France.",
+ "在中世纪深受反动派称许的那种人力的野蛮使用": "The barbaric use of human labor that was highly praised by reactionaries in the Middle Ages.",
+ "在工商业不很发达的国家里": "In countries where industry and commerce are not very developed.",
+ "披针形或卵形": "Needle-shaped or oval-shaped.",
+ "我们循序探讨了现存社会内部或多或少隐蔽着的国内战争": "We have sequentially explored the more or less hidden domestic wars within existing society.",
+ "她对我态度冷淡": "She was cold towards me.",
+ "熊童子": "Bear child.",
+ "由于无产阶级解放的物质条件还没具备": "Due to the material conditions for the liberation of the proletariat not yet being in place.",
+ "共产党人把自己的主要注意力集中在德国": "Communists focus their main attention on Germany.",
+ "原来意义上的政治权力": "Political power in its original sense",
+ "即小工业家、小商人、手工业者、农民": "namely small industrialists, small merchants, artisans, and farmers",
+ "使一切国家的生产和消费都成为世界性的了": "has made the production and consumption of all countries global",
+ "迫使他们用法律形式承认工人的个别利益": "forces them to legally recognize the individual interests of workers",
+ "一切等级的和固定的东西都烟消云散了": "All hierarchies and fixed structures have vanished",
+ "正式的卖淫更不必说了": "Formal prostitution goes without saying",
+ "正是因为私有财产对十分之九的成员来说已经不存在": "precisely because private property has ceased to exist for nine-tenths of its members",
+ "在资产阶级社会里": "In bourgeois society",
+ "碧光环叶表面有半透明的颗粒感": "The surface of the green halo leaves has a translucent granularity",
+ "如果不就内容而就形式来说": "If we speak in terms of form rather than content",
+ "现代资产者": "modern capitalists",
+ "都可以归结为这样一个同义反复": "can all be reduced to this tautology",
+ "在商业危机期间": "During commercial crises",
+ "调用RemoveFriend": "Call RemoveFriend",
+ "在那里": "There",
+ "而革命的法国资产阶级的意志的表现": "and the expression of the will of the revolutionary French bourgeoisie",
+ "古老的民族工业被消灭了": "The old national industries have been destroyed",
+ "把一切生产工具集中在国家即组织成为统治阶级的无产阶级手里": "concentrating all means of production in the hands of the state, which is organized as the ruling class of the proletariat",
+ "在他们看来": "In their view",
+ "1.反动的社会主义": "1. Reactionary socialism",
+ "2、征收高额累进税": "2. Levying high progressive taxes",
+ "他们不是革命的": "They are not revolutionary",
+ "唱唱诅咒他们的新统治者的歌": "singing songs cursing their new rulers",
+ "繁殖方法有扦插": "Propagation methods include cuttings",
+ "萌萌的样子让人爱不释手": "The cute appearance makes people unable to put it down",
+ "正在清空": "is being emptied",
+ "虽然完全不是资产阶级所理解的那种意思": "although it is completely different from what the bourgeoisie understands",
+ "旧社会内部的所有冲突在许多方面都促进了无产阶级的发展": "All conflicts within the old society have, in many ways, facilitated the development of the proletariat",
+ "这种家庭只是在资产阶级那里才以充分发展的形式存在着": "This type of family only exists in a fully developed form among the bourgeoisie",
+ "使财产聚集在少数人的手里": "concentrating property in the hands of a few",
+ "原封不动地保持旧的生产方式": "maintaining the old modes of production unchanged",
+ "第一次法国革命的要求": "The demands of the First French Revolution",
+ "它已经受到这种关系的阻碍;而它一着手克服这种障碍": "It has been hindered by this relationship; and as soon as it begins to overcome this obstacle",
+ "工人变成了机器的单纯的附属品": "Workers have become mere appendages to machines",
+ "现代工业已经把家长式的师傅的小作坊变成了工业资本家的大工厂": "Modern industry has transformed the paternalistic master's small workshop into large factories owned by industrial capitalists",
+ "资本具有独立性和个性": "Capital has independence and individuality",
+ "您的 API_KEY": "Your API_KEY",
+ "对工人阶级来说": "For the working class",
+ "只要有了这种联系": "As long as there is this connection",
+ "就是要消灭人们最亲密的关系": "It is to eliminate the most intimate relationships among people",
+ "生活资料太多": "There is an excess of means of livelihood",
+ "联合的行动": "Collective action",
+ "消灭私人营利": "Abolish private profit",
+ "无法理解用户意图": "Unable to understand user intentions",
+ "一切神圣的东西都被亵渎了": "All sacred things have been desecrated",
+ "在这一切斗争中": "In all this struggle",
+ "它无情地斩断了把人们束缚于天然尊长的形形色色的封建羁绊": "It ruthlessly cuts the various feudal ties that bind people to their natural superiors",
+ "圣西门、傅立叶、欧文等人的体系": "The systems of Saint-Simon, Fourier, Owen, and others",
+ "无产者的一切家庭联系越是由于大工业的发展而被破坏": "The family ties of the proletariat are increasingly destroyed by the development of large industry",
+ "在过去的各个历史时代": "In all past historical eras",
+ "性格独立坚强": "Strong and independent character",
+ "以便德国工人能够立刻利用资产阶级统治所必然带来的社会的和政治的条件作为反对资产阶级的武器": "So that German workers can immediately use the social and political conditions inevitably brought about by bourgeois rule as weapons against the bourgeoisie",
+ "共产党人强调和坚持整个无产阶级共同的不分民族的利益;另一方面": "Communists emphasize and uphold the common interests of the entire proletariat, regardless of nationality; on the other hand",
+ "不过因为年龄和性别的不同而需要不同的费用罢了": "It only requires different costs due to differences in age and gender",
+ "资产阶级抹去了一切向来受人尊崇和令人敬畏的职业的神圣光环": "The bourgeoisie has erased the sacred aura of all professions that were once respected and revered",
+ "对生的叶片呈短棒状": "The living blades are short and stick-like",
+ "资产者的家庭自然会随着它的这种补充的消失而消失": "The families of the capitalists will naturally disappear with the disappearance of this supplement",
+ "在瑞士": "In Switzerland",
+ "自然力的征服": "The conquest of natural forces",
+ "他们胜过其余无产阶级群众的地方在于他们了解无产阶级运动的条件、进程和一般结果": "Where they surpass the rest of the proletarian masses is in their understanding of the conditions, processes, and general outcomes of the proletarian movement",
+ "——而为了建造这一切空中楼阁": "——And in order to build all these castles in the air",
+ "这个阶级胆战心惊地从资产阶级的工业统治和政治统治那里等候着无可幸免的灭亡": "This class anxiously awaits its inevitable demise from the industrial and political rule of the bourgeoisie",
+ "叶端具红色爪样齿": "The leaf tips have red claw-like teeth",
+ "这一部分人包括": "This part of the people includes",
+ "分析应该调用哪个工具函数": "Which tool function should be called for analysis",
+ "在一些地方组成独立的城市共和国": "Form independent city-states in some places",
+ "它的商品的低廉价格": "The low prices of its goods",
+ "而且占有一种社会地位": "And occupies a certain social status",
+ "匙状长圆形;茎生叶互生": "Spoon-shaped and elongated; leaves alternate on the stem",
+ "是同它的生产费用相等的": "Is equal to its production costs",
+ "为了有可能压迫一个阶级": "In order to possibly oppress a class",
+ "资产者之为资产者": "The essence of capitalists as capitalists",
+ "物种索引": "Species index",
+ "以前的中间等级的下层": "The lower levels of the former middle class",
+ "德国将在整个欧洲文明更进步的条件下": "Germany will be under more progressive conditions of European civilization",
+ "当古代世界走向灭亡的时候": "When the ancient world is heading towards extinction",
+ "民族对民族的剥削就会随之消灭": "Exploitation of one nation by another will consequently disappear",
+ "由此必然产生的结果就是政治的集中": "The inevitable result of this is political centralization",
+ "发生一种在过去一切时代看来都好像是荒唐现象的社会瘟疫": "A social plague that seems absurd in all past eras occurs",
+ "也就消灭了阶级对立的存在条件": "And thus eliminates the conditions for class opposition",
+ "工业的进步把统治阶级的整批成员抛到无产阶级队伍里去": "The progress of industry throws a whole batch of ruling class members into the proletariat",
+ "在阶级斗争接近决战的时期": "In the period when class struggle approaches a decisive battle",
+ "各国共产党人集会于伦敦": "Communists from various countries gather in London",
+ "资产者是把自己的妻子看作单纯的生产工具的": "Capitalists view their wives merely as production tools",
+ "就其内容来说必然是反动的": "In terms of its content, it is inevitably reactionary",
+ "资产阶级的关系已经太狭窄了": "The relationships of the bourgeoisie have become too narrow",
+ "不再能变为可以垄断的社会力量的时候起": "When it can no longer become a monopolizable social force",
+ "当时资产阶级为了达到自己的政治目的必须而且暂时还能够把整个无产阶级发动起来": "At that time, the bourgeoisie must and can temporarily mobilize the entire proletariat to achieve its political goals",
+ "从而组织成为政党这件事": "Thus organizing into a political party",
+ "即变成资产者": "That is, to become capitalists",
+ "而是同自己的敌人的敌人作斗争": "But rather to fight against the enemy of their enemy",
+ "见《资产阶级和无产阶级》": "See 'The Bourgeoisie and the Proletariat'",
+ "只有无产阶级是真正革命的阶级": "Only the proletariat is the truly revolutionary class",
+ "代替了工业的中间等级": "Replaced the middle class of industry",
+ "也像我们的资产阶级的其他一切关于自由的大话一样": "Just like all the other grand words about freedom from our bourgeoisie",
+ "一方面不得不消灭大量生产力": "On one hand, must eliminate a large amount of productive forces",
+ "因为它不得不让自己的奴隶落到不能养活它反而要它来养活的地步": "Because it has to let its slaves fall to the point where they cannot support it, but instead have to support it.",
+ "密生白色短毛": "Dense white short hair.",
+ "调和对立": "Harmonizing contradictions.",
+ "但是": "But.",
+ "他们没有任何同整个无产阶级的利益不同的利益": "They have no interests different from those of the entire proletariat.",
+ "都演过这出戏": "Have all played this role.",
+ "这种反对阶级斗争的幻想": "This fantasy against class struggle.",
+ "在这种占有下": "Under this possession.",
+ "他们同资产阶级作斗争": "They struggle against the bourgeoisie.",
+ "统治阶级内部的、整个旧社会内部的瓦解过程": "The process of disintegration within the ruling class and the entire old society.",
+ "一般可用泥炭土、蛭石和珍珠岩的混合土": "Generally, a mixture of peat, vermiculite, and perlite can be used.",
+ "无产阶级即现代工人阶级也在同一程度上得到发展;现代的工人只有当他们找到工作的时候才能生存": "The proletariat, that is, the modern working class, also develops to the same extent; modern workers can only survive when they find work.",
+ "它就越是可鄙、可恨和可恶": "The more it is despicable, hateful, and abominable.",
+ "这些著作抨击现存社会的全部基础": "These works criticize the entire foundation of the existing society.",
+ "马上就有资产阶级中的另一部分人——房东、小店主、当铺老板等等向他们扑来": "Immediately, another part of the bourgeoisie—landlords, small shopkeepers, pawnbrokers, etc.—rushes towards them.",
+ "而且攻击生产工具本身;他们毁坏那些来竞争的外国商品": "And they attack the means of production itself; they destroy those foreign goods that come to compete.",
+ "其他情形一律不适用": "Other situations do not apply.",
+ "资产阶级处于不断的斗争中": "The bourgeoisie is in constant struggle.",
+ "德国的哲学家、半哲学家和美文学家": "German philosophers, semi-philosophers, and literary figures.",
+ "由于他们本身的生活状况": "Due to their own living conditions.",
+ "资产阶级揭示了": "The bourgeoisie reveals.",
+ "它创立了巨大的城市": "It has created vast cities.",
+ "提倡社会和谐": "Advocating social harmony.",
+ "代替那存在着阶级和阶级对立的资产阶级旧社会的": "Replacing the old bourgeois society where classes and class antagonisms exist.",
+ "要给基督教禁欲主义涂上一层社会主义的色彩": "To paint Christian asceticism with a layer of socialist color.",
+ "它迫使一切民族——如果它们不想灭亡的话——采用资产阶级的生产方式;它迫使它们在自己那里推行所谓的文明": "It forces all nations—if they do not want to perish—to adopt the bourgeois mode of production; it forces them to implement what is called civilization in their own territories.",
+ "才是有意义的": "Is meaningful.",
+ "人民群众非但一无所得": "The masses of people gain nothing.",
+ "基督教的社会主义": "Christian socialism.",
+ "最初反对贵族;后来反对同工业进步有利害冲突的那部分资产阶级;经常反对一切外国的资产阶级": "Initially opposed to the nobility; later opposed to that part of the bourgeoisie that has conflicts of interest with industrial progress; often opposed to all foreign bourgeoisie.",
+ "在古罗马": "In ancient Rome.",
+ "而且它结合成更大的集体": "And it combines into a larger collective.",
+ "该分支仅适用于不支持stream的o1模型": "This branch is only applicable to the o1 model that does not support streams.",
+ "以便创造这些条件": "In order to create these conditions.",
+ "锯叶石莲为石莲的变种": "The saw-leaved stone lotus is a variety of the stone lotus.",
+ "从宗教的、哲学的和一切意识形态的观点对共产主义提出的种种责难": "Various criticisms of communism from religious, philosophical, and all ideological perspectives.",
+ "根本不存在于现实界": "Does not exist at all in the real world.",
+ "决不能剥夺他们所没有的东西": "Must not deprive them of what they do not have.",
+ "因为它甚至不能保证自己的奴隶维持奴隶的生活": "Because it cannot even guarantee that its own slaves maintain a slave's life.",
+ "他们还以互相诱奸妻子为最大的享乐": "They also take mutual seduction of each other's wives as their greatest pleasure.",
+ "这些意识形式": "These forms of consciousness.",
+ "再不能把自己阶级的生存条件当作支配一切的规律强加于社会了": "Can no longer impose the conditions of their class's existence as the law governing everything on society.",
+ "现在像一个魔法师一样不能再支配自己用法术呼唤出来的魔鬼了": "Now, like a magician, they can no longer control the demons they have summoned with their spells.",
+ "它们提供了启发工人觉悟的极为宝贵的材料": "They provide extremely valuable material for enlightening workers' consciousness.",
+ "反之": "On the contrary.",
+ "通过示范的力量来为新的社会福音开辟道路": "To pave the way for a new social gospel through the power of demonstration.",
+ "这样就形成了小资产阶级的社会主义": "This formed the socialism of the petty bourgeoisie.",
+ "夏季温度过高会休眠": "Excessively high summer temperatures will cause dormancy.",
+ "一哄而散": "Scattered in a rush.",
+ "用英文、法文、德文、意大利文、弗拉芒文和丹麦文公布于世": "Published in English, French, German, Italian, Flemish, and Danish.",
+ "被各民族的各方面的互相往来和各方面的互相依赖所代替了": "Replaced by the various interactions and interdependencies of different nations.",
+ "伊格瑞特": "Igret.",
+ "它创造了完全不同于埃及金字塔、罗马水道和哥特式教堂的奇迹;它完成了完全不同于民族大迁徙和十字军征讨的远征": "It created wonders completely different from the Egyptian pyramids, Roman aqueducts, and Gothic cathedrals; it accomplished expeditions entirely different from the great migrations of peoples and the Crusades.",
+ "共产党一分钟也不忽略教育工人尽可能明确地意识到资产阶级和无产阶级的敌对的对立": "The Communist Party does not neglect to educate workers to be as clear as possible about the antagonistic opposition between the bourgeoisie and the proletariat.",
+ "烧毁工厂": "Burn down factories.",
+ "——这是什么缘故呢": "—What is the reason for this?",
+ "在生长初期像兔耳": "In the early stages of growth, like rabbit ears.",
+ "喜温暖干燥": "Prefers warm and dry conditions.",
+ "工业和商业太发达": "Industry and commerce are too developed.",
+ "布兰·史塔克": "Bran Stark.",
+ "代之以资产阶级的所有制": "Replaced by bourgeois ownership.",
+ "它们关于未来社会的积极的主张": "Their positive propositions about future society.",
+ "阶级斗争越发展和越具有确定的形式": "As class struggle develops and takes on more definite forms.",
+ "是生产方式和交换方式的一系列变革的产物": "Is a product of a series of changes in the modes of production and exchange.",
+ "调用AddMultiFriends把联系人添加到数据库": "Call AddMultiFriends to add contacts to the database",
+ "从个人财产不再能变为资产阶级财产的时候起": "From the moment personal property can no longer become bourgeois property",
+ "而这种意志的内容是由你们这个阶级的物质生活条件决定的": "And the content of this will is determined by the material living conditions of your class",
+ "罗柏·史塔克": "Robb Stark",
+ "通风良好的环境": "Well-ventilated environment",
+ "三、社会主义的和共产主义的文献": "III. Literature of Socialism and Communism",
+ "否则就不能生存下去": "Otherwise, it cannot survive",
+ "保存这个小资产阶级": "Preserve this petty bourgeoisie",
+ "当人们谈到使整个社会革命化的思想时": "When people talk about the idea of revolutionizing the entire society",
+ "性喜欢凉爽通风、日照充足的环境": "Sexually prefer a cool, well-ventilated, and sunny environment",
+ "由于阶级斗争不发展": "Due to the lack of development in class struggle",
+ "但是并不因此放弃对那些从革命的传统中承袭下来的空谈和幻想采取批判态度的权利": "But this does not give up the right to take a critical attitude towards the empty talk and fantasies inherited from revolutionary traditions",
+ "使商业、航海业和工业空前高涨": "Causing commerce, shipping, and industry to flourish unprecedentedly",
+ "而是要废除资产阶级的所有制": "But rather to abolish bourgeois ownership",
+ "在法国人对资产阶级国家的批判下面写上所谓“抽象普遍物的统治的扬弃”": "Under the French critique of the bourgeois state, write the so-called 'abolition of the rule of abstract universal commodities'",
+ "驱使资产阶级奔走于全球各地": "Forcing the bourgeoisie to rush around the globe",
+ "所有这些对共产主义的物质产品的占有方式和生产方式的责备": "All these accusations against the ways of possessing and producing material products of communism",
+ "至少是各文明国家的联合的行动": "At least a united action of all civilized nations",
+ "直到这个战争爆发为公开的革命": "Until this war breaks out as an open revolution",
+ "企图以此来巩固它们已获得的生活地位": "Attempting to consolidate their already acquired living status",
+ "做一个资本家": "To be a capitalist",
+ "这种对未来社会的幻想的描绘": "This depiction of fantasies about future society",
+ "阶级的教育的终止在他们看来就等于一切教育的终止": "The termination of class education, in their view, equals the termination of all education",
+ "我们来看看雇佣劳动": "Let's take a look at wage labor",
+ "至今的一切社会都是建立在压迫阶级和被压迫阶级的对立之上的": "All societies to date are built on the opposition between the oppressing class and the oppressed class",
+ "由于他们的整个生活状况": "Due to their entire living conditions",
+ "就达到非常强烈、非常尖锐的程度": "Reaching a very intense and sharp degree",
+ "它不是提倡用行善和求乞、独身和禁欲、修道和礼拜来代替这一切吗": "Isn't it advocating to replace all this with doing good, begging, celibacy, asceticism, monasticism, and worship?",
+ "它用公开的、无耻的、直接的、露骨的剥削代替了由宗教幻想和政治幻想掩盖着的剥削": "It replaces the exploitation covered by religious and political fantasies with open, shameless, direct, and blatant exploitation",
+ "有欧文主义者反对宪章派": "There are Owenites opposing the Charterists",
+ "对话记忆中": "In the memory of dialogue",
+ "如果说无产阶级在反对资产阶级的斗争中一定要联合为阶级": "If the proletariat must unite as a class in the struggle against the bourgeoisie",
+ "使东方从属于西方": "Make the East subordinate to the West",
+ "这种发展又反过来促进了工业的扩展": "This development in turn promotes the expansion of industry",
+ "与其说是因为它产生了无产阶级": "Rather than because it produced the proletariat",
+ "反对国家吗": "Oppose the state?",
+ "商品的价格": "The price of goods",
+ "把这种关系变成了纯粹的金钱关系": "Turn this relationship into a purely monetary relationship",
+ "这难道需要经过深思才能了解吗": "Does this require deep thought to understand?",
+ "它的力量日益增长": "Its power is growing increasingly",
+ "雇佣劳动完全是建立在工人的自相竞争之上的": "Wage labor is entirely based on the competition among workers",
+ "其实": "In fact",
+ "有人还责备共产党人": "Some even blame the communists",
+ "至今一切社会的历史都是阶级斗争的历史": "To this day, the history of all societies is the history of class struggles",
+ "还存在着一切社会状态所共有的永恒真理": "There still exists an eternal truth common to all social conditions",
+ "就可以了解共产党人同已经形成的工人政党的关系": "One can understand the relationship between communists and the already formed workers' parties",
+ "繁殖方式一般为扦插繁殖": "The propagation method is generally cuttings",
+ "自然是用小资产阶级和小农的尺度去批判资产阶级制度的": "Naturally, it criticizes the bourgeois system using the standards of the petty bourgeoisie and small farmers",
+ "石莲": "Stone lotus",
+ "已经积累起来的劳动只是扩大、丰富和提高工人的生活的一种手段": "The accumulated labor is merely a means to expand, enrich, and elevate the lives of workers",
+ "16世纪遗留下来的、从那时起经常以不同形式重新出现的小资产阶级": "The petty bourgeoisie left over from the 16th century, which has frequently reappeared in different forms since then",
+ "而站到无产阶级的立场上来": "And stand from the perspective of the proletariat",
+ "斗争爆发为起义": "The struggle erupts as an uprising",
+ "只有在不断产生出新的雇佣劳动来重新加以剥削的条件下才能增殖的财产": "Property that can only proliferate under conditions of continuously generating new wage labor for re-exploitation",
+ "转到无产阶级方面来了": "Has shifted to the proletariat's side",
+ "它使人口密集起来": "It densifies the population",
+ "现在资产阶级中也有一部分人": "Now there are also some people in the bourgeoisie",
+ "福娘原产于非洲西南部的纳米比亚": "The succulent originates from southwestern Africa, Namibia",
+ "大家知道": "Everyone knows",
+ "随着现在的生产关系的消灭": "With the elimination of the current production relations",
+ "全世界无产者": "Proletarians of the world",
+ "而这种对立在不同的时代具有不同的形式": "And this opposition takes different forms in different eras",
+ "随着资产阶级的发展": "With the development of the bourgeoisie",
+ "或者至少也使他们的生活条件受到威胁": "Or at least threatens their living conditions",
+ "在这里": "Here",
+ "工业的发展已经把它消灭了": "The development of industry has already eliminated it.",
+ "随着工业的发展": "With the development of industry",
+ "总是在某些共同的形式中运动的": "Always moving in certain common forms.",
+ "使工人通过结社而达到的革命联合代替了他们由于竞争而造成的分散状态": "The revolutionary union achieved by workers through association replaced their state of dispersion caused by competition.",
+ "仅仅对于不自由的买卖来说": "Only in relation to unfree trade.",
+ "不顾信义、仁爱和名誉去做羊毛、甜菜和烧洒的买卖": "Doing business in wool, beets, and distilling without regard for integrity, kindness, and reputation.",
+ "资产阶级撕下了罩在家庭关系上的温情脉脉的面纱": "The bourgeoisie has torn away the tender veil covering family relationships.",
+ "那是再可笑不过了": "That is nothing short of ridiculous.",
+ "是为了工人阶级的利益": "It is for the benefit of the working class.",
+ "法国的批判": "Critique of France",
+ "她和我关系亲密": "She has a close relationship with me.",
+ "就再也没有任何别的联系了": "There is no other connection anymore.",
+ "福娘为景天科银波锦属的肉质草本植物": "Fugui is a succulent herbaceous plant of the Crassulaceae family.",
+ "古代的各种宗教就被基督教战胜了": "Various ancient religions were defeated by Christianity.",
+ "因而使正在崩溃的封建社会内部的革命因素迅速发展": "Thus, the revolutionary factors within the collapsing feudal society rapidly developed.",
+ "如果用户希望获取社交指导": "If users wish to obtain social guidance.",
+ "信仰自由和宗教自由的思想": "The ideas of freedom of belief and religious freedom.",
+ "资产阶级时代": "The era of the bourgeoisie.",
+ "但是他们在当前的运动中同时代表运动的未来": "But they simultaneously represent the future of the movement in the current struggle.",
+ "德国的或“真正的”社会主义": "German or 'real' socialism.",
+ "这或者是由于工作时间的延长": "This may be due to the extension of working hours.",
+ "叶缘外围镶着紫红色": "The leaf margins are edged with purplish-red.",
+ "现代的无产者利用铁路只要几年就可以达到了": "Modern proletarians can achieve this by using the railway in just a few years.",
+ "这种社会主义按其实际内容来说": "This socialism, in terms of its actual content,",
+ "消灭雇佣劳动": "Abolish wage labor.",
+ "工业中的行会制度": "The guild system in industry.",
+ "他们说": "They say.",
+ "喜肥": "Likes fat.",
+ "一切所有制关系都经历了经常的历史更替、经常的历史变更": "All property relations have undergone constant historical changes and replacements.",
+ "这种劳动所创造的资本": "The capital created by this labor.",
+ "碧光环喜温暖和散射光充足的环境": "Bright blue light enjoys a warm and well-diffused environment.",
+ "像其他任何货物一样": "Like any other goods",
+ "资产阶级不能统治下去了": "The bourgeoisie can no longer rule",
+ "从劳动不再能变为资本、货币、地租": "Labor can no longer be transformed into capital, money, or rent",
+ "即一般人的利益": "That is, the interests of the general public",
+ "有的是因为他们的小资本不足以经营大工业": "Some of them lack sufficient small capital to operate large industries",
+ "这种联合由于大工业所造成的日益发达的交通工具而得到发展": "This union is developed due to the increasingly advanced means of transportation caused by large industries",
+ "它必然表现为关于真正的社会、关于实现人的本质的无谓思辨": "It inevitably manifests as futile speculation about the true society and the realization of human essence",
+ "僧侣的社会主义也总是同封建的社会主义携手同行的": "Monastic socialism always walks hand in hand with feudal socialism",
+ "在现代文明已经发展的国家里": "In countries where modern civilization has developed",
+ "资产阶级的社会主义只有在它变成纯粹的演说辞令的时候": "Bourgeois socialism only exists when it becomes pure rhetoric",
+ "一部分是激进的资产者": "A part of them are radical capitalists",
+ "说他们想用正式的、公开的公妻制来代替伪善地掩蔽着的公妻制": "Claiming they want to replace the hypocritically concealed communal marriage with a formal, public communal marriage",
+ "旧思想的瓦解是同旧生活条件的瓦解步调一致的": "The disintegration of old ideas is in step with the disintegration of old living conditions",
+ "化学在工业和农业中的应用": "The application of chemistry in industry and agriculture",
+ "花期夏秋": "Blooming period: summer and autumn",
+ "并以统治阶级的资格用暴力消灭旧的生产关系": "And with the qualification of the ruling class, violently eliminate the old production relations",
+ "所以他们同样地受到竞争的一切变化、市场的一切波动的影响": "Thus, they are equally affected by all changes in competition and all fluctuations in the market",
+ "在这些生产资料和交换手段发展的一定阶段上": "At a certain stage of the development of these means of production and exchange",
+ "废除先前存在的所有制关系": "Abolish all previously existing property relations",
+ "那他们只是忘记了": "Then they simply forgot",
+ "法国的文献完全失去了直接实践的意义": "French literature has completely lost its direct practical significance",
+ "是通过翻译的": "It is through translation",
+ "于是德国人就认为": "Thus, the Germans believe",
+ "机器使劳动的差别越来越小": "Machines make the differences in labor increasingly smaller",
+ "正在向量化": "Is moving towards quantification",
+ "它按照自己的面貌为自己创造出一个世界": "It creates a world for itself according to its own appearance",
+ "这些主张本身还带有纯粹空想的性质": "These claims themselves still carry a purely utopian nature",
+ "获者不劳": "The winners do not labor",
+ "有贵族、骑士、平民、奴隶": "There are nobles, knights, commoners, and slaves",
+ "由于推广机器和分工": "Due to the promotion of machines and division of labor",
+ "非常可爱": "Very lovely",
+ "在日常生活中": "In daily life",
+ "只不过是现代生产力反抗现代生产关系、反抗作为资产阶级及其统治的存在条件的所有制关系的历史": "It is merely the history of modern productive forces resisting modern production relations, resisting the property relations that serve as the conditions for the existence of the bourgeoisie and its rule.",
+ "生产的不断变革": "The continuous transformation of production.",
+ "有人会说": "Some may say.",
+ "丙": "C.",
+ "旧的、靠本国产品来满足的需要": "The old needs satisfied by domestic products.",
+ "十分可爱": "Very lovely.",
+ "在法国": "In France.",
+ "世界市场使商业、航海业和陆路交通得到了巨大的发展": "The world market has greatly developed commerce, navigation, and land transportation.",
+ "而且归根到底只有通过社会全体成员的共同活动": "And ultimately, it can only be achieved through the collective activities of all members of society.",
+ "等等": "And so on.",
+ "花在工人身上的费用": "Expenses incurred on workers.",
+ "只有在统治阶级的利益需要他活着的时候才能活着": "Can only live when the interests of the ruling class require him to be alive.",
+ "这种社会主义所理解的物质生活条件的改变": "The changes in material living conditions understood by this socialism.",
+ "过去一切阶级在争得统治之后": "After all past classes have fought for domination.",
+ "电报的使用": "The use of the telegraph.",
+ "2.保守的或资产阶级的社会主义": "2. Conservative or bourgeois socialism.",
+ "德国小市民是模范的人": "The German petty bourgeois is the model person.",
+ "只是为了被剥削的工人阶级的利益才去写对资产阶级的控诉书": "Only to write accusations against the bourgeoisie for the benefit of the exploited working class.",
+ "人对人的剥削一消灭": "The exploitation of man by man is abolished.",
+ "公共权力就失去政治性质": "Public power loses its political nature.",
+ "看过第二章之后": "After reading the second chapter.",
+ "不管阶级对立具有什么样的形式": "Regardless of the forms of class opposition.",
+ "有封建主、臣仆、行会师傅、帮工、农奴": "There are feudal lords, servants, guild masters, helpers, and serfs.",
+ "无产阶级只是一个受苦最深的阶级": "The proletariat is merely the class that suffers the most.",
+ "这些信徒无视无产阶级的历史进展": "These believers ignore the historical progress of the proletariat.",
+ "关于这个时期": "Regarding this period.",
+ "甲": "A.",
+ "消灭私有制": "Abolish private property.",
+ "在欧洲游荡": "Wandering in Europe.",
+ "把教育同物质生产结合起来": "Combine education with material production.",
+ "现代的国家政权不过是管理整个资产阶级的共同事务的委员会罢了": "The modern state power is merely a committee managing the common affairs of the entire bourgeoisie.",
+ "把中世纪遗留下来的一切阶级排挤到后面去": "Push all classes left over from the Middle Ages to the back.",
+ "因为德国正处在资产阶级革命的前夜": "Because Germany is on the eve of the bourgeois revolution",
+ "机器运转的加速": "The acceleration of machine operations",
+ "并且尽可能快地增加生产力的总量": "And to increase the total amount of productivity as quickly as possible",
+ "走进新的耶路撒冷": "Walking into the New Jerusalem",
+ "在英国": "In England",
+ "现在却对准资产阶级自己了": "Now it is directed at the bourgeoisie themselves",
+ "共产党人不屑于隐瞒自己的观点和意图": "Communists disdain to conceal their views and intentions",
+ "还是死守着老师们的旧观点": "Or stubbornly cling to the old views of their teachers",
+ "资产阶级的社会主义就是这样一个论断": "The socialism of the bourgeoisie is such a proposition",
+ "法律、道德、宗教在他们看来全都是资产阶级偏见": "Law, morality, and religion are all seen by them as bourgeois prejudices",
+ "人们只要理解他们的体系": "People just need to understand their system",
+ "或者是由于在一定时间内所要求的劳动的增加": "Or due to the increase in labor required over a certain period",
+ "因为社会上文明过度": "Because civilization has become excessive in society",
+ "使城市人口比农村人口大大增加起来": "Causing the urban population to greatly exceed the rural population",
+ "现代的工人却相反": "Modern workers, however, are the opposite",
+ "已经不是本地的原料": "No longer local raw materials",
+ "它已经被炸毁了": "It has already been destroyed",
+ "分裂为两大相互直接对立的阶级": "Divided into two directly opposing classes",
+ "这种关系已经在阻碍生产而不是促进生产了": "This relationship has been hindering production rather than promoting it",
+ "他们在法国人对货币关系的批判下面写上“人的本质的外化”": "They wrote 'the externalization of human essence' under the French critique of monetary relations",
+ "在工场手工业时期": "During the period of workshop handicrafts",
+ "这种掌握": "This mastery",
+ "在叙述无产阶级发展的最一般的阶段的时候": "When narrating the most general stages of proletarian development",
+ "因为在这个社会里劳者不获": "Because in this society, laborers do not gain",
+ "工人没有祖国": "Workers have no country",
+ "该种叶形叶色较美": "This type of leaf shape and color is more beautiful",
+ "就不再适应已经发展的生产力了": "No longer adapting to the developed productive forces",
+ "说什么在这个资产阶级运动中": "Saying that in this bourgeois movement",
+ "这些条件只是资产阶级时代的产物": "These conditions are merely products of the bourgeois era",
+ "资产阶级再不能做社会的统治阶级了": "The bourgeoisie can no longer be the ruling class of society",
+ "共产党人始终代表整个运动的利益": "Communists always represent the interests of the entire movement",
+ "行会师傅被工业的中间等级排挤掉了;各种行业组织之间的分工随着各个作坊内部的分工的出现而消失了": "Guild masters have been pushed out by the intermediate levels of industry; the division of labor between various industry organizations has disappeared with the emergence of internal divisions of labor in each workshop",
+ "我们的资产者不以他们的无产者的妻子和女儿受他们支配为满足": "Our capitalists are not satisfied with having the wives and daughters of their proletarians under their control.",
+ "吸收辐射": "Absorbing radiation",
+ "因而德国的资产阶级革命只能是无产阶级革命的直接序幕": "Thus, the bourgeois revolution in Germany can only be a direct prelude to the proletarian revolution.",
+ "以便保障资产阶级社会的生存": "In order to ensure the survival of bourgeois society.",
+ "而不是加以革新": "And not to innovate.",
+ "我们要消灭的只是这种占有的可怜的性质": "What we want to eliminate is only the miserable nature of this possession.",
+ "更加彻底地利用旧的市场": "To make more thorough use of the old markets.",
+ "这种社会主义非常透彻地分析了现代生产关系中的矛盾": "This socialism analyzes the contradictions in modern production relations very thoroughly.",
+ "它将失掉它的阶级性质": "It will lose its class nature.",
+ "建立国内移民区": "Establish domestic immigrant zones.",
+ "而且每天都在消灭它": "And it is being eliminated every day.",
+ "即正式的和非正式的卖淫": "That is, formal and informal prostitution.",
+ "现代工业越发达": "The more developed modern industry is.",
+ "然后是某一地方的某一劳动部门的工人": "Then there are the workers of a certain labor sector in a certain place."
}
\ No newline at end of file
diff --git a/docs/translate_std.json b/docs/translate_std.json
index 50889da7..ed669e0c 100644
--- a/docs/translate_std.json
+++ b/docs/translate_std.json
@@ -108,5 +108,22 @@
"解析PDF_简单拆解": "ParsePDF_simpleDecomposition",
"解析PDF_DOC2X_单文件": "ParsePDF_DOC2X_singleFile",
"注释Python项目": "CommentPythonProject",
- "注释源代码": "CommentSourceCode"
+ "注释源代码": "CommentSourceCode",
+ "log亮黄": "log_yellow",
+ "log亮绿": "log_green",
+ "log亮红": "log_red",
+ "log亮紫": "log_purple",
+ "log亮蓝": "log_blue",
+ "Rag问答": "RagQA",
+ "sprint红": "sprint_red",
+ "sprint绿": "sprint_green",
+ "sprint黄": "sprint_yellow",
+ "sprint蓝": "sprint_blue",
+ "sprint紫": "sprint_purple",
+ "sprint靛": "sprint_indigo",
+ "sprint亮红": "sprint_bright_red",
+ "sprint亮绿": "sprint_bright_green",
+ "sprint亮黄": "sprint_bright_yellow",
+ "sprint亮蓝": "sprint_bright_blue",
+ "sprint亮紫": "sprint_bright_purple"
}
\ No newline at end of file
diff --git a/main.py b/main.py
index 294f64af..021681c4 100644
--- a/main.py
+++ b/main.py
@@ -13,16 +13,10 @@ help_menu_description = \
如何语音对话: 请阅读Wiki
如何临时更换API_KEY: 在输入区输入临时API_KEY后提交(网页刷新后失效)"""
+from loguru import logger
def enable_log(PATH_LOGGING):
- import logging
- admin_log_path = os.path.join(PATH_LOGGING, "admin")
- os.makedirs(admin_log_path, exist_ok=True)
- log_dir = os.path.join(admin_log_path, "chat_secrets.log")
- try:logging.basicConfig(filename=log_dir, level=logging.INFO, encoding="utf-8", format="%(asctime)s %(levelname)-8s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
- except:logging.basicConfig(filename=log_dir, level=logging.INFO, format="%(asctime)s %(levelname)-8s %(message)s", datefmt="%Y-%m-%d %H:%M:%S")
- # Disable logging output from the 'httpx' logger
- logging.getLogger("httpx").setLevel(logging.WARNING)
- print(f"所有对话记录将自动保存在本地目录{log_dir}, 请注意自我隐私保护哦!")
+ from shared_utils.logging import setup_logging
+ setup_logging(PATH_LOGGING)
def encode_plugin_info(k, plugin)->str:
import copy
@@ -42,9 +36,16 @@ def main():
import gradio as gr
if gr.__version__ not in ['3.32.9', '3.32.10', '3.32.11']:
raise ModuleNotFoundError("使用项目内置Gradio获取最优体验! 请运行 `pip install -r requirements.txt` 指令安装内置Gradio及其他依赖, 详情信息见requirements.txt.")
- from request_llms.bridge_all import predict
+
+ # 一些基础工具
from toolbox import format_io, find_free_port, on_file_uploaded, on_report_generated, get_conf, ArgsGeneralWrapper, DummyWith
+ # 对话、日志记录
+ enable_log(get_conf("PATH_LOGGING"))
+
+ # 对话句柄
+ from request_llms.bridge_all import predict
+
# 读取配置
proxies, WEB_PORT, LLM_MODEL, CONCURRENT_COUNT, AUTHENTICATION = get_conf('proxies', 'WEB_PORT', 'LLM_MODEL', 'CONCURRENT_COUNT', 'AUTHENTICATION')
CHATBOT_HEIGHT, LAYOUT, AVAIL_LLM_MODELS, AUTO_CLEAR_TXT = get_conf('CHATBOT_HEIGHT', 'LAYOUT', 'AVAIL_LLM_MODELS', 'AUTO_CLEAR_TXT')
@@ -61,8 +62,6 @@ def main():
from themes.theme import load_dynamic_theme, to_cookie_str, from_cookie_str, assign_user_uuid
title_html = f"