From 2dbe98453947c34dd6a9841bd81e2919ebdb2d6d Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Mon, 31 Jul 2023 17:27:28 +0800 Subject: [PATCH] =?UTF-8?q?doc(wiki):=20=E6=B7=BB=E5=8A=A0=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6wiki=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- res/wiki/插件开发.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/res/wiki/插件开发.md b/res/wiki/插件开发.md index 3e3f1ffa..903fbed9 100644 --- a/res/wiki/插件开发.md +++ b/res/wiki/插件开发.md @@ -435,6 +435,20 @@ KeySwitched = "key_switched" key_name: str 切换成功的api-key名称 key_list: list[str] api-key列表 """ + +PromptPreProcessing = "prompt_pre_processing" +"""每回合调用接口前对prompt进行预处理时触发,此事件不支持阻止默认行为 + kwargs: + session_name: str 会话名称(_) + default_prompt: list 此session使用的情景预设内容 + prompt: list 此session现有的prompt内容 + text_message: str 用户发送的消息文本 + + returns (optional): + default_prompt: list 修改后的情景预设内容 + prompt: list 修改后的prompt内容 + text_message: str 修改后的消息文本 +""" ``` ### host: PluginHost 详解