From 00028d11ae61fd4c41f48bae2fb5a0ded55ec60b Mon Sep 17 00:00:00 2001 From: binary-husky Date: Sun, 2 Mar 2025 02:12:17 +0800 Subject: [PATCH] typo fix --- crazy_functions/Internet_GPT.py | 14 +++++++------- themes/waifu_plugin/live2d.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crazy_functions/Internet_GPT.py b/crazy_functions/Internet_GPT.py index 09def113..7b506706 100644 --- a/crazy_functions/Internet_GPT.py +++ b/crazy_functions/Internet_GPT.py @@ -49,7 +49,7 @@ def search_optimizer( mutable = ["", time.time(), ""] llm_kwargs["temperature"] = 0.8 try: - queries_json = predict_no_ui_long_connection( + query_json = predict_no_ui_long_connection( inputs=query, llm_kwargs=llm_kwargs, history=[], @@ -57,24 +57,24 @@ def search_optimizer( observe_window=mutable, ) except Exception: - queries_json = "1234" + query_json = "null" #* 尝试解码优化后的搜索结果 - queries_json = re.sub(r"```json|```", "", queries_json) + query_json = re.sub(r"```json|```", "", query_json) try: - queries = json.loads(queries_json) + queries = json.loads(query_json) except Exception: #* 如果解码失败,降低温度再试一次 try: llm_kwargs["temperature"] = 0.4 - queries_json = predict_no_ui_long_connection( + query_json = predict_no_ui_long_connection( inputs=query, llm_kwargs=llm_kwargs, history=[], sys_prompt=sys_prompt, observe_window=mutable, ) - queries_json = re.sub(r"```json|```", "", queries_json) - queries = json.loads(queries_json) + query_json = re.sub(r"```json|```", "", query_json) + queries = json.loads(query_json) except Exception: #* 如果再次失败,直接返回原始问题 queries = [query] diff --git a/themes/waifu_plugin/live2d.js b/themes/waifu_plugin/live2d.js index 2cf559be..dc563d01 100644 --- a/themes/waifu_plugin/live2d.js +++ b/themes/waifu_plugin/live2d.js @@ -598,7 +598,7 @@ function(t) { default.VIEW_LOGICAL_MAX_BOTTOM, w. default.VIEW_LOGICAL_MAX_TOP), B.setMaxScale(w. default.VIEW_MAX_SCALE), B.setMinScale(w. - default.VIEW_MIN_SCALE), U = new M.L2DMatrix44, U.multScale(1, i / e), G = new M.L2DMatrix44, G.multTranslate(-i / 2, -e / 2), G.multScale(2 / i, -2 / i), F = v(), (0, D.setContext)(F), !F) return console.error("Failed to create WebGL context."), void(window.WebGLRenderingContext && console.error("Your browser don't support WebGL, check https://get.webgl.org/ for futher information.")); + default.VIEW_MIN_SCALE), U = new M.L2DMatrix44, U.multScale(1, i / e), G = new M.L2DMatrix44, G.multTranslate(-i / 2, -e / 2), G.multScale(2 / i, -2 / i), F = v(), (0, D.setContext)(F), !F) return console.error("Failed to create WebGL context."), void(window.WebGLRenderingContext && console.error("Your browser don't support WebGL, check https://get.webgl.org/ for further information.")); window.Live2D.setGL(F), F.clearColor(0, 0, 0, 0), a(t), s() } function s() {