Refactor: 重构配置文件管理,以支持更灵活的、会话粒度的(基于 umo part)配置文件隔离 (#2328)
* refactor: 重构配置文件管理,以支持更灵活的、基于 umo part 的配置文件隔离 * Refactor: 重构配置前端页面,新增数个配置项 (#2331) * refactor: 重构配置前端页面,新增数个配置项 * feat: 完善多配置文件结构 * perf: 系统配置入口 * fix: normal config item list not display * fix: 修复 axios 请求中的上下文引用问题
This commit is contained in:
@@ -8,15 +8,13 @@ from openai.types.chat.chat_completion import ChatCompletion
|
||||
class R1Filter(Star):
|
||||
def __init__(self, context: Context):
|
||||
super().__init__(context)
|
||||
self.display_reasoning_text = (
|
||||
self.context.get_config()
|
||||
.get("provider_settings", {})
|
||||
.get("display_reasoning_text", False)
|
||||
)
|
||||
|
||||
@filter.on_llm_response()
|
||||
async def resp(self, event: AstrMessageEvent, response: LLMResponse):
|
||||
if self.display_reasoning_text:
|
||||
cfg = self.context.get_config(umo=event.unified_msg_origin).get(
|
||||
"provider_settings", {}
|
||||
)
|
||||
if cfg.get("display_reasoning_text", False):
|
||||
# 显示推理内容的处理逻辑
|
||||
if (
|
||||
response
|
||||
|
||||
Reference in New Issue
Block a user