镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-06 06:26:47 +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>
41 行
1.9 KiB
Python
41 行
1.9 KiB
Python
from toolbox import CatchException, update_ui, update_ui_latest_msg
|
|
from crazy_functions.multi_stage.multi_stage_utils import GptAcademicGameBaseState
|
|
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
|
|
from crazy_functions.game_fns.game_utils import get_code_block, is_same_thing
|
|
|
|
@CatchException
|
|
def 随机小游戏(prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request):
|
|
from crazy_functions.game_fns.game_interactive_story import MiniGame_ResumeStory
|
|
# 清空历史
|
|
history = []
|
|
# 选择游戏
|
|
cls = MiniGame_ResumeStory
|
|
# 如果之前已经初始化了游戏实例,则继续该实例;否则重新初始化
|
|
state = cls.sync_state(chatbot,
|
|
llm_kwargs,
|
|
cls,
|
|
plugin_name='MiniGame_ResumeStory',
|
|
callback_fn='crazy_functions.互动小游戏->随机小游戏',
|
|
lock_plugin=True
|
|
)
|
|
yield from state.continue_game(prompt, chatbot, history)
|
|
|
|
|
|
@CatchException
|
|
def 随机小游戏1(prompt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, user_request):
|
|
from crazy_functions.game_fns.game_ascii_art import MiniGame_ASCII_Art
|
|
# 清空历史
|
|
history = []
|
|
# 选择游戏
|
|
cls = MiniGame_ASCII_Art
|
|
# 如果之前已经初始化了游戏实例,则继续该实例;否则重新初始化
|
|
state = cls.sync_state(chatbot,
|
|
llm_kwargs,
|
|
cls,
|
|
plugin_name='MiniGame_ASCII_Art',
|
|
callback_fn='crazy_functions.互动小游戏->随机小游戏1',
|
|
lock_plugin=True
|
|
)
|
|
yield from state.continue_game(prompt, chatbot, history)
|