mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-24 04:19:48 +01:00
update: 优化系统prompt
This commit is contained in:
parent
de8c762d79
commit
dcb6d0feab
1 changed files with 2 additions and 4 deletions
|
|
@ -335,10 +335,8 @@ class ConnectionHandler:
|
|||
|
||||
def change_system_prompt(self, prompt):
|
||||
self.prompt = prompt
|
||||
# 找到原来的role==system,替换原来的系统提示
|
||||
for m in self.dialogue.dialogue:
|
||||
if m.role == "system":
|
||||
m.content = prompt
|
||||
# 更新系统prompt至上下文
|
||||
self.dialogue.update_system_message(self.prompt)
|
||||
|
||||
def chat(self, query):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue