镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-05 22:16:49 +00:00
* typo: Fix typos and rename functions across multiple files This commit addresses several minor issues: - Corrected spelling of function names (e.g., `update_ui_lastest_msg` to `update_ui_latest_msg`) - Fixed typos in comments and variable names - Corrected capitalization in some strings (e.g., "ArXiv" instead of "Arixv") - Renamed some variables for consistency - Corrected some console-related parameter names (e.g., `console_slience` to `console_silence`) The changes span multiple files across the project, including request LLM bridges, crazy functions, and utility modules. * fix: f-string expression part cannot include a backslash (#2139) * raise error when the uploaded tar contain hard/soft link (#2136) * minor bug fix * fine tune reasoning css * upgrade internet gpt plugin * Update README.md * fix GHSA-gqp5-wm97-qxcv * typo fix * update readme --------- Co-authored-by: binary-husky <96192199+binary-husky@users.noreply.github.com> Co-authored-by: binary-husky <qingxu.fu@outlook.com>
20 行
911 B
Python
20 行
911 B
Python
from crazy_functions.agent_fns.pipe import PluginMultiprocessManager, PipeCom
|
|
from loguru import logger
|
|
|
|
class EchoDemo(PluginMultiprocessManager):
|
|
def subprocess_worker(self, child_conn):
|
|
# ⭐⭐ 子进程
|
|
self.child_conn = child_conn
|
|
while True:
|
|
msg = self.child_conn.recv() # PipeCom
|
|
if msg.cmd == "user_input":
|
|
# wait father user input
|
|
self.child_conn.send(PipeCom("show", msg.content))
|
|
wait_success = self.subprocess_worker_wait_user_feedback(wait_msg="我准备好处理下一个问题了.")
|
|
if not wait_success:
|
|
# wait timeout, terminate this subprocess_worker
|
|
break
|
|
elif msg.cmd == "terminate":
|
|
self.child_conn.send(PipeCom("done", ""))
|
|
break
|
|
logger.info('[debug] subprocess_worker terminated') |